Linux Command: vmstat
Report virtual memory, CPU, and I/O statistics sampled over time
Terminal โ Performance & Debugging
Command
$
vmstat 2 5
Output
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 2145632 89432 512340 0 0 45 128 542 1023 3 1 95 1 0
vmstat 2 5 samples system metrics every 2 seconds, 5 times. Key columns: r (runnable procs โ should be โค CPU count), si/so (swap in/out โ should be 0), us/sy/id/wa (CPU breakdown; high wa = disk bottleneck).