linux /proc/loadavg

前端 未结 4 782
野性不改
野性不改 2020-12-07 13:00

When issueing this command from linux:

# cat /proc/loadavg
0.75 0.35 0.25 1/25 1747

What are the last 2 numbers?

The last one keep

相关标签:
4条回答
  • 2020-12-07 13:43

    Following page explains these in detail:

    http://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html

    I am putting interpretation of these numbers that I got from the above page as follows:

    • If the averages are 0.0, then your system is idle.
    • If the 1 minute average is higher than the 5 or 15 minute averages, then load is increasing.
    • If the 1 minute average is lower than the 5 or 15 minute averages, then load is decreasing. If they are higher than your CPU count, then you might have a performance problem (it depends).
    0 讨论(0)
  • 2020-12-07 13:46

    I would like to comment the accepted answer.

    The fourth field consists of two numbers separated by a slash (/). The first of these is the number of currently executing kernel scheduling entities (processes, threads); this will be less than or equal to the number of CPUs.

    I did a test program that reads integer N from input and then creates N threads and their run them forever. On RHEL 6.5 computer I have 8 processor and each processor has hyper threading. Anyway if I run my test and it creates 128 threads I see in the fourth field values that are greater than 128, for example 135. It is clearly greater than the number of CPU. This post supports my observation: http://juliano.info/en/Blog:Memory_Leak/Understanding_the_Linux_load_average

    It is worth noting that the current explanation in proc(5) manual page (as of man-pages version 3.21, March 2009) is wrong. It reports the first number of the forth field as the number of currently executing scheduling entities, and so predicts it can't be greater than the number of CPUs. That doesn't match the real implementation, where this value reports the current number of runnable threads.

    0 讨论(0)
  • 2020-12-07 13:49

    /proc/loadavg

    The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes. They are the same as the load average numbers given by uptime(1) and other programs.

    The fourth field consists of two numbers separated by a slash (/). The first of these is the number of currently executing kernel scheduling entities (processes, threads); this will be less than or equal to the number of CPUs. The value after the slash is the number of kernel scheduling entities that currently exist on the system.

    The fifth field is the PID of the process that was most recently created on the system.

    0 讨论(0)
  • 2020-12-07 13:50

    The first three columns measure CPU and I/O utilization of the last one, five, and 15 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used.

    https://docs.fedoraproject.org/en-US/Fedora/17/html/System_Administrators_Guide/s2-proc-loadavg.html

    0 讨论(0)
提交回复
热议问题