Jump to Navigation

160 - CPU Load

The w, top, sar and uptime commands show the three load average numbers. In Linux, they can also be
accessed by reading the /proc/loadavg file.

[root@myserv]# uptime
 10:28:21 up 34 days, 15:11,  3 users,  load average: 0.27, 0.20, 0.17
[root@myserv]# cat /proc/loadavg
1.52 0.50 7.98 1/1731 20413

For single-CPU systems that are CPU-bound, one can think of load average as a percentage of
system utilization during the respective time period. For systems with multiple CPUs,
one must divide the number by the number of processors in order to get a comparable percentage.

For example, one can interpret a load average of "1.52 0.50 7.98" on a single-CPU system as:
The three values of load average refer to the past one, five, and fifteen minutes of
system operation.

  • during the last minute, the CPU was overloaded by 52%
          (1 CPU with 1.52 runnable processes, so that 0.52 processes had to wait for a turn)
  • during the last 5 minutes, the CPU was underloaded 50%
          (no processes had to wait for a turn)
  • during the last 15 minutes, the CPU was overloaded 698%
          (1 CPU with 7.98 runnable processes, so that 6.98 processes had to wait for a turn)

About sar command :

Sar is the "system activity report" program found on Linux system. In Linux, you can usually find it in the sysstat package,
which includes programs and scripts to capture and summarize performance data, then produce detailed reports.
This suite of programs can be useful in tracking down performance bottlenecks and providing insight into
how the system is used throughout the day.

# sar -P ALL | head -20

# sar -P 0 | head -10

# sar -P 1 | head -10

 

Linux:


Main menu 2

Story | by Dr. Radut