Vmstat
The vmstat
(virtual memory statistics) is a built-in monitoring utility in Linux. [1]
The command is used to obtain information about memory, system processes, paging, interrupts, block I/O, disk, and CPU scheduling. Users can observe system activity virtually in real-time by specifying a sampling period.
Output meaning
$ vmstat -n 1
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 22116 182900 35548 378464 0 0 4 3 1 30 0 0 100 0 0
0 0 22116 182904 35548 378480 0 0 0 0 0 44 0 0 100 0 0
0 0 22116 182904 35548 378480 0 0 0 0 2 41 0 0 100 0 0
0 0 22116 182904 35548 378480 0 0 0 0 0 49 0 0 100 0 0
0 0 22116 182904 35548 378480 0 0 0 0 2 45 0 0 100 0 0
0 0 22116 182904 35548 378480 0 0 0 0 0 46 0 0 100 0 0
0 0 22116 182892 35556 378472 0 0 0 20 2 64 0 0 99 1 0
0 0 22116 182896 35556 378480 0 0 0 0 0 44 0 0 100 0 0
Section | Meaning | Notes |
---|---|---|
procs | r – Active process count.
b – Sleeping process count. |
|
memory | swpd – Total virtual memory. The swap space is initially unoccupied. However, the kernel starts using swap space as the system’s physical memory reaches its limit.
free – Total free memory. buff – Total memory temporarily used as a data buffer. cache – Total cache memory |
|
swap | si – The rate of swapping-in memory from disk.
so – The rate of swapping-out memory to disk. |
|
io | bi – Blocks received from a block device per second.
bo – Blocks sent to a block device per second. |
|
system | in – The number of system interrupts.
cs – The number of context switches per second. |
|
cpu | us – The percentage of CPU time spent on non-kernel processes.
sy – The percentage of CPU time spent on kernel processes. id – The percentage of idle CPU. wa – The percentage of CPU time spent waiting for Input/Output. st – The percentage of CPU time stolen by a virtual machine. |
|