System and processes

The vmstat command

Reports the state of memory, swap, disk I/O and CPU usage in a single table.

Syntax

vmstat [intervalo] [veces]

Most useful options

-sStatistics summary
-wWide format, more readable

Copy-ready examples

$ vmstatSystem state

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • The 'r' column is running processes: if it is steadily high, the CPU is short.

Related commands

FAQ

How does it differ from free?

free only looks at memory; vmstat adds I/O and CPU.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course