Linux Performance Tools To Troubleshoot Problems

Q. I am new to Linux. What tools or commands are recommended to troubleshoot performance related problems?

A. Following are the basic or essential tools that every Linux or UNIX system admin should be aware of:

a) top
b) sar
c) vmstat
d) iostat
e) free

top command

The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. Type the top command:
$ top

sar command

The sar command is performance monitoring tool. It can find out what Linux is doing all the time. It can generate report and email them to sys admin. In order to use sar you need to install sysstat package. sar displays performance data for:

  • CPU and Queue,
  • Disk I/O
  • Swap and Memory
  • CPU interrupts, Networking and much more

vmstat command

vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity. See the detailed article “How do I find out Linux Resource utilization to detect system bottlenecks?

iostat command

The iostat command is used for monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates i.e. it is useful to monitor disk throughput. See the detailed article: “How do I find out Linux CPU utilization?

free command

The free command displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. See the detailed article: “Linux check memory usage

Read the man pages of all of these tools. Always remember, you need to spend some time using these tools, and then only you will be able to understand the output of these commands.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 11 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
11 comments… add one
  • Anonymous Jul 6, 2006 @ 20:25

    cool stuff

  • Anonymous Jul 11, 2006 @ 4:54

    usefull, nice.

  • Mark Seger Dec 8, 2007 @ 1:11

    one link does it all! check out for all your performance monitoring needs.

  • Chiron613 Jan 15, 2009 @ 23:47

    Hmm… many of these worked, except for sar. It keeps telling me:

    Cannot open /var/log/sysstat/sa15: No such file or directory

    I wonder what the problem is.

    However, some of those other utilities are new to me. It’s nice to learn of them.

  • Matt Mar 3, 2009 @ 22:58

    These tools seem to be find for looking at the overall performance of a server, but is there a tool that can be used to see specifically at a certain process and measure the impact of that process on the system?

  • Ram Mar 16, 2009 @ 10:53

    sar 1 5

  • ajay malhotra Feb 22, 2010 @ 19:51

    I had the same problem with $ sar. On a CentOS box, install sysstat using $ yum install sysstat if you are missing sar altogether. Then let it run a couple of cron jobs (sa1 and sa2 – sa1 runs every 10 mins, sa2 runs close to midnight). If you can’t wait till midnight then run $ /usr/lib64/sa/sa2 -A but be prepared to see limited information

  • kanth Sep 6, 2010 @ 5:36

    Q. Lets say you have a remote machine on which your server application runs. The remote server is linux based. Mention what all steps you would do to IDENTIFY and SOLVE each of the following two problems:
    1. The server is not reachable
    2. The server is running slow

  • John Wicks Feb 29, 2012 @ 23:05

    Found a cool little ruby script that can be used to send a HTML email of these stats from your server via cron.

    You can read about setting it up here:

    My problem was that our VPS was showing intermittent memory issues. The hosting company automatically reboots the server but doesn’t provide any stats on what might be causing the problem. Logging in after the server is rebooted and not having sar access, left you with no way to tell what was causing the problem. Logging all the output of the above commands in a cron job just didn’t sound right to me. So I thought I’d try this ruby script.

    Setup a little cron job and Bam, we have stats…


  • suraj parkash May 27, 2014 @ 15:17

    Thanks So Much…

    Above written or given info are very helpfulll for all,,,

    Keep it up this good work ….all

  • mahesh Sep 16, 2015 @ 13:06

    Thank you, Can you post some more useful commands which are used to troubleshoot disk issues in Linux.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum