Linux - Vmstat (Virtual memory statistics)

> Operating System - Kernel (Windows, Unix, Linux) > Linux / Unix

1 - About

vmstat (Virtual Memory Stats) reports virtual memory statistics.

It shows:

  • how much virtual memory there is,
  • how much is free and paging activity.

Most important, you can observe page-ins and page-outs as they happen.

Using this resource monitor, it is possible to get an overview of process, memory, swap, I/O, system, and CPU activity.

3 - Syntax

The process-related fields are:

  • r — The number of runnable processes waiting for access to the CPU
  • b — The number of processes in an uninterruptible sleep state
  • w — The number of processes swapped out, but runnable

The memory-related fields are:

  • swpd — The amount of virtual memory used
  • free — The amount of free memory
  • buff — The amount of memory used for buffers
  • cache — The amount of memory used as page cache

The swap-related fields are:

  • si — The amount of memory swapped in from disk
  • so — The amount of memory swapped out to disk

The I/O-related fields are:

  • bi — Blocks sent to a block device
  • bo— Blocks received from a block device

The system-related fields are:

  • in — The number of interrupts per second
  • cs — The number of context switches per second

The CPU-related fields are:

  • us — The percentage of the time the CPU ran user-level code
  • sy — The percentage of the time the CPU ran system-level code
  • id — The percentage of the time the CPU was idle
Advertising
os/linux/vmstat.txt · Last modified: 2018/12/14 18:18 by 108.162.237.68