Table of Contents

Loadaverage(LA) on Linux Performance (free, sar, dstat, vmstat)



Linux Command for Loadaverage

uptime

root@ubuntu20:~# uptime
 08:53:02 up 15 days,  9:37,  1 user,  load average: 0.00, 0.00, 0.00
root@ubuntu20:~#


w

root@ubuntu20:~# w
 08:53:21 up 15 days,  9:38,  1 user,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
user02 pts/0    14.xx.xx.xx        08:45    0.00s  0.13s  0.03s sshd: user01 [priv]
root@ubuntu20:~#


top

root@ubuntu20:~# top

top - 08:54:26 up 15 days,  9:39,  1 user,  load average: 0.00, 0.00, 0.00
Tasks: 122 total,   1 running, 121 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.4 sy,  0.0 ni, 99.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    981.1 total,    147.5 free,    189.2 used,    644.5 buff/cache
MiB Swap:   2048.0 total,   1923.2 free,    124.8 used.    548.5 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
    831 www-data  20   0  227488  92324  73056 S   0.0   9.2  32:15.51 php-fpm7.4
    832 www-data  20   0  226192  89928  71028 S   0.0   9.0  32:12.72 php-fpm7.4
    342 root      19  -1   68156  21548  20864 S   0.0   2.1   0:58.56 systemd-journal
    519 root      rt   0  280140  17944   8200 S   0.0   1.8   2:19.84 multipathd
 120866 root      20   0  281856  15588  13720 S   0.0   1.6   0:00.04 packagekitd
    731 root      20   0  944056  14004   4508 S   0.0   1.4   1:47.37 snapd
 120929 postfix   20   0   42756  10840   9796 S   0.7   1.1   0:00.02 smtpd
  82613 www-data  20   0   63348   9772   4168 S   0.0   1.0   7:04.20 nginx
 120569 user01    20   0   18616   9056   7496 S   0.0   0.9   0:00.11 systemd
 120556 root      20   0   13792   9000   7604 S   0.0   0.9   0:00.03 sshd
      1 root      20   0  169144   8480   5764 S   0.0   0.8   1:54.37 systemd
  82614 www-data  20   0   61316   6600   3240 S   0.0   0.7   0:20.05 nginx
    715 root      20   0  198304   6036   5124 S   0.0   0.6   1:35.55 php-fpm7.4
 120672 user01    20   0   13924   5932   4564 S   0.0   0.6   0:00.03 sshd
 120684 root      20   0    8436   5344   3496 S   0.0   0.5   0:00.05 bash


dstat

root@ubuntu20:~# dstat -lt
---load-avg--- ----system----
 1m   5m  15m |     time
   0    0    0|04-03 08:55:25
   0    0    0|04-03 08:55:26
   0    0    0|04-03 08:55:27
   0    0    0|04-03 08:55:28
   0    0    0|04-03 08:55:29
   0    0    0|04-03 08:55:30
   0    0    0|04-03 08:55:31
   0    0    0|04-03 08:55:32^C
root@ubuntu20:~#


sar -q

root@ubuntu20:~# sar -q 1
Linux 5.4.0-65-generic (ubuntu20)       03/04/2021      _x86_64_        (2 CPU)

08:55:58 AM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
08:55:59 AM         0       152      0.07      0.02      0.00         0
08:56:00 AM         0       152      0.06      0.02      0.00         0
08:56:01 AM         0       152      0.06      0.02      0.00         0
08:56:02 AM         0       152      0.06      0.02      0.00         0
08:56:03 AM         0       152      0.06      0.02      0.00         0
08:56:04 AM         0       152      0.06      0.02      0.00         0
08:56:05 AM         0       152      0.06      0.01      0.00         0
08:56:06 AM         0       152      0.06      0.01      0.00         0
08:56:07 AM         0       152      0.06      0.01      0.00         0
08:56:08 AM         0       152      0.06      0.01      0.00         0
08:56:09 AM         0       152      0.06      0.01      0.00         0
^C

Average:            0       152      0.06      0.02      0.00         0
root@ubuntu20:~#




Related Pages