Tuesday 7 February 2012

The Linux vmstat Command

vmstat  stands for system activity, hardware and system information, The command vmstat reports virtual memory information about processes, memory, paging, block IO, traps, and cpu activity.

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

-V      Print version information.
-n       causes the headers not to be reprinted regularly.
-a       print inactive/active page stats.
-d       prints disk statistics
-D      prints disk table
-p       prints disk partition statistics
-s       prints vm table
-m      prints slabinfo
-S      unit size(unit size k:1000 K:1024 m:1000000 M:1048576 (default is K))
delay    delay between updates in seconds.
count     number of updates.

Field Description


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. 


swpd    the amount of virtual memory used (kB).
free      the amount of idle memory (kB).
buff      the amount of memory used as buffers (kB).
cache   the amount of memory used as cache (kB).
inact     the amount of inactive memory. (-a option)
active   the amount of active memory. (-a option)


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
wa  time spent waiting for IO. included n idle time.
st    time stolen from a virtual machine.

No comments:

Post a Comment