[Linux]vmstat command explanation-show virtual memory status

Source: Internet
Author: User

This article is reproduced in Http://man.linuxde.net/vmstat

The meaning of the vmstat command is to display the virtual memory status ("Viryual memor Statics"), but it can report on the overall operational state of the system, such as process, memory, I/O, etc.

Grammar
Vmstat (option) (parameter)
Options
-A: Displays the active page;-F: Displays the total number of processes created after startup;-M: Displays slab information;-N: Header information is displayed only once;-S: Displays the event counter and memory status in tabular format;-D: reports the disk status;-P: Displays the specified hard disk partition status;-S: the unit of output information
Parameters
    • Event interval: time interval for state information refresh;
    • Number of times: the number of times the report is displayed.
Instance
Command: Vmstat 3procs-----------memory-------------Swap-------io------System-------CPU------R  B   swpd   free   buff  cache   si   so    bi    bo   in   ID WA St 0  0  42188 167332 1534368    0    0     4     7    1    0  0  0 The  0  0 0 0 42188 167332 1534392    0    0     0     0 1002   (  0    0) 0 0 0 0 320  42188 167336 1534392    0    0 0 0 0 0  0  0    1002  167336 1534392    0    0     0     0 1002 0 0   42188  0 0 0  0  42188 167336 1534392    0    0     0     0 1002 0 0 +  0  0


Field Description:

Procs (Process)

    • R: The number of processes running in the queue, this value can also determine whether to increase the CPU. (longer than 1)
    • B: The number of processes waiting for IO.

Memory (RAM)

    • SWPD: Using virtual memory size, if the value of SWPD is not 0, but the value of Si,so is 0 for a long time, this situation does not affect system performance.
    • Free: The size of the idle physical memory.
    • Buff: The amount of memory used as a buffer.
    • Cache: As the memory size of the buffer, if the cache value is large, the number of files in the cache, if the frequently accessed files can be cached, then the disk read IO bi will be very small.

Swap

    • Si: Writes from the swap area to the memory size per second, and the disk is transferred into memory.
    • So: The amount of memory written to the swap area per second is transferred from memory to disk.

Note: When memory is sufficient, these 2 values are 0, and if these 2 values are longer than 0 o'clock, system performance will be affected and both disk IO and CPU resources will be consumed. Some friends see that free memory is very small or close to 0 o'clock, think that memory is not enough, not to see this, but also to combine SI and so, if it is very small, but Si and so are very few (mostly 0), then do not worry, the system performance will not be affected.

IO (now the size of the Linux version block is 1KB)

    • BI: Number of blocks read per second
    • Bo: Number of blocks written per second

Note: When the random disk reads and writes, these 2 values are larger (such as exceeding 1024k), you can see the CPU in the IO waiting value will be greater.

System (Systems)

    • In: Number of interrupts per second, including clock interrupts.
    • CS: The number of context switches per second.

Note: The larger the 2 values above, the greater the CPU time that is consumed by the kernel.

CPU (expressed as a percentage)

    • US: Percentage of user Process Execution time

When the value of us is higher, it means that the user process consumes more CPU time, but if it is used over a long period of 50%, then we should consider optimizing the program algorithm or accelerating it.

    • Sy: Percentage of kernel system Process Execution (System time)

When the value of SY is high, it indicates that the system kernel consumes more CPU resources, this is not a benign performance, we should check the cause.

    • Wa:io Wait Time percentage

When the value of WA is high, it indicates that IO waits are serious, which may be caused by a large number of random accesses to the disk, or there may be bottlenecks (block operations) on the disk.

    • ID: Percentage of idle time

[Linux]vmstat command explanation-show virtual memory status

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.