brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: vmstat 1 5 shows linux CPU, swap and I/O wait in one table

Linux
~/tips/tip-linux-vmstat-one-table

vmstat 1 5

Prints CPU, memory, swap and I/O wait figures once per second.

When a server feels slow I want one table that separates CPU, memory pressure and disk wait.

vmstat 1 5

The first number is the interval in seconds and the second is the number of reports. The first line is an average since boot, so read the lines after it. Look at si and so for swapping, wa for CPU time spent waiting on I/O, and r for tasks waiting for a CPU. A steady non-zero so means memory pressure. A high wa with low us points at storage.

Further reading: vmstat manual page

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link