검색결과 리스트
글
힙덤프 생성하는 법
- Out of memory 발생할 때 생성 (JVM 옵션 변경)
-XX:+HeapDumpOnOutOfMemoryError : out of memory 발생시에 힙덤프를 현재 디렉토리에 생성함.
-XX:HeapDumpPath=dir/filename.hprof : 지정한 경로에 생성.
- jmap 사용 (JDK 1.6 이상, 상당히 느리지만 별도로 JVM에 명시할 필요없이 heap dump 생성함.)
jmap [ option ] pid
jmap [ option ] executable core
- jstack 사용 (hang 걸린 프로세스에 주로 사용)
jmap [ option ] pid
jmap [ option ] executable core
- kill 3 pid (SIGQUIT)
http://halfpie.tistory.com/288
덤프 생성 예시
$ jps -J-Djava.io.tmpdir="temp"
21386 Bootstrap
21523 Jps
$ jstat -J-Djava.io.tmpdir="temp" -gcutil 21386 1000 1000
http://linuxism.tistory.com/287
http://docs.oracle.com/javase/1.5.0/docs/tooldocs/share/jstat.html
http://www.oracle.com/technetwork/java/javase/tsg-vm-149989.pdf
힙덤프 분석하는 법
- 분석툴
Eclipse Memory Analyzer(MAT) : http://www.eclipse.org/mat/
JHAT(Java Heap Analysis Tool) : http://docs.oracle.com/javase/6/docs/technotes/tools/share/jhat.html
IBM HeapAnalyzer : https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=4544bafe-c7a2-455f-9d43-eb866ea60091
TDA(Thread Dump Analyzer) : http://java.net/projects/tda/downloads
- 관련글
Heap Dump 분석 : http://logonjava.blogspot.com/2010/04/heap-dump-perm-area-memory-leak.html
OutOfMemoryError : http://javaeesupportpatterns.blogspot.com/2011/11/outofmemoryerror-java-heap-space.html
'프로그래밍 > java' 카테고리의 다른 글
spring5 reactive programming (0) | 2018.06.05 |
---|---|
Java and tomcat class loader, priority & hierarchy (0) | 2012.11.20 |
테스트, assertThat과 is()를 쓰기 위해 필요한 import문... (0) | 2012.07.07 |
RECENT COMMENT