linux系统监控(七)--- mpstat 详解



1.SYNOPSIS
       mpstat [ -P { cpu | ALL } ] [ -V ] [ interval [ count ] ]
       
2.用法
 mpstat -V  显示mpstat版本信息


 mpstat -P ALL 显示所有CPU信息
 
 mpstat -P n 显示第n个cup信息,n为数字,计数从0开始 
 
 mpstat n m  每个n秒显示一次cpu信息,连续显示m次,最后显示一个平均值
 
 mpstat n    每个n秒显示一次cpu信息,连续显示下去
 
 
组合使用:
 
 mpstat -P ALL 2 3 
 mpstat -P 0  2 3 
 mpstat -P 1  2 
 
 
 3.各个字段含义
 REPORTS
       The report generated by the mpstat command has the following format:


       CPU
              Processor number. The keyword all indicates that statistics are calculated as averages among all processors.
       %user
              Show the percentage of CPU utilization that occurred while executing at the user level (application).
       %nice
              Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.
       %sys
              Show  the  percentage of CPU utilization that occurred while executing at the system level (kernel). Note that
              this does not include time spent servicing interrupts or softirqs.
       %iowait
              Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O
              request.
       %irq
              Show the percentage of time spent by the CPU or CPUs to service interrupts.
       %soft
              Show  the  percentage of time spent by the CPU or CPUs to service softirqs.  A softirq (software interrupt) is
              one of up to 32 enumerated software interrupts which can run on multiple CPUs at once.
       %steal
              Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was ser-
              vicing another virtual processor.
       %idle
              Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O
              request.
       intr/s
              Show the total number of interrupts received per second by the CPU or CPUs.
              
4.EXAMPLES
       mpstat 2 5
              Display five reports of global statistics among all processors at two second intervals.


       mpstat -P ALL 2 5
              Display five reports of statistics for all processors at two second intervals.
              
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值