Linux and Unix vmstat command

Quick links

About vmstat
Syntax
Examples
Related commands
Linux and Unix main page

About vmstat

Display information about the kernel threads, virtual memory, disks, traps, and CPU activity.

Syntax

vmstat [-V] [-n] [delay [count]]

-VPrint version information.
-ncauses the headers not to be reprinted regularly.
-aprint inactive/active page stats.
-dprints disk statistics
-Dprints disk table
-pprints disk partition statistics
-sprints vm table
-mprints slabinfo
-Sunit size
unit size k:1000 K:1024 m:1000000 M:1048576 (default is K)
delaydelay between updates in seconds.
countnumber of updates.

Examples

vmstat

Running the vmstat command with no extra options would display information similar to the below information.

procs-----------memory-------------swap-------io------system------cpu----
 r  b
 0  0
swpd   free     buff      cache
7412  18872  18044 110132
si   so
0    0
bi    bo
2     7
   in   cs us
   26 22  2
sy id wa
1 96  0

Related commands

df