The vmstat command

By | April 26, 2016

The vmstat command will provide a report showing statistics for system processes, memory, swap, I/O, and the CPU. These statistics are generated using data from the last time the command was run to the present. In the case of the command never being run, the data will be from the last reboot until the present.

# vmstat
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 181604 17000 26296 201120 0 2 8 24 149 9 61 3 36

The following was taken from the vmstat man page.

r: The number of processes waiting for run time.
b: The number of processes in uninterruptable sleep.
w: The number of processes swapped out but otherwise runnable. This
field is calculated, but Linux never desperation swaps.

swpd: the amount of virtual memory used (kB).
free: the amount of idle memory (kB).
buff: the amount of memory used as buffers (kB).

si: Amount of memory swapped in from disk (kB/s).
so: Amount of memory swapped to disk (kB/s).

bi: Blocks sent to a block device (blocks/s).
bo: Blocks received from a block device (blocks/s).

in: The number of interrupts per second, including the clock.
cs: The number of context switches per second.

These are percentages of total CPU time.
us: user time
sy: system time
id: idle time

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.