On Unix-like operating systems, the vmstat command reports virtual memory statistics and is used to help identify performance bottlenecks.
Description
vmstat reports information about processes, memory, paging, block IO, traps, disks and cpu activity.
- Description
- Syntax
- Options
- Field description for VM mode.
- Field description for disk mode.
- Field description for disk partition mode.
- Field description for slab mode.
- Notes
- Files
- Examples
- Related commands
- Linux commands help
The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case.
Syntax
vmstat [options] [delay [count]]
Options
Field description for VM mode
Procs:
Memory:
Swap:
IO:
System:
CPU: (values expressed in percentages of CPU time)
Field description for disk mode
Reads:
Writes:
Field description for disk partition mode
Field description for slab mode
Notes
vmstat does not require special permissions.
Linux vmstat does not count itself as a running process.
All linux blocks are currently 1024 bytes. Old kernels may report blocks as 512 bytes, 2048 bytes, or 4096 bytes.
vmstat lets you choose units: (k, 1000 bytes; K, 1024 bytes; m, 1000000 bytes; M, 1048576 bytes). Default is K in the default mode.
vmstat uses slabinfo 1.1.
Files
/proc/meminfo/proc/stat/proc/*/stat
Examples
vmstat
Displays statistics about system resource usage. Output resembles the following:
procs ———–memory———- —swap– —–io—- -system– —-cpu—- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 9336 128468 238072 342704 0 0 2 11 20 104 6 32 62 0
Related commands
free — Display the amount of free and used memory.iostat — Report CPU and I/O statistics for devices and partitions.ps — Report the status of a process or processes.sar — Display system activity information under Solaris.top — Display a sortable, continually-updated list of processes.