Find the reason why the java process occupies too much CPU under linux

1. Find the process
top to check the resource occupancy of the process. It is

obvious that the two java processes 22714 and 12406 occupy too much CPU.

2. Find the thread
Use top -H -p <pid> to check the thread occupancy


3. Find the stack information of java
Convert the thread id to hexadecimal
#printf %x 15664
#3d30

and then use jstack to query the thread's stack information
Syntax : jstack <pid> | grep -a thread id (hexadecimal)

jstack <pid> | grep - a 3d30

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326057045&siteId=291194637