mpstat

发布时间: 更新时间: 总字数:557 阅读时间:2m 作者: IP属地: 分享 复制网址

mpstatMultiprocessor Statistics

Help

# mpstat  -h
Usage: mpstat [ options ] [ <interval> [ <count> ] ]
Options are:
[ -A ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ]
[ -P { <cpu> [,...] | ON | ALL } ]

Use

# mpstat
Linux 3.10.0-862.14.4.el7.x86_64 (a1.xiexianbin.cn) 	08/29/2020 	_x86_64_	(1 CPU)

04:23:08 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
04:23:08 PM  all    0.89    0.00    0.79    0.02    0.00    0.00    0.00    0.00    0.00   98.29
  • 5秒产生一个报告,总共产生2
# mpstat -P ALL 5 2
Linux 3.10.0-862.14.4.el7.x86_64 (a1.xiexianbin.cn) 	08/29/2020 	_x86_64_	(1 CPU)

04:25:10 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
04:25:15 PM  all    1.61    0.00    0.80    0.00    0.00    0.00    0.00    0.00    0.00   97.59
04:25:15 PM    0    1.61    0.00    0.80    0.00    0.00    0.00    0.00    0.00    0.00   97.59

04:25:15 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
04:25:20 PM  all    1.61    0.00    0.80    0.40    0.00    0.00    0.00    0.00    0.00   97.18
04:25:20 PM    0    1.61    0.00    0.80    0.40    0.00    0.00    0.00    0.00    0.00   97.18

Average:     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
Average:     all    1.61    0.00    0.80    0.20    0.00    0.00    0.00    0.00    0.00   97.39
Average:       0    1.61    0.00    0.80    0.20    0.00    0.00    0.00    0.00    0.00   97.39

参数:

  • CPU 处理器ID
  • %usr 在internal时间段里,用户态的CPU时间(%),不包含nice值为负进程usr/total*100
  • %nice 在internal时间段里 ,nice值为负进程的CPU时间(%)nice/total*100
  • %sys 在internal时间段里 ,核心时间(%) system/total*100
  • %iowait 在internal时间段里 ,硬盘IO等待时间(%) iowait/total*100
  • %irq 在internal时间段里 ,硬中断时间(%) irq/total*100
  • %soft 在internal时间段里 ,软中断时间(%) softirq/total*100
  • %steal 显示虚拟机管理器在服务另一个虚拟处理器时虚拟CPU处在非自愿等待下花费时间的百分比 steal/total*100
  • %guest 显示运行虚拟处理器时CPU花费时间的百分比 guest/total*100
  • %gnice gnice/total*100
  • %idle 在internal时间段里 ,CPU除去等待磁盘IO操作外的因为任何原因而空闲的时间闲置时间(%) idle/total*100
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数