红联Linux门户
Linux帮助

通过调用SAR显示CPU空闲IDEL始终为零,系统运行正常

发布时间:2009-06-04 10:42:05来源:红联作者:qiaoyongdv
2008年10月19日早上5点多,安徽行监控系统报警,显示cpu的idle(cpu空闲资源)为0,经过沟通发现仅是监控程序使用的sar命令会这样显示,使用其他监控命令均无该现象,在网上查询资料,应该是目前使用的版本sar的设计存在问题导致显示有问题,需要升级sysstat程序包解决,建行这边需要我们尽快提供解决方案,否则监控程序就不能使用。
SYSSTAT FAQ
2.21. The sar command displays some weird CPU values...
E.g.: 10:50:01 AM CPU %user %nice %system %iowait %idle
11:00:01 AM all 90.90 0.00 5.17 3.93 0.00
11:00:01 AM 0 39.40 0.00 2.37 2.07 56.17
11:00:01 AM 1 29.71 0.00 1.73 1.17 67.39
11:00:01 AM 2 42.69 0.00 2.34 1.11 53.85
11:00:01 AM 3 26.24 0.00 1.41 1.61 70.74
...

Sysstat may have met an overflow condition while reading CPU usage from your /proc/stat file. This condition is all the more likely to happen as your machine uptime is high and/or there are many processors. Sysstat up to version 5.0.6 uses 32-bit integer variables to store CPU usage. Then, beginning with version 5.1.1, sysstat has shifted to 64-bit variables, which has fixed the problem. So try to upgrade your version of sysstat to the latest stable release and check that the problem has gone.
文章评论

共有 0 条评论