vmstat (virtual memory statistics) is a computer system monitoring tool that collects and displays summary information about operating system memory, processes, interrupts, paging and block I/O. Users of vmstat can specify a sampling interval which permits observing system activity in near-real time.

vmstat [-a] [-n] [-S unit] [delay [ count]] 
vmstat [-s] [-n] [-S unit
vmstat [-m] [-n] [delay [ count]] 
vmstat [-d] [-n] [delay [ count]] 
vmstat [-p disk partition] [-n] [delay [ count]] 
vmstat [-f
vmstat [-V]


-a  :  displays active/inactive memory

-f  : displays the number of forks since boot. It includes the fork, vfork, and clone system calls, and is equivalent to the total number of tasks created. Does not show repeated result.

-m : displays slabinfo.

-n :  displays the header once, rather than periodically.

-s :   displays a table of various event counters and memory statistics. This display does not repeat.

delay : is the delay between updates in seconds. If no delay is specified, only one report is printed with the average values since boot.

count  :  is the number of updates. If no count is specified and delay is defined, count defaults to infinity.

-d : displays the disk statistics  

-p : displays partition name, for detailed statistics  

-S :  followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes

 -V: displays the version information.


1. Procs

r: The number of processes waiting for run time.

b: The number of processes in uninterruptible sleep.


r/b values under “procs” block are either close to 0 or 0 itself.

If counter constantly reports high values, it means that system may not have sufficient CPU or Memory or I/O bandwidth.

2. Memory

swpd: the amount of virtual memory used.

free: the amount of idle memory.

buff: the amount of memory used as buffers.

cache: the amount of memory used as cache.

inact: the amount of inactive memory. (-a option)

active: the amount of active memory. (-a option)

3. Swap

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

so: Amount of memory swapped to disk (/s).


If the value of swpd under the swap is too high and it keeps changing, it means that system is running short of memory

4. IO

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

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

5. System

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

cs: The number of context switches per second.

6. CPU: counts the total % of CPU time.

us: Time spent running non-kernel code.  

sy: Time spent running kernel code.  

id: Time spent idle [IO-wait time].

wa: Time spent waiting for IO(idle).

st: Time stolen from a virtual machine(unknown).


Reads: total, merged, sectors, ms
Writes: total, merged, sectors, ms
IO: cur,s


Was this answer helpful? 0 Users Found This Useful (0 Votes)