Linux load average平均负载

查看load average平均负载, 在uptime, w及top均可显示,

sled11:/proc> w

 16:22:11 up  1:42,  3 users,  load average: 0.19, 0.35, 0.22
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
zmao     :0        14:40   ?xdm?  25:55   0.15s /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
zmao     pts/0     14:41    0.00s  0.39s  0.01s w
zmao     pts/2     14:42    9:58   0.43s  0.01s man 5 proc


sled11:/proc> uptime

  4:22pm  up   1:42,  3 个用户,平均负载:0.18, 0.35, 0.22


sled11:/proc> cat /proc/loadavg

0.16 0.34 0.21 1/348 11858


在man 5 proc中有/porc/loadavg中对应域的意义:

 /proc/loadavg
              The first three fields in this file are load average figures givingthe 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.

理解负载的高低标准,请参考:

http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages

(中文)http://os.51cto.com/art/200911/164410.htm

简单来说就是,对应于单CPU系统,负荷 1.00表明系统已经没有剩余的资源了,有经验管理员认为 0.70是上限。对于多CPU系统(包括多核),则可将对应的负荷除CPU数来理解,比如2核或2CPU系统,则负荷 2.00才表明系统已经没有剩余的资源。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值