linux下cat /proc/loadavg 命令用来查看什么?

来源:百度知道 编辑:UC知道 时间:2024/06/07 14:37:14

查看文章
cat /proc/loadavg 命令详解2011年02月28日 星期一 下午 5:24/proc文件系统是一个虚拟的文件系统,不占用磁盘空间,它反映了当前操作系统在内存中的运行情况,查看/proc下的文件可以聊寄到系统的运行状态。

cat /proc/loadavg是查看系统平均负载的命令,输出结果:
0.18 0.26 0.25 2/251 20320

前三个数字是1、5、15分钟内的平均进程数(有人认为是系统负荷的百分比,其实不然,有些时候可以看到200甚至更多)。

第四个值的分子是正在运行的进程数,分母是进程总数,最后一个是最近运行的进程ID号。

这里的平均负载也就是可运行的进程的平均数。

from proc(5) manual page:

/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 sepa‐ rated by a slash (/). The first of these is the number of cur‐ rently execut