vmstat

说明

输出列说明

类别
列名
说明

process

r

The number of processes waiting for a runtime

b

The number of processes in uninterruptible sleep

memory

swpd

The amount of memory currently used in swap spaces

free

The amount of idle (immediately available) memory

buff

The amount of memory used as buffers

cache

The amount of memory used as the cache

swap

si

Pages of memory swapped in per second

so

Pages of memory swapped out per second

io

bi

Blocks per second received from block devices

bo

Blocks per second sent to block devices

system

in

Interrupts raised per second

cs

Context switches per second

cpu

us

Percentage of time spent running user-space code

sy

Percentage of time spent running kernel-space Code

id

Percentage of time spent idle

wa

Percentage of time spent blocked while waiting for I/O to complete

st

Percentage of time where the CPU had a process ready to run, but CPU time was stolen by the hypervisor supporting this virtual machine (typically because the CPU is being used by another guest virtual machine)

使用示例

输出单位修改

输出结果中默认是以 KiB 为单位,-S 选项修改输出结果的单位为KB、MB、MiB,-S k | -S m | -S M

Switches outputs between 1000 (k), 1024 (K), 1000000 (m), or 1048576 (M) bytes

输出结果前两行是头信息,第三行是平均值,第四行开始是我们需要的信息

Last updated