๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

๐Ÿ’ก Performance & Debugging April 29, 2026 26

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).

Share this tip