vmstat to monitor memory usage

vmstat is an acronym for Virtual Meomory Statistics (virtual memory statistics), the real-time dynamic monitoring of the operating system's virtual memory, processes, CPU activity.

vmstat The syntax

  vmstat [-V] [-n] [delay [count]]

  • -V indicates that the print publication of this information;
  • -n represents a periodic cycle at the output, the output of the header information is displayed only once;
  • delay is the delay time between the two outputs;
  • count is the number of statistics in accordance with this time interval.
/root$vmstat 5 5
    procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
    r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
    6  0      0 27900472 204216 28188356    0    0     0     9    1    2 11 14 75  0  0
    9  0      0 27900380 204228 28188360    0    0     0    13 33312 126221 22 20 58  0  0
    2  0      0 27900340 204240 28188364    0    0     0    10 32755 125566 22 20 58  0  0

Field Description

Procs (processes):

  • r: the number of processes in the run queue
  • b: the number of IO waiting process

Memory (RAM):

  • swpd: virtual memory size
  • free: the size of available memory
  • buff: a buffer memory size as
  • cache: as a cache memory size

Swap:

  • si: writes per second from the swap memory size
  • so: writing memory size per exchange zone

IO :( Linux version of the block size is now 1024bytes)

  • bi: number of blocks read per second
  • bo: number of blocks written per second

system:

  • in: the number of interrupts per second, including the clock interrupt
  • cs: the number of context switches per second

CPU (percentage)

  • us: user process execution time (user time)
  • sy: system process execution time (system time)
  • id: idle time (including IO wait time)
  • wa: IO wait time

Guess you like

Origin www.cnblogs.com/wuxingwang/p/12145005.html