vmstat
vmstat reports information about memory, paging, processes, disks, block IO, CPU activitiy, and traps.Installation
When vmstat is not installed by default, it can be added to the system using the relevant software package.
Package information for vmstat
Operating system | Package name | Installation |
---|---|---|
AlmaLinux | procps-ng |
|
Arch Linux | procps-ng |
|
Debian | procps |
|
Fedora | procps-ng |
|
Red Hat Enterprise Linux | procps-ng |
|
Rocky Linux | procps-ng |
|
Ubuntu | procps |
|
Your Linux distribution using a different package? Share your feedback.
Usage
Available options
Short option | Long option | Description |
---|---|---|
-a | --active | Active and inactive memory |
-f | --forks | Number of forks since boot |
-m | --slabs | Slab information |
-n | --one-header | Header displayed once |
-s | --stats | Event counters and memory statistics |
-d | --disk | Disk statistics |
-D | --disk-sum | Disk activitiy summary |
-p | --partition device | Statistics about partition |
-S | --unit character | Change output unit (k=1000, K=1024, m=1000000, M=1048576) |
-t | --timestamp | Include timestamp with each line |
-w | --wide | Wide output, useful when output does not fit |
-v | --version | Version information |
-h | --help | Display help |
Missing an option in this overview? Share your feedback.
Relevant articles using the vmstat command
The following articles include an example on how to use vmstat and might be worth further exploring.