"JVM" Jstack queries consume maximum resource threads | Troubleshoot dead loops, etc.

Source: Internet
Author: User

Jstack applications

First by: Ps-ef|grep Java

Get the Java PID

See which thread is consuming the most resources:

Find out the CPU-intensive threads in the process, and use the PS-LFP pid or ps-mp pid-o thread, Tid, time, or top-hp PID command to see all the thread usage under the process.

found that thread 21742 occupies the most.

Convert the most CPU-intensive thread ID (21742) to 16 binary

命令:printf"%x\n"21742 的到 线程值 :54ee

To view Jstack generated files:

Jstack PID | grep tid

Example: Jstack 21711 | grep 54ee

Below you can see which line of code is causing the line of code to see the dead loop. The trace is resolved.

"JVM" Jstack queries consume maximum resource threads | Troubleshoot dead loops, etc.

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.