Vmstat: Reports virtual memory statistics

Source: Internet
Author: User

Vmstat: Reports virtual memory statistics

Purpose: 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 activities. The statistical information within the system range (in all processors) calculates the average value in percentage or calculates its sum.

Usage: vmstat [-V] [-N] [latency [times]

The main options are as follows.

-N: The switch only displays the information for the first time, instead of periodically generating the information.

Latency: refresh interval in seconds. If this delay time is not provided, only the average value from system startup to the present is displayed.

Number of times: the number of updates. If the latency is defined without a specified number of times, the default value of the number is infinite.

-V: The switch can be used to output the version information of the command.

The application example is as follows.

Run the vmstat 5 5 command to test:

 
 
  1. # Vmstat 5 5
  2. Procs memory swap Io system CPU
  3. R B W SWPD free buff cache Si so Bi Bo in CS us Sy ID
  4. 0 0 0 0 32188 6412 0 47252 47 200 89 8 6 85
  5. 0 0 0 0 32188 6420 0 0 0 6 47252 20 0 101
  6. 0 0 0 0 32188 6420 0 0 0 47252 19 0 0 101
  7. 0 0 0 0 32188 6420 0 0 0 47252 20 0 0 101
  8. 0 0 0 0 32188 6420 0 0 0 47252 22 0 0 101

The result is a summary of the data, which can reflect the real system situation. The vmstat command output is divided into six parts.

(1) process procs

R: Number of processes waiting in the running queue.

B: Number of processes waiting for I/O.

W: processes that can enter the running queue but are replaced.

(2) Memory

SWPD: available swap memory, in KB.

Free: idle memory, in KB.

Buff: the number of memories in the buffer, in KB.

Cache: The amount of memory used as the cache, measured in KB.

(3) Swap switching page

Si: Number of swap pages from disk swap to memory, measured in kb/s.

So: the number of swap pages from memory swap to disk, measured in kb/s.

(4) I/O BLOCK Devices

BI: The number of blocks sent to the block device. The unit is block/second.

Bo: number of blocks received from the block device. Unit: block/second.

(5) System

In: The number of interrupts per second, including clock interruptions.

CS: the number of environment (context) switches per second.

(6) CPU central processor

CS: the time used by the user process, expressed in percentage.

Sy: the time used by the system process, in percent.

ID: the idle time of the central processor, expressed in percentage.

If R is often greater than 4 and the ID is often less than 40, the central processor is under heavy load. If Bi and Bo are not equal to 0 for a long time, the physical memory capacity is too small.

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.