Run vmstat

#=> update every 1 second
$ vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 15  0   2852 46686812 279456 1401196    0    0     0     0    0    0  0  0 100  0
 16  0   2852 46685192 279456 1401196    0    0     0     0 2136 36607 56 33 11  0
 15  0   2852 46685952 279456 1401196    0    0     0    56 2150 36905 54 35 11  0
 15  0   2852 46685960 279456 1401196    0    0     0     0 2173 36645 54 33 13  0
<snip>

Meaning of each field

procs

  • r - processes on run queue (running processes + runnable processes)
  • b - processes in uninterruptible sleep (TASK_UNINTERRUPTIBLE, marked as D in ps command)

memory

  • swpd - virtual memory used (KB) (to be confirmed)
  • free - idle memory (KB)
  • buff - memory used as buffers (KB)
  • cache - memory used as cache (KB)

swap

  • si - memory swapped in from disk (KB/s)
  • so - memory swapped out to disk (KB/s)

io

  • bi - blocks received from a block device (blocks/s)
  • bo - blocks sent to a block device (blocks/s)

system

  • in - interrupts, including the clock (/s)
  • cs - context switches (/s)

cpu

  • us - time spent running non-kernel code (%)
  • sy - time spent running kernel code (%)
  • id - time spent idle (%)
  • wa - time spent waiting for IO (%)