linux cpu intr s,Linux CPU实时监控命令mpstat介绍

本文详细解读Linux系统中CPU利用率的关键指标,如CPU使用率(user, nice, sys, iowait, irq, soft, steal, idle),以及如何通过/proc/stat获取这些数据。还介绍了每个指标的计算方法和在不同工作状态下的意义。
摘要由CSDN通过智能技术生成

4,字段含义如下

英文解释:

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.

参数解释 从/proc/stat获得数据

CPU 处理器 ID

user 在internal时间段里,用户态的CPU时间(%),不包含 nice值为负 进程 (usr/total)*100

nice 在internal时间段里,nice值为负进程的CPU时间(%)   (nice/total)*100

system 在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

intr/s 在internal时间段里,每秒CPU接收的中断的次数intr/total)*100

CPU总的工作时间=total_cur=user+system+nice+idle+iowait+irq+softirq

total_pre=pre_user+ pre_system+ pre_nice+ pre_idle+ pre_iowait+ pre_irq+ pre_softirq

user=user_cur – user_pre

total=total_cur-total_pre

其中_cur 表示当前值,_pre表示interval时间前的值。上表中的所有值可取到两位小数点。

22/2<12

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值