7. Using Monitoring and Tracing Tools : Operating System Utilities : UNIX Operating System Utilities : vmstat
 
Share this page                  
vmstat
The vmstat (Virtual Memory Statistics) command returns virtual memory status information, including process states and paging activity. Here is a sample vmstat output:
procs      memory           page     disk      faults    cpu
r b w avm  fre di  re rd pi po de z0 z1 z2 z3 in sy cs us sy id
1 0 0 2536 456 24  2  1  4  0  0  1  1  0  1 24 475 23  4  6 91
0 0 0 2748 356 24  0  0  0  0  0  2  0  0  3 26 323 29  1  5 95
0 0 0 1044 344 24  0  0  0  0  0  0  0  0  0 16 216 18  0  3 97
0 0 0 2288 344 24  0  0  0  0  0  0  0  0  0 19 334 27  1  4 95
1 0 0 2372 332 24  0  0  4  0  0  0  0  0  1 28 552 40  1  6 93
The procs columns define the process states: in run queue (r), blocked for resources (b), and runnable or short sleeper (w).
The memory columns show virtual and real memory status: avm is active virtual pages (belonging to processes active in approximately the last 20 seconds), fre is size of the free list, and di is the number of dirty pages.
The page columns show page faults and paging activity. These are expressed in units per second, averaged over 5 seconds: re are page reclaims, rd are page reclaims from the dirty list, and pi, po are pages paged in/out. The de field is anticipated short-term memory shortfall.
The disk columns list disk activity, showing the device name and operations per second.