"Essays" Vmstat Performance monitoring

Source: Internet
Author: User
Tags switches

  The vmstat command is the most common Linux/unix monitoring tool that can show the status of a server at a given time interval, including server CPU utilization, memory usage, virtual memory exchange, IO Read and write situations. Rather than Top,vmstat, you can see the CPU, memory, and IO usage of the entire machine, instead of just seeing the CPU usage and memory usage of each process (using a different scenario).

Use the Vmstat command to output a server state information:

  

You can add 2 parameters after the Vmstat command, the first parameter indicates how long the interval is to get information once, in seconds, and the second parameter indicates that a few messages are output and stop getting:

    

The second parameter is the default, and if omitted, the status information is output until the Vmstat is stopped using "Ctrl + C":

    

Now let's explain these parameters in detail:

     ----to run the queue, that is, the process queue that is currently waiting to run, if it exceeds the number of CPU cores, it means that the CPU is overloaded, the CPU is busy, and the server is in a dangerous state.

     ----represents the blocked process.

    SWPD ---The amount of virtual memory used, if it is greater than 0, indicates that the machine is running out of physical memory, and if it is not the cause of the program memory leak, then it is time to upgrade the memory or migrate the memory-consuming task to another machine.

     Free--the size of the idle physical memory.

    Buff --the cache used to store content, permissions, and so on in the directory.

    Cache ---is used to memorize the files we open and buffer the files.

    si --Reads the size of the virtual memory from the disk per second, if the value is greater than 0, the physical memory is not enough or the memory leaks, to find out the memory process is resolved.

     so-and-per-second virtual memory is written to disk size, if this value is greater than 0, ibid.

    The number of blocks received by the bi -to-block device per second, where the block device refers to all the disks and other block devices on the system, and the default block size is 1024byte.

    Bo ---the number of blocks sent per second for a block device, such as when we read a file, Bo is more than 0. Bi and Bo are generally close to 0, otherwise the IO is too frequent and needs to be adjusted.

     in--CPU interrupts per second, including time interrupts.

    CS --The number of context switches per second, such as when we call system functions, context switches, thread switching, and process context switching, the smaller the better, too big, to consider the number of threads or processes. Too many context switches means that most of your CPU is wasted in context switching, causing the CPU to do serious things less time and CPU underutilized.

    US --User CPU utilization.

    Sy -to-system CPU utilization, if too high, indicates a long system call, such as frequent IO operations.

    ID --free CPU usage, generally, ID + us + sy = 100.

    WT ---waits for IO CPU time.

"Essays" Vmstat Performance monitoring

Related Article

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.