Advanced
Package: procps
vmstat
Report virtual memory, process, CPU and I/O statistics.
Syntax
vmstat [interval] [count]
Description
vmstat gives a compact, repeating snapshot of processes, memory, swap activity, I/O and CPU time, making it useful for spotting whether a system is CPU-bound, memory-bound or I/O-bound at a glance.
Examples
vmstat 2 5
Print 5 samples, 2 seconds apart
vmstat -a
Include active/inactive memory columns
vmstat -d
Show per-disk statistics instead of the default summary