Forrest logo
back to the vmstat tool

vmstat:tldr:cc936

vmstat: Display virtual memory statistics.
$ vmstat
try on your machine

The vmstat command stands for "virtual memory statistics" and is used in Linux and Unix-like operating systems. It provides real-time information about various system resources, including server memory, disk, CPU usage, and process statistics.

When you run the vmstat command without any options or arguments, it displays a summary of the system's virtual memory utilization. The output generally consists of several columns representing different metrics:

  • procs: Shows the number of processes in various states, such as running, sleeping, blocked, or waiting for I/O operations.
  • memory: Displays information about memory usage, including the amount of free, used, and available memory.
  • swap: Provides details about swap space usage, including the amount of swap space used and available.
  • io: Shows input/output statistics, including the number of blocks read from or written to disk.
  • system: Displays general system statistics, such as the number of interrupts, context switches, and system calls.
  • cpu: Provides detailed information about CPU usage and statistics, including the percentage of time spent in user processes, system processes, idle, and the CPU's wait time.

The vmstat command is useful for monitoring system performance, identifying potential bottlenecks, and determining if the system has sufficient resources available. By observing the output regularly, system administrators can understand how the system is functioning and make informed decisions regarding resource allocation and optimization.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the vmstat tool