Troubleshooting and positioning of CPU usage on Java line

Source: Internet
Author: User

The recent online frequent alarm CPU idle, so after emergency troubleshooting to share to everyone

1. Use the top command to get the highest CPU-intensive process number

2. View process information for thread number

Command: Ps-ef|grep 22630

3. View thread information for the process

Command: Ps-mp22630-othread,tid,time | sort-nr| Head-15

4, select the first thread number, converted to 16 binary

Command: printf "%x" 22657

Results: 5881

5, use Jstack to query out the specific thread state

Command: Jstack 22630|grep 5881-a 30

With these thread states you can basically locate the problem

Troubleshooting and positioning of CPU usage on Java line

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.