Linux Performance Detection Tool Vmstat command

Source: Internet
Author: User

The Linux Performance Detection Tool VMSTAT command provides monitoring of information such as processes, memory, page I/O blocks, and CPUs, Vmstat can display the average or sampled values of the test results, and the sampling mode can provide a monitoring result of different frequencies over a sampling period.


Linux Performance Detection Tool vmstat command process (procs)
R: Number of processes waiting for run time
B: Process in non-disruptive sleep state
W: Processes that are swapped out but can still be run, this value is calculated


· Linux Performance Detection Tool vmstat command MEMORYSWPD: Number of virtual memory
Free: The number of idle memory
Buff: The amount of memory used as a buffer


Linux Performance Detection Tool vmstat command swap
Si: Quantity exchanged from hard disk
So: The number of swapped to the hard drive


Linux Performance Detection Tool Vmstat command · Io
BI: Number of blocks output to a single block device
Bo: Number of blocks accepted from a single block device


Linux Performance Detection Tool VMSTAT command system
In: Number of interrupts per second, including clock
CS: Number of context switches that occur per second


· Linux Performance Detection Tool vmstat command CPU (% of total CPU uptime)
US: Time for non-kernel code to run (user time, including nice time)
SY: Kernel code run time (System time)
ID: Idle time, in the kernel version prior to Linux 2.5.41, this value includes I/O wait time;
WA: Time to wait for I/O operation, this value is 0 in the kernel version prior to Linux 2.5.41


The Vmstat command provides a number of additional parameters, and some of the most useful parameters are listed below:
Reference
• M: Showing memory utilization of the kernel
A: Display memory page information, including active and inactive memory pages
• N: Displays the header line, which is useful when using sampling mode and outputting command results to a file. For example, Root#vmstat–n 2 10 displays 10 output results at 2-second frequency
• Vmstat provides statistics on I/O results when using the-p {partition}



Vmstat is an abbreviation for virtual meomory Statistics (dummy memory statistics) that monitors the operating system's virtual memory, processes, and CPU activity. He is a statistical analysis of the overall situation of the system, and the disadvantage is that a process cannot be analyzed in depth. Usually use Vmstat 5 5 (which means to generate data every 5 seconds and generate 5 data) command tests. Will get a summary of the data he can reflect the real system situation.
#vmstat 5 5
procs-----------Memory-------------Swap-------io------System------CPU----
R b swpd free buff cache si so bi bo in CS US sy ID WA
1 0 62792 3460 9116 88092 6 30 189 89 1061 569 17 28 54 2
0 0 62792 3400 9124 88092 0 00 14 884 434 4 14 81 0
0 0 62792 3400 9132 88092 0 00 14 877 424 4 15 81 0
1 0 62792 3400 9140 88092 0 00 14 868 418 6 20 74 0
1 0 62792 3400 9148 88092 0 00 15 847 400 9 25 67 0
The Linux memory Monitor vmstat command output is divided into six sections:


(1) process procs:
R: The number of processes waiting in the run queue.
B: The number of processes waiting for IO.


(2) Linux Memory monitoring memory Memoy:
SWPD: Current swap memory available (in kilobytes).
Free: Idle memory (in kilobytes).
Buff: The amount of memory to buffer (in kilobytes).
Cache: The amount of memory that is used as a cache (in kilobytes).


(3) Linux Memory monitor swap swap page
Si: The number of swap pages, in kb/seconds, from disk swap to memory.
So: the number of swap pages from memory swap to disk, in kb/seconds.


(4) Linux Memory Monitoring IO block devices:
BI: The number of blocks sent to the block device, in blocks per second.
Bo: The number of blocks received from the block device, in blocks per second.


(5) Linux Memory Monitoring System :
In: Number of interrupts per second, including clock interrupts.
CS: The number of environment (context) conversions per second.


(6) Linux memory monitoring CPU central Processor:
CS: The time that the user process used. expressed as a percentage.
SY: The time that the system process was used. expressed as a percentage.
ID: The idle time of the central processing Unit. expressed as a percentage.


If R is often greater than 4, and the ID is often less than 40, it means that the CPU is heavily loaded. If the Bi,bo is not equal to 0 long, the physical memory capacity is too small.


Linux Performance Detection Tool Vmstat command

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.