Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on 04-26-2017 09:14 AM - edited on 01-01-2019 08:25 PM by Nina.Wolinsky
Linux users can use the following steps to determine which of their Java threads is consuming the most CPU.
1. First, find the Java process ID.
ps -ef |grep java
2. Use the Java process ID (PID) to pull the lightweight processes into a file named lwp.txt
.
ps -eLo pid,lwp,nlwp,pcpu,etime,args|grep <pid> > lwp.txt
3. Use the PID to generate a Java thread dump.
kill -3 <pid>
4. Choose the lightweight process (LWP) that is consuming the most CPU from the lwp.txt file created in step 2, and convert the LWP ID from decimal to hexadecimal using the tool of your choice (for example, binaryhexconverter.com).
Example: Convert LWP DEC 4235 to HEX 108B.
5. Search the thread dump created in step 3 for the hexadecimal LWP ID to find the Java thread that is consuming the most CPU.
6. If the problematic Java thread is part of AppDynamics, contact support for further assistance. If it is an application thread, contact your development/application team to debug the issue further.
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form