Command reference-vmstat command

Source: Internet
Author: User
Vmstat command

Purpose

Reports virtual memory statistics.

Syntax

Vmstat [-F] [-I] [-S] [-I] [-T] [-V] [physicalvolume...] [interval [count]

Description

Vmstat Command reports aboutKernelStatistics on threads, virtual memory, disks, traps, and CPU activity. Reports generated by the vmstat command can be used to balance system load activities. The statistical information within the system range (in all processors) calculates the average value in percentage or calculates its sum.

If the vmstat command is called without a flag, the report contains a summary of the virtual memory activity after the system starts. If the-F flag is specified, the vmstat Command reports the number derived from the system startup. The physicalvolume parameter specifies the name of the physical volume.

The interval parameter specifies the amount of time (in seconds) between each report ). The first report contains statistics about the time when the system starts. Subsequent reports contain statistical information collected during the interval since the previous report. If the interval parameter is not specified, the vmstat command generates a single report and then exits. The Count parameter can only be specified with the interval parameter. If the Count parameter is specified, the value determines the number of reports generated and the number of seconds between reports. If the interval parameter is specified without the Count parameter, the report is generated continuously. The Count parameter cannot be 0.

In Aix 4.3.3 and later versions, this method is used to increase the percentage of time (WIO time) that the CPU waits for disk I/O. In some cases, AIX 4.3.2 andOperating SystemThis method used in earlier versions will provide exaggerated WIO time reports on SMP.

The methods used in Aix 4.3.2 and earlier versions are as follows: every clock interruption on each processor (100 times per processor per second ), determine which of the four categories (usr/sys/WIO/idle) to be classified into the last 10 ms. If the CPU is busy with the USR mode when the clock is interrupted, the USR will get the clock cycle and add it to its category. If the CPU is busy with the kernel mode when the clock is interrupted, the Sys class obtains the clock cycle. If the CPU is not busy, check whether disk I/O is in progress. If any disk I/O is in progress, the WIO category is accumulated. If no disk I/O is in progress and the CPU is not busy, the idle category obtains the clock cycle. Since all idle CPUs are classified into the WIO category, regardless of the number of threads waiting for I/O, an exaggerated WIO time report is generated. For example, a system with only one I/O thread may report more than 90% of the WIO time, regardless of the number of CPUs it has. The SAR (% WIO), vmstat (WA), and iostat (% iowait) commands report the WIO time.

The operating system AIX 4.3.3 and later versions use the following method: if an unfinished I/O is started on an idle CPU, the CPU is marked as WIO only when the CPU is changed in Aix 4.3.3. When only a small number of threads are performing I/O and other parts of the system are idle, this method can report much lower WIO time. For example, a system with four CPUs and a thread in the I/O process will report a maximum of 25% WIO time. The system with 12 CPUs and a thread in the I/O process only reports the maximum WIO time of 8%. The NFS client reads/writes data through vmm. The time that biods spends in vmm waiting for I/O completion is now reported as I/O wait time.

The kernel provides statistics on Kernel thread, page adjustment, and interrupt activity maintenance. The vmstat command accesses the kernel by using the perfstat kernel extension. The disk input/output statistics are maintained by the device driver. For disks, the average transfer rate is determined by the activity time and the number of transmitted information. The percentage of activity time is calculated based on the amount of time when the drive is busy during the reporting period.

The following report example generated by the vmstat command contains the column title and description:

Kthr:The kernel thread status changes every second during the sampling interval.

R Number of kernel threads in the running queue.
B Number of kernel threads placed in the waiting queue (waiting for resources, waiting for input/output.

Memory: Information about the use of virtual memory and real memory. If a virtual page has been accessed, the virtual page can be considered active. The size of a page is 4096 bytes.

AVM Activity virtual page.
Fre The size of the idle list.

Note: most of the real memory is used as the cache for file system data. It is normal to keep a small idle list.

Page: Information about page missing faults and page adjustment activities. These are the average values of the intervals, in seconds.

Re The input/output list of the page scheduler.
Pi The page that is scheduled from the page space.
Po Page that is called up to the page space.
FR Released page (page replacement ).
Sr Replaces the page scanned by an algorithm with a page.
Cy Replaces the algorithm's clock cycle by page.

Fault: Average capture and interruption rate per second at the sampling interval.

In Device interruption
Sy System Call.
CS Kernel thread context switch.

CPU: CPU usage time fault percentage.

Us User time.
Sy System time.
ID CPU idle time.
Wa CPU idle time. During this period, the system has unfinished Disk/nfs I/O requests. For more information, see the preceding description.

Disk: The number of transfers per second to a specified physical volume. This process occurs at the sampling interval. The physicalvolume parameter can be used to specify one or four names. The transmission statistics of each specified drive are given in the specified order. This count indicates the number of requests sent to the physical device. It does not imply the amount of data to be read or written. Several logical requests can be combined into one physical request.

If a-I flag is specified, the following changes occur in the I/O oriented view.

Kthr In addition to column R and column B, column P is also displayed.
P
The number of threads waiting for the actual physical I/O per second.
Page The new column Fi and FO will be displayed, replacing the RE and Cy columns.
Fi
Files transferred per second.
Fo
Files called up per second.

Flag

Note: If the-F (or-S) flag is entered in the command line, the system only accepts the-F (or-S) flag and ignores other flag. If both the-F and-s flag are specified, the system accepts only the first flag, ignoring the second flag.

-F Number of reports derived from the system startup.
-I Displays the number of interruptions caused by each device after the system is started.
-I Use the new output column to display the I/O-oriented view.KthrColumn Fi and fo are under the title page, rather than under the column; column Re and Cy are in the page title.
-S Write the content in the total structure to the standard output, which contains the absolute count of page events after system initialization. The-s flag can only be used with the-V flag. These events are described as follows:
Address translation error
Each time an address translation page failure occurs, it is added. I/O may or may not be required to solve page faults. Storage protection page faults (locked) are not included in this count.
Incoming page
Each page is added as the Virtual Memory Manager reads. Counting increases with page space and file space. Together with the output page statistics, it represents the total amount of actual I/O (started by the virtual memory manager.
Output page
Each page written by the Virtual Memory Manager increases. The Count increases with the page space and the output page of the file space. It represents the total amount of actual I/O (started by the Virtual Memory Manager) together with the inbound statistics.
Page space entry
Only the incoming pages from the paging space started by vmm increase.
Page space output
Only the outbound page from the paging space started by vmm increases.
Total recovery
When a new I/O request is not enabled, it can also meet the address translation error. If the page has been previously requested by vmm but I/O has not been completed, or the page is extracted by the Pre-read Algorithm in advance, but hidden by the fault segment; or if the page has been put into the Free List, but it has not been used again, this situation occurs.
Zero fill page fault
If the page fault is for the work memory, and you can specify a frame and fill the frame with zero fill to satisfy it, then this value is increased.
Executable padding page faults
Each Command page becomes faulty.
Use the clock to check the page
Vmm uses the clock algorithm to implement the pseudo-nearest least-used (1ru) Page Replacement mode. The page on which the clock has been checked is aged. Add this Count value to the page that has been checked by each clock.
Clock pointer Rotation
It increases with each vmm clock rotation (that is, after each complete memory scan ).
Page released by clock
The clock algorithm increases with the number of pages selected to be released from the memory.
 
Backtracking
Each page fault that occurs when the previous page fault is solved increases. (A new page fault must be solved first, and then the original page fault can be traced back .)
Lock loss
Vmm enforces concurrency locking by removing the addressing capability of the page. Locking loss may result in a page failure. This count increases whenever such a situation occurs.
Idle frame wait
When collecting available frames, each vmm waits for a process to increase.
Extended xpt wait
Each time the vmm is waiting for a process, it increases with the accessed segment.
Pending I/O wait
Each time the vmm waits for a process, the incoming page I/O TO BE COMPLETED increases.
Start I/O
Each read or write I/O Request started by vmm increases. This count should be equal to the total number of incoming and outgoing pages.
Iodones
Added each time the vmm I/O request is completed.
CPU context switch
It increases with each CPU context switch (new process scheduling ).
Device interruption
Each time the hardware is interrupted, it increases.
SoftwareInterrupted
Each software interruption increases. A software interruption is a machine instruction similar to a hardware interruption (saving some statuses and server routine branches. System calls are completed using software interrupt commands. The command conversion is controlled to the system call handler routine.
Traps
It is not maintained by the operating system.
Syscils
It increases with each system call.
-T Print the timestamp next to each output line of vmstat. Time stamp accordingHh: mm: SSFormat display.

Note: If the-F,-S, or-I flag is specified, no time stamp is printed.
-V Write different statistics maintained by the Virtual Memory Manager to the standard output. The-V flag can only be used with the-s flag.
Memory Page
The size of the actual memory (measured in 4 kb of page size ).
Lruable page
The number of 4 kb pages to be replaced. This number does not contain pages that are used for vmm internal pages and fixed parts of kernel text.
Idle page
Number of idle 4 kb pages.
Memory Pool
Adjust parameters for the number of memory pools (managed by VMO ).
Fixed page
A fixed number of 4 kb pages.
Maxpin percentage
Specify the adjustment parameters that can be fixed to the percentage of real memory (managed by VMO ).
Minperm percentage
Adjust parameters of the actual memory percentage (managed by VMO ). It specifies a critical point. When the critical point is lower, the page rescheduling algorithm is blocked from using the file page.
Maxperm percentage
Adjust parameters of the actual memory percentage (managed by VMO ). It specifies a critical point. When it is higher than this critical point, the page removal algorithm only removes the file page.
Numperm percentage
The percentage of memory currently used by the file cache.
File page
The number of 4 kb pages currently used by the file cache.
Compression percentage
The percentage of memory used by the compressed page.
Page Compression
The number of compressed memory pages.
Numclient percentage
The percentage of memory occupied by the client page.
Maxclient percentage
Specify the parameters that can be used to adjust the maximum memory percentage on the client page (managed by VMO ).
Client page
The number of client pages.
Scheduled remote output page
The number of outgoing pages for scheduling in the client file system.
Temporary disk I/O blocking without pbuf
The number of temporary disk I/O requests that are blocked because pbuf is not available. Pbuf is a fixed memory buffer used to save I/O requests on the logical volume manager layer.
Page space I/O blocked without psbuf
The number of page space I/O requests that are blocked because psbuf is not available. Psbuf is a fixed memory buffer used to save I/O requests on the virtual memory manager layer.
-V (The statistical information displayed by-V is displayed on the previous page ):
File System I/O blocked without fsbuf
The number of file system I/O requests that are blocked because no fsbuf is available. Fsbuf is a fixed memory buffer used to save I/O requests on the file system layer.
Client File System I/O blocked without fsbuf
Number of client file system I/O requests that are blocked because no fsbuf is available. NFS (Network File System) and vxfs (VERITAS) are client file systems. Fsbuf is a fixed memory buffer used to save I/O requests on the file system layer.
External page scheduler file system with no fsbuf blocking I/O
Number of I/O requests of the Client File System of the external page scheduler that is blocked because no fsbuf is available. Jfs2 is an external page scheduler client file system. Fsbuf is a fixed memory buffer used to save I/O requests on the file system layer.

Example
  1. To display the summary of the guided statistical information, enter:

     

    vmstat
  2. To display the five summaries at a 2-second interval, enter:

     

    vmstat 2 5

    The first summary contains the time statistics after the boot.

  3. To display a Summary of the statistical information of the Logical Disk scdisk13 and scdisk14 after the boot, enter:

     

    vmstat scdisk13 scdisk14
  4. To display derived statistics, enter:

     

    vmstat  -f
  5. To display the Count of each event, enter:

     

    vmstat -s
  6. To display the time stamp next to each output column of vmstat, enter:

     

    vmstat -t
  7. To display a new I/O Oriented View in another set of output columns, enter:

     

    vmstat -I
  8. To display all available vmm statistics, enter:
    vmstat -vs

File

 

/Usr/bin/vmstat Contains the vmstat command.

Related information

Iostat and VMO commands.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.