top -Hp
top - 10:21:14 up 7 days, 18:26, 3 users, load average: 0.34, 0.27, 0.25
Threads: 26 total, 1 running, 25 sleeping, 0 stopped, 0 zombie
%Cpu(s): 25.0 us, 0.0 sy, 0.0 ni, 75.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 5682904 total, 2179108 free, 1103596 used, 2400200 buff/cache
KiB Swap: 8388604 total, 8388604 free, 0 used. 4240668 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2236 root 20 0 4607912 30888 12080 R 99.9 0.5 0:22.62 java
2211 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.00 java
2212 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.09 java
2213 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.00 java
2214 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.00 java
2215 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.00 java
2216 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.00 java
2217 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.00 java
2218 root 20 0 4607912 30888 12080 S 0.0 0.5 0:00.00 java
如上,2236 是占用最高的。
然后在 linux中输入 printf '%x\n' 2236 ,可以得到 8bc
然后通过jstack 进行查找
jstack
可得到
"MMMMM" #19 prio=5 os_prio=0 tid=0x00007f01b41cd800 nid=0x8bc runnable [0x00007f01a47f6000]