用jmap把进程内存使用情况dump到文件中,再用jhat分析查看。jmap进行dump命令格式如下:
jmap-dump:format=b,file=/tmp/dump.dat21711 -------->进程id
jhat-port 10099 /tmp/dump.dat
运行在10099端口然后浏览器加端口号浏览器访问
将线程信息
Jstack -l PID >> 123.txt
"startQuertz_Worker-2" prio=10 tid=0x00007fb1e1292000 nid=0x8e4e in Object.wait() [0x00007fb27cc9a000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000583eb9b00> (a java.lang.Object)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
- locked <0x0000000583eb9b00> (a java.lang.Object)
Locked ownable synchronizers:
- None