zoukankan      html  css  js  c++  java
  • mpstat

    mpstat功能说明:CPU信息统计
    mpstat 是Multiprocessor Statistics的缩写,是一种实时系统监控工具。mpstat命令会输出CPU的一些统计信息,这些信息存放在/proc/stat文件中。
    在多CPU的系统里,此命令不但能用来查看所有CPU的平均状况信息,而且还能够用来查看特定CPU的信息。
    mpstat命令的最大特点是:可以查看多核心CPU中每个计算核心的统计数据,而类似命令vmstat只能查看系统整体的CPU情况。
    
    语法格式:
    mpstat [option] [delay [count]]
    
    
    参数选项
    -P      指定CPU编号
    例如:
    -P 0表示第一个CPU
    -P 1表示第二个CPU
    -P ALL表示所有CPU
    
    
    范例:显示CPU信息统计。
    [root@testdb62 ~]# mpstat
    Linux 3.10.0-1062.el7.x86_64 (testdb62)     12/28/2020     _x86_64_    (4 CPU)
    
    11:08:33 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
    11:08:33 AM  all    0.10    0.00    0.07    0.02    0.00    0.00    0.00    0.00    0.00   99.82
    
    
    [root@testdb62 ~]# mpstat 5 6
    Linux 3.10.0-1062.el7.x86_64 (testdb62)     12/28/2020     _x86_64_    (4 CPU)
    
    11:08:46 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
    11:08:51 AM  all    0.40    0.00    0.30    0.00    0.00    0.00    0.00    0.00    0.00   99.30
    11:08:56 AM  all    0.40    0.00    0.35    0.00    0.00    0.00    0.00    0.00    0.00   99.25
    11:09:01 AM  all    0.50    0.00    0.30    0.00    0.00    0.00    0.00    0.00    0.00   99.20
    11:09:06 AM  all    0.40    0.00    0.40    0.00    0.00    0.00    0.00    0.00    0.00   99.20
    11:09:11 AM  all    0.35    0.00    0.30    0.00    0.00    0.00    0.00    0.00    0.00   99.35
    11:09:16 AM  all    0.35    0.00    0.40    0.00    0.00    0.00    0.00    0.00    0.00   99.25
    Average:     all    0.40    0.00    0.34    0.00    0.00    0.00    0.00    0.00    0.00   99.26
    
    
    以下是命令结果的详细说明。
    
    第1列:表示当前时间。
    第2列:CPU,all表示所有CPU,0表示第一个CPU……
    
    后面9列的含义分别如下
    %usr:用户进程消耗的CPU时间百分比。
    %nice:改变过优先级的进程占用的CPU时间百分比。
    %sys:系统(内核)进程消耗的CPU时间百分比。
    %iowait:I0等待所占用的CPU时间百分比。
    %irq:硬中断占用的CPU时间百分比。
    %soft:软中断占用的CPU时间百分比。
    %steal:虚拟机强制CPU等待的时间百分比。
    %guest:虚拟机占用CPU时间的百分比。
    %idle:CPU处在空闲状态的时间百分比。
    
    
    
    
    范例:显示指定CPU信息的统计。
    [root@testdb62 ~]# mpstat -P 0
    Linux 3.10.0-1062.el7.x86_64 (testdb62)     12/28/2020     _x86_64_    (4 CPU)
    
    11:10:02 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
    11:10:02 AM    0    0.09    0.00    0.06    0.02    0.00    0.00    0.00    0.00    0.00   99.83



  • 相关阅读:
    update 大表
    Lazy Writer&CheckPoint
    SQLServer查看登录名和数据库的用户名的映射
    SQL Server Replication出现的错误:The process could not execute 'sp_replcmds' on 'WASYGSHA02-0186'.
    execute as login 切换上下文
    IOS开发-懒加载延迟加载-图片浏览器实例
    IOS开发-代码创建UI控件并修改控件属性(代码创建UIButton、UILabel)
    IOS开发-常用UI控件的基本使用(Transform形变属性、frame属性、center属性的使用)
    IOS开发-UI控件的常见属性
    IOS开发-UIView(视图)与UIViewController(视图控制器)
  • 原文地址:https://www.cnblogs.com/l10n/p/14200617.html
Copyright © 2011-2022 走看看