jmap 으로 Heap dump 처리

jmap -dump:format=b,file=./dump_file 10372
{파일명} {pid} 으로 jmap 생성.

[WAS-05:root]/root>#ps -ef|grep java
root     10372     1 99 Nov02 ?        6-10:01:40 /usr/local/java/bin/java -Djava.util.rg.apache.juli.ClassLoaderLogManager -verbosegc -server -Xms10g -Xmx10g -XX:+UseG1GC -D-Duser.timezone=GMT+09:00 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/local/tg.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=00al/tomcat9/lib/scouter.agent.jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jm=false -Dcom.sun.management.jmxremote.authenticate=false -Dignore.endorsed.dirs= -classase=/usr/local/tomcat9 -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/to
root     27084 26857  0 10:52 pts/1    00:00:00 grep java

[WAS-05:root]/usr/local/tomcat9/logs>#cd /home/users/bymin/
[WAS-05:root]/home/users/bymin>#jmap -dump:format=b,file=./dump_file 10372
Heap dump file created

Thread dump 처리

[WAS-05:root]/home/users/bymin>#jcmd 10372 Thread.print > ./thread_file

jcmd {pid} Thread.print > {파일명}

Thread 분석 무료 사이트 를 이용하여 분석을 완료 합니다.