Back to the command reference

vmstat

ProcessesAdvanced In real Linux

Report memory, process and CPU statistics

Name: vmstat = virtual memory statistics

This command needs a real Linux system; you can practise it in real Linux mode.

Description

vmstat reports statistics on processes, memory, swap, block I/O and CPU. Given an interval it keeps printing, which shows how load changes over time. Note that the first line is an average since boot.

Syntax

vmstat [OPTION] [DELAY [COUNT]]

Common options

DELAY COUNTInterval in seconds and number of reports
-w / --wideWide output (big numbers do not run together)
-t / --timestampAdd a time to each line
-S / --unit UNITUnit: k, K, m or M (-S M shows MiB)
-a / --activeShow active and inactive memory
-d / --diskDisk read and write statistics
-s / --statsMemory statistics summary

Examples

  • $ vmstat 1 5

    Every second, 5 times

    Explain

Related