5fc8cd96b0a212067.jpg_fo742.jpg
mpstat是MultiprocessorStatistics的缩写,是实时系统监控工具。其报告与CPU的一些统计信息,这些信息存放在/proc/stat文件中。在多CPUs系统里,其不但能查看所有CPU的平均状况信息,而且能够查看特定CPU的信息。mpstat最大的特点是:可以查看多核心cpu中每个计算核心的统计数据;而类似工具vmstat只能查看系统整体cpu情况。
# yum install sysstat
[root@node01 ~]# mpstat --help
Usage: mpstat [ options ] [ [ ] ]
Options are:
[ -A ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ]
[ -P { [,...] | ON | ALL } ]

CPU 处理器ID
user 在internal时间段里,用户态的CPU时间(%),不包含 nice值为负 进程 (usr/total)100
nice 在internal时间段里,nice值为负进程的CPU时间(%) (nice/total)
100
system 在internal时间段里,核心时间(%) (system/total)100
iowait 在internal时间段里,硬盘IO等待时间(%) (iowait/total)
100
irq 在internal时间段里,硬中断时间(%) (irq/total)100
soft 在internal时间段里,软中断时间(%) (softirq/total)
100
idle 在internal时间段里,CPU除去等待磁盘IO操作外的因为任何原因而空闲的时间闲置时间(%)(idle/total)100
intr/s 在internal时间段里,每秒CPU接收的中断的次数intr/total)
100
CPU总的工作时间=total_cur=user+system+nice+idle+iowait+irq+softirq
total_pre=pre_user+ pre_system+ pre_nice+ pre_idle+ pre_iowait+ pre_irq+ pre_softirq
user=user_cur – user_pre
total=total_cur-total_pre
其中_cur 表示当前值,_pre表示interval时间前的值。上表中的所有值可取到两位小数点。

intr/s
HI/s TIMER/s NET_TX/s NET_RX/s BLOCK/s IRQ_POLL/s TASKLET/s SCHED/s HRTIMER/s RCU/s

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code