--> man proc得到以下解释:
/proc/loadavg
The load average numbers give 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.
使用ps找出这两种状态的进程数
ps aux |grep ' [D|R] '|wc -l
上面所获得的值和uptime得到的值基本相同。
如果状态为R的进程数很多,说明CPU瓶颈,如果状态为D的进程很多,说明IO出现瓶颈。
一般来说只要每个CPU的当前活动进程数不大于3那么系统的性能就是良好的,如果每个CPU的任务数大于5,那么就表示这台机器的性能有严重问题。对于上面的例子来说,假设系统有两个CPU,那么其每个CPU的当前任务数为:8.13/2=4.065。这表示该系统的性能是可以接受的。
相关链接:
http://www.hiadmin.com/uptime%E5%91%BD%E4%BB%A4%E8%A7%A3%E9%87%8A/

发表评论