30 Linux System Monitoring Tools Every SysAdmin Should Know

Need to monitor Linux server performance? Try these built-in commands and a few add-on tools. Most distributions come with tons of Linux monitoring tools. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed below are some of the most fundamental commands when it comes to system analysis and debugging Linux server issues such as:

  1. Finding out system bottlenecks
  2. Disk (storage) bottlenecks
  3. CPU and memory bottlenecks
  4. Network bottleneck.
Tutorial details
Difficulty levelIntermediate
Root privilegesYes
RequirementsLinux terminal
CategorySystem Management
OS compatibilityAlma • Alpine • Arch • CentOS • Debian • Fedora • Linux • Mint • openSUSE • Pop!_OS • RHEL • Rocky • Stream • SUSE • Ubuntu • WSL
Est. reading time19 minutes

1. top – Process activity monitoring command

top command display Linux processes. It provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds.

Fig.01: Linux top command

Commonly Used Hot Keys With top Linux monitoring tools

Here is a list of useful hot keys:

Hot KeyUsage
tDisplays summary information off and on.
mDisplays memory information off and on.
ASorts the display by top consumers of various system resources. Useful for quick identification of performance-hungry tasks on a system.
fEnters an interactive configuration screen for top. Helpful for setting up top for a specific task.
oEnables you to interactively select the ordering within top.
rIssues renice command.
kIssues kill command.
zTurn on or off color/mono

How do I Find Out Linux CPU Utilization?

2. vmstat – Virtual memory statistics

The vmstat command reports information about processes, memory, paging, block IO, traps, and cpu activity.
# vmstat 3
Sample Outputs:

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 2540988 522188 5130400    0    0     2    32    4    2  4  1 96  0  0
 1  0      0 2540988 522188 5130400    0    0     0   720 1199  665  1  0 99  0  0
 0  0      0 2540956 522188 5130400    0    0     0     0 1151 1569  4  1 95  0  0
 0  0      0 2540956 522188 5130500    0    0     0     6 1117  439  1  0 99  0  0
 0  0      0 2540940 522188 5130512    0    0     0   536 1189  932  1  0 98  0  0
 0  0      0 2538444 522188 5130588    0    0     0     0 1187 1417  4  1 96  0  0
 0  0      0 2490060 522188 5130640    0    0     0    18 1253 1123  5  1 94  0  0

Display Memory Utilization Slabinfo

# vmstat -m

Get Information About Active / Inactive Memory Pages

# vmstat -a
See “How do I find out Linux Resource utilization to detect system bottlenecks?” for more info.

Linux Find Out What Process Are Using Swap Space

Use the smem command:
# smem
Another option is to combine pgrep command with the grep command to find out SWAP mem usage:
# pgrep memcached
# grep --color VmSwap /proc/48440/status

Linux Find Out What Process Are Using Swap Space

3. w – Find out who is logged on and what they are doing

We use the w command displays information about the users currently on the machine, and their processes.
# w username
# w vivek

Sample Outputs:

https://googleads.g.doubleclick.net/pagead/ads?gdpr=0&us_privacy=1—&client=ca-pub-7825705102693166&output=html&h=280&adk=1364362194&adf=3494852984&pi=t.aa~a.1798617643~i.44~rp.4&w=644&fwrn=4&fwrnh=100&lmt=1672924998&num_ads=1&rafmt=1&armr=3&sem=mc&pwprc=9276298954&ad_type=text_image&format=644×280&url=https%3A%2F%2Fwww.cyberciti.biz%2Ftips%2Ftop-linux-monitoring-tools.html&fwr=0&pra=3&rh=161&rw=644&rpe=1&resp_fmts=3&wgl=1&fa=27&uach=WyJXaW5kb3dzIiwiMTUuMC4wIiwieDg2IiwiIiwiMTA4LjAuNTM1OS4xMjUiLFtdLGZhbHNlLG51bGwsIjY0IixbWyJOb3Q_QV9CcmFuZCIsIjguMC4wLjAiXSxbIkNocm9taXVtIiwiMTA4LjAuNTM1OS4xMjUiXSxbIkdvb2dsZSBDaHJvbWUiLCIxMDguMC41MzU5LjEyNSJdXSxmYWxzZV0.&dt=1672934615662&bpp=2&bdt=2361&idt=3&shv=r20230103&mjsv=m202212010101&ptt=9&saldr=aa&abxe=1&cookie=ID%3Dac7e0204d7010890-2225af792dd900ed%3AT%3D1672928645%3ART%3D1672928645%3AS%3DALNI_MYGgTI6s5iWC4F7Ry-T8V6lporB9w&gpic=UID%3D00000b9e9e1e75bf%3AT%3D1672928645%3ART%3D1672928645%3AS%3DALNI_MZNogsSPlIbVtbpcFXLVvuv7103KQ&prev_fmts=0x0%2C644x280%2C336x600%2C331x250%2C331x250%2C1005x124&nras=3&correlator=5086270406427&frm=20&pv=1&ga_vid=788109010.1672928643&ga_sid=1672934615&ga_hid=1722653086&ga_fc=1&ga_cid=1912941346.1672928644&u_tz=330&u_his=2&u_h=864&u_w=1536&u_ah=816&u_aw=1536&u_cd=24&u_sd=1.25&dmc=8&adx=248&ady=5090&biw=1519&bih=746&scr_x=0&scr_y=2112&eid=44759875%2C44759926%2C44759842%2C44778780%2C44780792&oid=2&psts=ACgb8tv1o9pi1i-4NIYlQxQeTkWsMI6SgXoBY3UbASLrSWb2HX568SRZ4KWqBPw3LZRGalJca7He47sCZKZKMDM%2CACgb8tu74u9BPx4xGPB3SnhBIzBikLTXdeLHZmbXkekf6rxTKU1YvorxyTpBmuu5AdspjPS4V3ee1iWtn9_i99U%2CACgb8ttwQ_l4u_5ZhP0DrWv8rqgsnCLNl50E0QqXP8YCRveMUnBoZ32yVK_63UkAXnjvc-gAgrlLz6I0WbDfRQsY1xk8QUqpi4t9eM-5_kzz%2CACgb8tvNVE0XifaJy9Q4vgyu4I1iLbXmytZ6Z2RYqcSVFmvTCHmesPbhWT-l94JZUkBBc4zVwYEBtA1XV_msqaU%2CACgb8tut6X07PMj9NwLyHZo_XSb7DfVYOH4kNSC0HO_QO58VQcSIcBklMawzX2hwYsaWpP1aHgPs7DS0BfqT7v4&pvsid=2051868736340426&tmod=1290824536&uas=1&nvt=1&ref=https%3A%2F%2Fwww.cyberciti.biz%2F&eae=0&fc=1408&brdim=0%2C0%2C0%2C0%2C1536%2C0%2C1536%2C816%2C1536%2C746&vis=1&rsz=%7C%7Cs%7C&abl=NS&fu=128&bc=31&ifi=6&uci=a!6&btvi=4&fsb=1&xpc=srsI3QAG51&p=https%3A//www.cyberciti.biz&dtd=48660

 17:58:47 up 5 days, 20:28,  2 users,  load average: 0.36, 0.26, 0.24
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    10.1.3.145       14:55    5.00s  0.04s  0.02s vim /etc/resolv.conf
root     pts/1    10.1.3.145       17:43    0.00s  0.03s  0.00s w

4. uptime – Tell how long the Linux system has been running

Need to monitor Linux server performance? Try these built-in commands and a few add-on tools. Most distributions come with tons of Linux monitoring tools. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a…

Need to monitor Linux server performance? Try these built-in commands and a few add-on tools. Most distributions come with tons of Linux monitoring tools. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a…

Leave a Reply

Your email address will not be published. Required fields are marked *