关于linux:每天学一个-Linux-命令111mpstat-民工哥

4次阅读

共计 796 个字符,预计需要花费 2 分钟才能阅读完成。

命令简介

mpstat(Multi-Processor Statistics)命令用于显示各个可用 CPU 的状态统计。是一个实时监控工具,与 vmstat 相似,但只能监控 CPU 的整体性能状态。

[root@centos7 ~]# mpstat
-bash: mpstat: command not found
[root@centos7 ~]# yum install sysstat -y

语法格局

mpstat [options]

选项阐明

-P  #指定 CPU 编号 

利用举例

列出端口

[root@centos7 ~]# mpstat
Linux 3.10.0-1127.18.2.el7.x86_64 (centos7)     03/28/2021     _x86_64_    (1 CPU)

11:14:29 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
11:14:29 AM  all    1.61    0.00    0.48    0.05    0.00    0.07    0.00    0.00    0.00   97.79

字段阐明

%user      
#在 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
%idle       
#在 internal 时间段里,CPU 除去期待磁盘 IO 操作外的因为任何起因而闲暇的工夫闲置工夫 (%) (idle/total)*100

正文完
 0