Skip to content

Understand more about vmstat

Updated 2 min read

Updated: 22 October 2026 · Applies to: procps-ng vmstat, any Linux distribution

vmstat (virtual memory statistics) reports a summary of memory, processes, interrupts, paging and block I/O. Give it a delay (in seconds) to sample system activity repeatedly instead of once.

vmstat [-a] [-n] [-S unit] [delay [count]]
vmstat [-s] [-n] [-S unit]
vmstat [-m] [-n] [delay [count]]
vmstat [-d] [-n] [delay [count]]
vmstat [-p disk_partition] [-n] [delay [count]]
vmstat [-f]
vmstat [-V]

Options

  • -a: show active and inactive memory.
  • -f: show the number of forks since boot (fork, vfork and clone calls combined). Does not repeat.
  • -m: show slab info.
  • -n: print the header once instead of before every sample.
  • -s: show a table of event counters and memory statistics. Does not repeat.
  • -d: show disk statistics.
  • -p partition: show detailed statistics for one partition.
  • -S k|K|m|M: display units in 1000, 1024, 1,000,000 or 1,048,576 bytes.
  • -V: show version information.
  • delay: seconds between updates. Without it, one report is printed using the average since boot.
  • count: number of updates to print. If delay is set but count is not, it repeats indefinitely.

Field descriptions

Procs

  • r: processes waiting for run time.
  • b: processes in uninterruptible sleep.

Both r and b are normally close to 0. A consistently high value means the system does not have enough CPU, memory or I/O bandwidth.

Memory

  • swpd: virtual memory used.
  • free: idle memory.
  • buff: memory used as buffers.
  • cache: memory used as cache.
  • inact: inactive memory (with -a).
  • active: active memory (with -a).

Swap

  • si: memory swapped in from disk, per second.
  • so: memory swapped out to disk, per second.

A swpd value that stays high and keeps changing means the system is running short of memory.

IO

  • bi: blocks received from a block device, per second.
  • bo: blocks sent to a block device, per second.

System

  • in: interrupts per second, including the clock.
  • cs: context switches per second.

CPU (percentage of total CPU time)

  • us: time running non-kernel (user) code.
  • sy: time running kernel code.
  • id: time idle.
  • wa: time waiting for I/O.
  • st: time stolen by the hypervisor, on a virtual machine.

Disk mode (-d)

  • reads/writes: total, merged, sectors, and milliseconds spent.
  • io: current I/O in progress, and seconds spent on I/O.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket