In Linux, it is found that the CPU usage is too high.

Source: Internet
Author: User

Http://mnt.conf.blog.163.com/blog/static/115668258201211734032988/

First, use the top command to sort by P in descending order of CPU usage

 

 

Then the PS aux | grep PID command can be used to determine whether a problem occurs in Tomcat.

However, to locate a specific thread or code, the following operations are required:
First, display the thread list: PS-mp pid-O thread, tid, time

Found the thread with the highest time consumption of 32720, occupying the CPU for more than half an hour

Then, convert the required thread ID to the hexadecimal format:

Printf "% x \ n" TID


Finally, print the stack information of the thread:

Jstack PID | grep tid-a 60

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.