View all CPU load commands in LINUX

Source: Internet
Author: User

View all CPU load commands in LINUX $ vmstatprocs ----------- memory ---------- --- swap -- ----- io ---- system -- ----- cpu ------ r B swpd free buff cache si so bi bo in cs us sy id wa st 1 4 329796 26040 4528 3379824 1 1 50 160 36 17 2 10 85 3 0 procsr column indicates the number of processes running and waiting for the cpu time slice, if the cpu usage exceeds 1 for a long time, the cpu usage is insufficient and you need to increase the cpu usage. Column B indicates the number of processes waiting for resources, such as waiting for I/O or memory switching. Cpu indicates the cpu usage status. The us column shows the percentage of CPU time consumed in user mode. When the value of us is high, it indicates that the user process consumes a lot of cpu time. However, if it is longer than 50%, you need to consider optimizing your program. The sy column shows the percentage of cpu time consumed by the kernel process. Here, the reference value of us + sy is 80%. If the value of us + sy is greater than 80%, there may be insufficient CPU. The wa column shows the percentage of CPU time occupied by IO wait. The reference value of wa is 30%. If wa exceeds 30%, the IO wait is serious, which may be caused by a large number of random access to the disk, it may also be caused by the bandwidth bottleneck of the disk or disk access controller (mainly block operations ). The id column shows the percentage of time when the cpu is idle. The system displays the number of interrupts occurred during the collection interval. The in column shows the number of device interruptions per second observed during a certain time interval. The cs column indicates the number of context switches generated per second. If cs is much higher than the disk I/O and network information packet rate, further investigation should be conducted. The number of memories that memoryswpd switches to the memory swap area (k indicates ). If the value of swpd is not 0, or it is relatively large, for example, if it exceeds 100 m, as long as the value of si and so is 0 for a long time, system performance is still normal free the number of memory in the current idle page list (k indicates) the number of buff memory used as the buffer cache. Generally, buffer is required for reading and writing Block devices. Cache: The amount of memory that is used as the page cache. Generally, it is used as the cache of the file system. If the cache is large, it indicates that there are many files in the cache. If the bi in IO is small at this time, it indicates that the file system is more efficient. The number of swapsi switches from memory to memory swap zone. So the number of memory entries in the memory swap zone. The total amount of data IObi reads from Block devices (read disk) (kb per second ). Total data written to bo Block devices (disk write) (kb per second) Here we set the bi + bo reference value to 1000. If it exceeds 1000, in addition, if the wa value is large, you should consider Disk Load Balancing. You can analyze it with iostat output.

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.