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

来源:互联网 发布:德国威能暖气片知乎 编辑:程序博客网 时间:2024/05/22 02:00


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.
              
原创粉丝点击