How to view high CPU usage threads in Linux

Source: Internet
Author: User
Tags high cpu usage

In Linux, how does one view high CPU usage threads? in Linux, the top tool can display the average cpu usage (user, nice, system, idle, iowait, irq, softirq, etc .), the usage of each cpu is displayed. However, the cpu usage of each thread cannot be displayed. This may occur when the user or system is high in the total cpu usage, but the cpu usage of the process is sorted, there is no user or system corresponding to the process. You can use the following command to find the threads with high cpu usage: $ ps H-eo user, pid, ppid, tid, time, % cpu, cmd-sort = % cpu this command First specifies the parameter 'H' to display thread-related information. The format output contains: user, pid, ppid, tid, time, % cpu, cmd, and then sort it with the % cpu field. In this way, you can find the thread that occupies the processor.

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.