subscribe iconSubscribe to this information

vmstat command

Purpose

Reports statistics about kernel threads, virtual memory, disks, traps, and processor activity.

Syntax

To report virtual memory statistics:

vmstat [ -f ] [-i ][-s ][-I ][-t ][-v ][-w ][-l ][{-p| -P| } pagesize | ALL ] ALL] [PhysicalVolume...] [Interval [Count ] ]

Description

The vmstat command reports statistics about kernel threads, virtual memory, disks, traps and CPU activity. Reports generated by the vmstat command can be used to balance system load activity. These system-wide statistics (among all processors) are calculated as averages for values expressed as percentages, and as sums otherwise.

Flags

-f Reports the number of forks since system startup.
-i Displays the number of interrupts taken by each device since system startup.
Note: The -I, -t, -w, and -l flags are ignored when they are specified with the -i flag.
-s Writes to standard output the contents of the sum structure, which contains an absolute count of paging events since system initialization. The -s flag can only be used with the -v flag. These events are described as follows:
address translation faults
Incremented for each occurrence of an address translation page fault. I/O may or may not be required to resolve the page fault. Storage protection page faults (lock misses) are not included in this count.
page ins
Incremented for each page read in by the virtual memory manager. The count is incremented for page ins from page space and file space. Along with the page out statistic, this represents the total amount of real I/O initiated by the virtual memory manager.
 
page outs
Incremented for each page written out by the virtual memory manager. The count is incremented for page outs to page space and for page outs to file space. Along with the page in statistic, this represents the total amount of real I/O initiated by the virtual memory manager.
paging space page ins
Incremented for VMM initiated page ins from paging space only.
 
total reclaims
Incremented when an address translation fault can be satisfied without initiating a new I/O request. This can occur if the page has been previously requested by VMM, but the I/O has not yet completed; or if the page was pre-fetched by VMM's read-ahead algorithm, but was hidden from the faulting segment; or if the page has been put on the free list and has not yet been reused
zero-filled page faults
Incremented if the page fault is to working storage and can be satisfied by assigning a frame and zero-filling it.
executable-filled page faults
Incremented for each instruction page fault.
 
pages examined by the clock
VMM uses a clock-algorithm to implement a pseudo least recently used (lru) page replacement scheme. Pages are aged by being examined by the clock. This count is incremented for each page examined by the clock.
revolutions of the clock hand
Incremented for each VMM clock revolution (that is, after each complete scan of memory).
pages freed by the clock
Incremented for each page the clock algorithm selects to free from real memory.
 
backtracks
Incremented for each page fault that occurs while resolving a previous page fault.
free frame waits
Incremented each time a process is waited by VMM while free frames are gathered.
extend XPT waits
Incremented each time a process is waited by VMM due to a commit in progress for the segment being accessed.
-s (continued)
pending I/O waits
Incremented each time a process is waited by VMM for a page-in I/O to complete.
start I/Os
Incremented for each read or write I/O request initiated by VMM. This count should equal the sum of page-ins and page-outs.
iodones
Incremented at the completion of each VMM I/O request.
 
CPU context switches
Incremented for each CPU context switch (dispatch of a new process).
device interrupts
Incremented on each hardware interrupt
software interrupts
Incremented on each software interrupt. A software interrupt is a machine instruction similar to a hardware interrupt that saves some state and branches to a service routine. System calls are implemented with software interrupt instructions that branch to the system call handler routine.
 
decrementer interrupts
Incremented on each decrementer interrupt.
mpc send interrupts
Incremented on each mpc send interrupt
mpc receive interrupts
Incremented on each mpc receive interrupt
 
phanton interrupts
Incremented on each phantom interrupt
traps
Not maintained by the operating system.
syscalls
Incremented for each system call.
-I Displays I/O oriented view with the new columns of output, p under heading kthr,and columns fi and fo under heading page instead of the columns re and cy in the page heading.
-t Prints the time-stamp next to each line of output of vmstat. The time-stamp is displayed in theHH:MM:SS format.
Note: Time stamp will not be printed if -f, -s, or -i flags are specified.
-v Writes to standard output various statistics maintained by the Virtual Memory Manager. The -v flag can only be used with the -s flag. Possible values:
memory pages
Size of real memory in number of 4 KB pages.
lruable pages
Number of 4 KB pages considered for replacement. This number excludes the pages used for VMM internal pages, and the pages used for the pinned part of the kernel text.
 
free pages
Number of free 4 KB pages.
memory pools
Tuning parameter (managed using vmo) specifying the number of memory pools.
pinned pages
Number of pinned 4 KB pages
 
maxpin percentage
Tuning parameter (managed using vmo) specifying the percentage of real memory which can be pinned.
minperm percentage
Tuning parameter (managed using vmo) in percentage of real memory. This specifies the point below which file pages are protected from the re-page algorithm.
maxperm percentage
Tuning parameter (managed using vmo) in percentage of real memory. This specifies the point above which the page stealing algorithm steals only file pages.
 
numperm percentage
Percentage of memory currently used by the file cache.
file pages
Number of 4 KB pages currently used by the file cache.
compressed percentage
Percentage of memory used by compressed pages.
 
compressed pages
Number of compressed memory pages.
numclient percentage
Percentage of memory occupied by client pages.
maxclient percentage
Tuning parameter (managed using vmo) specifying the maximum percentage of memory which can be used for client pages.
-v (continued)
client pages
Number of client pages.
 
remote pageouts scheduled
Number of pageouts scheduled for the client file systems.
pending disk I/Os blocked with no pbuf
Number of pending disk I/O requests blocked because no pbuf was available. Pbufs are pinned memory buffers used to hold I/O requests at the logical volume manager layer.
paging space I/Os blocked with no psbuf
Number of paging space I/O requests blocked because no psbuf was available. Psbufs are pinned memory buffers used to hold I/O requests at the virtual memory manager layer.
 
filesystem I/Os blocked with no fsbuf
Number of file system I/O requests blocked because no fsbuf was available. Fsbuf are pinned memory buffers used to hold I/O requests in the file system layer.
client filesystem I/Os blocked with no fsbuf
Number of client file system I/O requests blocked because no fsbuf was available. NFS (Network File System) and VxFS (Veritas) are client file systems. Fsbuf are pinned memory buffers used to hold I/O requests in the file system layer.
external pager filesystem I/Os blocked with no fsbuf
Number of external pager client file system I/O requests blocked because no fsbuf was available. JFS2 is an external pager client file system. Fsbuf are pinned memory buffers used to hold I/O requests in the file system layer.
-w Display the report in wide mode
-l Displays an additional "large-page" section with the alp and flp columns.
-p pagesize Appends the VMM statistics for the specified page size to the regular vmstat output.
-P pagesize Displays only the VMM statistics which are relevant for the specified page size.
Interval Specifies the amount of time in seconds between each report.
Count Determines the number of reports generated and the number of seconds apart.

Exit Status

The following exit values are returned:
0 Successful completion.
>0 Invalid flag, argument, or command failure

Examples

  1. To display a summary of the statistics since boot, type: :
    vmstat
  2. To display five summaries at 2-second intervals, type:
    vmstat 2 5
  3. To display a summary of the statistics since boot including statistics for logical disks hdisk1 and hdisk2, type
    vmstat hdisk1 hdisk2
  4. To display fork statistics, type:
    vmstat -f
  5. To display the count of various events, type:
    vmstat -s
  6. To display time-stamp next to each column of output of vmstat, type:
    vmstat -t
  7. To display the I/O oriented view with an alternative set of columns, type:
    vmstat -I 
  8. To display all the VMM statistics available, type:
    vmstat -v -s
  9. To display the large-page section with the alp and flp columns at 8-second intervals, type:
    vmstat -l 8
  10. To display the VMM statistics specific to a particular page size (in the example, 4K), type:
    vmstat -p 4K
  11. To display the VMM statistics for all page sizes that are supported on the system, type:
    vmstat -p ALL 
    or
    vmstat -p all
  12. To display only the VMM statistics for a particular page size (in this example, 4K), type:
    vmstat -P 4K
  13. To display only the per-page breakdown of VMM statistics for all supported page sizes, type:
    vmstat -P ALL
    or
    vmstat -P all

Send feedback | Rate this page

Last updated: Fri, Oct 30, 2009