1.查看Java进程
ps -ef | grep java | grep -v grep
2.列出线程内存、cup占比 (这里列出十进制的线程id)
top -p 21082 -H
3.导出线程堆栈信息
jstack -F 21082 > stack.log
其中nid 就是16进制的线程id
"grpc-default-executor-206" #339 daemon prio=5 os_prio=0 tid=0x00007fef7d01a800 nid=0x7bf9 waiting on condition [0x00007fefa42c0000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000ffd14920> (a java.util.concurrent.CountDownLatch$Sync)
网友评论