Index Index for
Section 1
Index Alphabetical
listing for V
Bottom of page Bottom of
page

vmstat(1)

NAME

vmstat - Displays virtual memory statistics

SYNOPSIS

vmstat interval [count] vmstat [-D | -f | -i | -M | -p | -P | -r rad_id | -R | -s | -w] The vmstat command displays system statistics for virtual memory, processes, trap, and CPU activity.

OPTIONS

-D Displays debugging information if kmem_debug is set. -f Displays only statistics about the number of forks since system startup (see the fork() call). -i Displays the following virtual memory statistics: # vmstat -i Virtual Memory Statistics: (pagesize = 8192) procs memory pages intr cpu r w u act free wire fault cow zero react pin pout in sy cs us sy id 2 82 29 23K 12K 4906 3M 963K 834K 620 710K 0 73 30 391 0 2 98 -M Displays information about memory usage by buckets. This information can be used for kernel debugging. -p Displays statistics for the vm and ubc subsystems for all Resource Affinity Domains (RADs). The following virtual memory (VM) information is included in the display output: VM faults All VM page faults. VM kfaults Kernel page faults. VM cowcopy Copy on write optimization missed, page copied. VM kzfod Kernel zero filled on demand. VM pagesteal Page allocations resulting in a page steal. VM prewrites Total count of pre-written pages. VM anon_prewrites Count of prewritten anonymous object pages. VM swap_prewrites Count of prewritten swap object pages. VM cleanrecs Pages freed that are clean and reclaimable. VM swaprecs Swap write reclaims. VM lmsteal Page allocations resulting in a page steal. VM lmstealwins Page steal wins. VM ffl Faults from the free list. VM pout_scan VM_pageout_scan calls. VM pout_pagescan VM_pageout_scan pages scanned. VM pout_call Pageout calls made. VM pout Successful pageouts. VM pout_target Pageout target met. VM pout_burst Pageout I/O met. VM act_scans Active pages scanned while replenishing the least recently used (LRU) list VM act_moves Active pages moved to the inactive list. VM lock_fails Failed loop lock tries during LRU processing. VM migrations Pages migrated to a new resource affinity domain (RAD). VM TOT cowfaults Total copy on write part of all faults. VM TOT zfod Total user zero filled on demand. VM TOT iowrites Total I/O writes. VM TOT pgwrites Total page writes. VM TOT ioreads Total I/O reads. VM TOT pgreads Total page reads. VM TOT reactivate Total ages returned to the active list (reactivated). The Unified Buffer Cache (UBC) data fields displayed when using the -p option are as follows: UBC allocscans Page allocation resulting in a least recently used (LRU) scan. UBC alloceol The LRU scan has reached the end of list. UBC allocpush The number of LRU scan pushed pages. UBC allocstole The LRU scan stolen page allocation. UBC allocseq The number of page steal sequential drain attempts. UBC wacalls The number of LRU write ahead calls. UBC wascans The number of LRU write ahead scans. UBC waeol The LRU write ahead scan has hit the end of the list. UBC prges The number of LRU purge calls. UBC prgscans The number of LRU purge scans. UBC prgeol The LRU purge scan has hit the end of the list. UBC prgburst The LRU purge scan I/O target was met. UBC prgfree The number of LRU purge scan pages freed. UBC mmapfree The number of UBC mmaped pages freed. UBC wdeny The number of file system denied writes. UBC hardsteals The number of pagesteal required I/O and waits. UBC stealscans The number of pagesteal scans. UBC dirtywra The number of dirty write aheads. UBC reclaim The number of pages freed that are clean and reclaimable. UBC pagesteal The number of page allocations resulting in a page steal. UBC lookups The number of lookup tries. UBC lookuphits The number of lookup hits. UBC ffl The number of faults from the free list. UBC lmsteal The number of low memory steals UBC lmstealwins The number of low memory steal wins. UBC seqdrain The number of sequential drains. UBC TOT alloc The total memory demand on UBC. UBC TOT reactivate The total referenced LRU pages. UBC TOT iowrites The total I/O issued. UBC TOT pgwrites The total number of pages written. -P Displays the following accumulated statistics about physical memory use: Total Physical Memory Sum of the total physical memory in the machine. Physical Memory Clusters This statistic describes how physical memory is clustered. It shows where memory is being used (pal, os, and nvram), the starting and ending pageframes, and the total amount of memory used. Physical Memory Use This statistic shows a breakdown of physical memory used by the operating system (such as text, data, and bss). It contains the starting and ending pageframes, memory usage per category, and total memory used. Managed Pages Break Down This statistic provides a snapshot of where managed physical memory resides when the vmstat command was run. It indicates the number of pages in the free, active, and inactive queues, the number of wired pages, and the number of pages held in the unified buffer cache (UBC). WIRED Pages Break Down This statistic describes the physical pages that are wired in memory. The fields show the number of wired pages in anonymous (vm) memory, the UBC, pages used for meta data, the kernel malloc pools, contiguous memory, and pages used for page table entries (ptes). The display typically shows: · vm and ubc wired pages · meta data, malloc, and contig pages · user, kernel, and free ptepages -r rad_id Displays virtual memory statistics for the specified Resource Affinity Domain (RAD) only. The rad_id is an integer assigned automatically by the system. Process (procs) data fields displayed when you use the -r option are as follows: · RAD - Resource Affinity Domain identifier (integer) · r - Number of threads that are running or are runnable · w - Number of threads that can be interrupted that are waiting · u - Number of threads that cannot be interrupted that are waiting · st - Number of stopped threads · sw - Number of swapped threads Memory data fields displayed when you use the -r option are as follows: · actv - Total number of pages on the active list. · actu - Number of active vm pages. · acti - Number of inactive vm pages. · free - Total number of pages that are clean and available for use. · wire - Total number of wired pages. · wirv - Number of wired vm pages. · wiru - Number of wired UBC pages. Because of a restriction on the display space, the contents of some fields are truncated rather than rounded up. -R Displays information for all RADs. Typical output is shown under the -r option. -s Displays the following accumulated statistics along with the page size: active pages Total number of pages that are currently in use but can be used for paging. inactive pages Total number of VM pages that are allocated but are most likely to be used for paging. free pages Total number of unreferenced (clean) pages that are available for use. wired pages Total number of pages that are currently in use and cannot be used for paging (not a real list). virtual memory page faults Number of address translation faults that have occurred. copy-on-write page faults Number of copy-on-write page faults, which occur if the requested page is shared by a parent process and one or more child processes (using the fork function), and if one of the processes needs to modify the page. In this case, VM loads a new address into the translation buffer and copies the contents of the requested page into the new address for modification by the process. zero file page faults Number of zero-filled-on-demand page faults, which occur if VM cannot find the page in the internal data structures and if the requested page is new and has never been referenced. In this case, VM initializes a physical page (the contents of the page are zeroed out) and loads the address into the page table. reattaches from reclaim list Number of pages that have been faulted while on the inactive list. pages paged in Number of requests for pages from a pager. pages paged out Number of pages that have been paged out. task and thread context switches Number of task and thread context switches. device interrupts Number of nonclock device interrupts. system calls Number of system calls called. -w Appends iowait information to the default output as follows: Virtual Memory Statistics: (pagesize = 8192) procs memory pages intr cpu r w u act free wire fault cow pin pout in sy cs us sy id iowait 2 82 29 23K 12K 4905 3M 963K 710K 0 73 30 391 0 2 98 0

DESCRIPTION

Use the vmstat command to display statistics which describe how virtual memory is used. To cause the vmstat command to display statistics at the specified interval, specify a time in seconds for the optional interval parameter. The first report generated by the vmstat command includes statistics for the time since the last reboot. Each subsequent report is for the specified interval only. To control the number of reports generated, specify a value for the count parameter after the interval parameter. For example, the command vmstat 1 10 produces 10 reports at 1-second intervals. You cannot specify a value for the count parameter without also specifying a value for the interval parameter because the first numeric argument to vmstat is always assumed to be interval. At any time, system memory can be in use by the kernel as follows: · kseg -- In use by kseg · UBC - In use by the unified buffer cache · wired - Pages that are currently in use and cannot be used for paging · On the active list - Pages that are currently in use but can be used for paging · On the inactive list - Pages that are allocated but are most likely to be used for paging · On the free list - Pages that are clean and available for use The vmstat command does not report on the memory in kseg and memory used by the UBC. The following values are displayed: Process information: r Number of threads that are running or are runnable. w Number of threads waiting interruptibly. u Number of threads waiting uninterruptibly. Virtual memory information: act Total number of pages on the active list, the inactive list (pages that are allocated but are most likely to be used for paging), and UBC least recently used (LRU) list. free Total number of pages that are clean and available for use. wire Total number of pages that are currently in use and cannot be used for paging (not a real list). fault Number of address translation faults that have occurred. cow Number of copy-on-write page faults, which occur if the requested page is shared by a parent process and one or more child processes (using the fork function) and if one of the processes needs to modify the page. In this case, VM loads a new address into the translation buffer and copies the contents of the requested page into the new address for modification by the process. zero Number of zero-filled-on-demand page faults, which occur if VM cannot find the page in the internal data structures and if the requested page is new and has never been referenced. In this case, VM initializes a physical page (the contents of the page are zeroed out) and loads the address into the page table. react Number of pages that have been faulted while on the inactive list. pin Number of requests for pages from a pager. pout Number of pages that have been paged out. Interrupt information: in Number of nonclock device interrupts per second. sy Number of system calls called per second. cs Number of task and thread context switches per second. CPU information: us Percentage of user time for normal and priority processes. sy Percentage of system time. id Percentage of idle time. iowait Percentage of iowait. If the -w option is not specified, the iowait time is included in the id statistic. Specify -f to display fork statistics only. Specify -s for a single display of accumulated statistics, as well as page size.

EXAMPLES

1. The following is an example of the typical output (derived from a single-RAD, single-CPU server) when using the -p option: # vmstat -p Total RADs: 1 Total CPUs: 1 Total Ticks: 512 36441297 VM faults 1677 VM kfaults 2115850 VM cowcopy 1677 VM kzfod 0 VM pagesteal 0 VM prewrites 0 VM anon_prewrites 0 VM swap_prewrites 0 VM cleanrecs 0 VM swaprecs 0 VM lmsteal 0 VM lmstealwins 0 VM ffl 0 VM pout_scan 0 VM pout_pagescan 0 VM pout_call 0 VM pout 0 VM pout_target 0 VM pout_burst 12548 VM act_scans 12548 VM act_moves 0 VM lock_fails 0 VM migrations 2547665 VM TOT cowfaults 3813949 VM TOT zfod 0 VM TOT iowrites 0 VM TOT pgwrites 26823910 VM TOT ioreads 0 VM TOT pgreads 1423 VM TOT reactivate 0 UBC allocscans 0 UBC alloceol 0 UBC allocpush 0 UBC allocstole 0 UBC allocseq 0 UBC wacalls 0 UBC wascans 0 UBC waeol 0 UBC prges 0 UBC prgscans 0 UBC prgeol 0 UBC prgburst 0 UBC prgfree 0 UBC mmapfree 79566 UBC wdeny 0 UBC hardsteals 0 UBC stealscans 0 UBC dirtywra 0 UBC reclaim 0 UBC pagesteal 42127497 UBC lookups 41985615 UBC lookuphits 0 UBC ffl 0 UBC lmsteal 0 UBC lmstealwins 0 UBC seqdrain 144957 UBC TOT alloc 0 UBC TOT iowrites 0 UBC TOT reactivate 0 UBC TOT pgwrites 2. The following is an example of typical output (reformatted for ease of reference) when you use the -r option: # vmstat -r 0 Virtual Memory Statistics: (pagesize = 8192) procs memory pages RAD r w u st sw act actv actu acti free wire wirv wiru fault 0 2 157 27 0 0 31K 4928 18K 8813 24K 6544 3015 0 36M intr cpu cow zero react pin pout in sy cs us sy id 2M 3M 1423 26M 0 102 249 229 0 1 99

SEE ALSO

Commands: iostat(1), sysman(8)

Index Index for
Section 1
Index Alphabetical
listing for V
Top of page Top of
page