Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1069757
  • 博文数量: 186
  • 博客积分: 4939
  • 博客等级: 上校
  • 技术积分: 2075
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-08 17:15
文章分类

全部博文(186)

文章存档

2018年(1)

2017年(3)

2016年(11)

2015年(42)

2014年(21)

2013年(9)

2012年(18)

2011年(46)

2010年(35)

分类: LINUX

2010-11-17 17:19:46

 
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
 
一直不太明白,原来这样的:现代分时多任务操作系统,cpu使用时分时段来,比如某个时段A进程cpu处理用了10s,然后B进程30s,然后空闲了60s,那么这个时间内cpu占用率是40%
 
下边是google得到的解释。
 
# us -> User CPU time: The time the CPU has spent running users’ processes that are not niced.
%us cpu耗费在不正常的用户进程的时间。

# sy -> System CPU time: The time the CPU has spent running the kernel and its processes.
 
 系统内核占用时间

# ni -> Nice CPU time: The time the CPU has spent running users’ proccess that have been niced.
 
。。。。。。
# wa -> iowait: Amount of time the CPU has been waiting for I/O to complete.
cpu等待I/0完成的时间总量。

# hi -> Hardware IRQ: The amount of time the CPU has been servicing hardware interrupts.
# si -> Software Interrupts.: The amount of time the CPU has been servicingsoftware
interrupts.
 
更详细的论述请见
 
结论:
系统负载时运行队列的平均长度,也就是等待CPU的平均进程数
所以“Load值=CPU核数”,这是最理想的状态,没有任何竞争,一个任务分配一个核。
由于数据是每隔5秒钟检查一次活跃的进程数,然后根据这个数值算出来的。如果这个数除以CPU的核数,结果高于5的时候就表明系统在超负荷运转了。
PS:load和io也有很大关系,io很忙的机器,基本idle很高,但load也是非常高。
 
到此你应该明白为什么top得到的结果是200%了吧?
阅读(13001) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~