The vmstat command is often overlooked or forgotten by administrators of Linux machines while it contains some nuggets of information otherwise hard to obtain... The vmstat command can provide you with IO blocks sent/received, context switches per second (not to long ago we had a server doing 10000+ context switches due to a software bug, by using vmstat we were able to determine we weren't going insane...), interrupts per second etc
procs -----------memory---------- ---swap-- -----io---- -system--
r b swpd free buff cache si so bi bo in cs us sy
0 0 0 157312 7832 1034456 0 0 420 358 650 347 7
4 83 7
From the vmstat man page, for translating the fields returned above to
r: The number of processes waiting for run time.
b: The number of processes in uninterruptible sleep.
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)
si: Amount of memory swapped in from disk (/s).
so: Amount of memory swapped to disk (/s).
bi: Blocks received from a block device (blocks/s).
bo: Blocks sent to 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: Time spent running non-kernel code. (user time, including
sy: Time spent running kernel code. (system time)
id: Time spent idle. Prior to Linux 2.5.41, this includes
wa: Time spent waiting for IO. Prior to Linux 2.5.41, included
st: Time stolen from a virtual machine. Prior to Linux 2.6.11,