How to view high CPU usage threads under Linux

Source: Internet
Author: User
Tags cpu usage high cpu usage

Under Linux, the top tool can display the average CPU utilization (USER,NICE,SYSTEM,IDLE,IOWAIT,IRQ,SOFTIRQ,ETC.), which shows the utilization of each CPU. However, this situation may occur when the CPU utilization of each thread cannot be displayed, and the total CPU utilization is high, but the user or system of the process does not correspond when the CPU usage of the process is sorted.

You can use the following command to find a thread with high CPU usage:

$ ps H-eo user,pid,ppid,tid,time,%cpu,cmd--sort=%cpu

This command first specifies the parameter ' H ', which displays the thread-related information, which is included in the format output: User,pid,ppid,tid,time,%cpu,cmd and then sorted using the%cpu field. This will find the processor-hogging thread.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

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.