How to locate code issues under Linux

Source: Internet
Author: User

1, first through the top command to find the high CPU consumption process ID hypothesis is 11876

2. Perform top-p 11876 to monitor the process individually

3, in the 2nd step of the monitoring interface input h, get all the thread information under the current process

4. Find the thread number that consumes the CPU very high, assuming it is 11354

5. Execute jstack 11876 to dump the current process and output all thread information

6 Take the 4th step to get the thread number 11354 turns into 16 binary is 0x2c5a

7 according to the 6th step of the 0X2C5A in the 5th step of the thread information to find the corresponding thread content

8 Interpreting thread information, locating specific code locations

It's easy!!

How to locate code issues under 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.