Check System Load

How to check system load.

$ uptime
$ grep 'model name' /proc/cpuinfo | wc -l

Take 1 CPU core as an example, assuming that the CPU can handle up to 100 processes per minute

  • load=0, no process needs CPU
  • load=0.5, CPU processed 50 processes
  • load=1, the CPU has processed 100 processes. At this time, the CPU is full, but the system can still operate smoothly
  • load=1.5, the CPU has processed 100 processes, and 50 processes are being excluded waiting for CPU processing. At this time, the CPU has been overloaded.

View the number of logical CPU cores.

1.0 is a critical value, beyond this value, the system is not in the best state. Generally 0.7 is an ideal value. In addition, the health status of the load value is also related to the number of CPU cores in the system. If the number of CPU cores is 2, then the health value of the load value should be 2, and so on.

$ w
$ top

Under the top command, press 1 to show how many CPUs the server has and the usage of each CPU.

$ vmstat
$ iostat
$ iotop

sysstat

$ vi /etc/sysconfig/sysstat
$ vi /etc/cron.d/sysstat
$ vi /var/log/sa
$ sar
$ sar -r
$ sar -b
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus