mpstat不显示intr / s列

我在CentOS 6.5上,sysstat 9.0.4.22.el6

出于某种原因,mpstat不显示intr / s列

例如,我正在运行它,只显示这些列:

mpstat -P ALL 1 5 Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest 

任何想法为什么会这样?

这真的很奇怪,我试图在我的系统中复制这个问题

 $ cat /etc/redhat-release CentOS release 5.10 (Final) $ mpstat -P ALL Linux 2.6.18-371.9.1.el5 (test) 08/30/2014 02:23:48 PM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s 02:23:48 PM all 0.13 0.00 0.07 0.10 0.01 0.01 0.00 99.69 104.26 02:23:48 PM 0 0.18 0.00 0.08 0.14 0.02 0.02 0.00 99.56 103.96 02:23:48 PM 1 0.08 0.00 0.06 0.05 0.00 0.00 0.00 99.81 0.30 

所以直到Centos5系列看起来没有问题

现在在我的Centos6.2中,我尝试安装第一个sysstat rpm自带的Centos6(sysstat-9.0.4-11.el6.x86_64.rpm),默认一个是sysstat-9.0.4-18.el6.x86_64.rpm

 [root@centos ~]# rpm -ivh sysstat-9.0.4-11.el6.x86_64.rpm warning: sysstat-9.0.4-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:sysstat ########################################### [100%] 

我能够复制这个问题

我检查更改日志,没有什么与mpstat或此更改有关

 [root@centos ~]# rpm -q --changelog sysstat|grep -i mpstat fix the output of mpstat for cpu which are switched off fix the mpstat output on tickless kernel - Resolves: #442801 mpstat shows one extra cpu 

所以我不确定RedHat有什么变化,我唯一发现的是https://bugzilla.redhat.com/show_bug.cgi?id=624130 。如果你需要中断字段,使用这个命令

  [root@centos Packages]# mpstat -A 1 2 Linux 2.6.32-220.el6.x86_64 (centos.test.com) 08/31/2014 _x86_64_ (3 CPU) 12:00:33 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 12:00:34 AM all 0.49 0.00 0.49 0.00 0.00 1.46 0.00 0.00 97.57 12:00:34 AM 0 0.00 0.00 1.59 0.00 0.00 0.00 0.00 0.00 98.41 12:00:33 AM CPU intr/s 12:00:34 AM all 1896.00 12:00:34 AM 0 9.00 12:00:34 AM 1 12.00 12:00:34 AM 2 1.00 

或者使用mpstat -I ALL

根据手册页

  -A This option is equivalent to specifying -I ALL -u -P ALL -I { SUM | CPU | ALL } Report interrupts statistics.