본 문서는 This "Quick Start Guide" gives you some quick tips for troubleshooting. The subsections list some typical functions that can help you in troubleshooting, including one or more ways to get the information or perform the action."퀵 스타트 가이드"로 문제 해결(troubleshooting)을 위한 몇 가지 빠른 도움말을 제공합니다. 즉, 정보를 얻기 위해 작업을 수행하거나 하나 이상의 방법을 포함한 문제 해결에 도움이되는 몇 가지 일반적인 기능을 나열합니다.
These tips are organized as follows:이러한 요령으로 구성은 다음과 같습니다 : (해당 주제별)
- Hung, Deadlocked, or Looping Process 행(Hung), 데드락(Deadlocked), 또는 루핑(Looping) 프로세스
- Post-mortem Diagnostics, Memory Leaks 사후 진단(Post-mortem Diagnostics), 메모리 누수(Leaks)
- Monitoring 모니터링
- Other Functions 기타 기능 Hung, Deadlocked, or Looping Proce
행(Hung),
데드락(Deadlocked), 또는 루핑(Looping) 프로세스
- Start Java process with -XX:+PrintClassHistogram , then Control-Break자바 프로세스를 다음 옵션으로 시작 -XX:+PrintClassHistogram, 그후 Control-Break
- jmap -histo pidjmap -histo 명령
- Dump Java heap for a process in binary format to file:프로세스에 대한 자바 힙 덤프를 바이너리 형식의 파일에 덤프 뜨기jmap -dump:format=b,file= filename pid:
- jmap –dump: format=b,file=filename pid
- Start Java process with -XX:+PrintClassHistogram , then Control-Break자바 프로세스를 다음 옵션으로 시작 -XX:+PrintClassHistogram, 그후 Control-Break
사후 진단, (Post-mortem Diagnostics)Post-mortem Diagnostics, Memory Leaks, 메모리 누수(Memory Leaks)
- Examine the fatal error log file.치명적인 오류 로그 파일을 검사합니다. Default file name is hs_err_pid
pid .log in the working directory. 기본 파일 이름은 hs_err_pidpid.log 로 작업 디렉토리에 들어있습니다.
- Start the application with HPROF enabled: java -agentlib:hprof=file= file ,format=b application ; then Control-BreakHPROF
활성시켜 응용 프로그램 시작: java -agentlib:hprof=file=file,format=b application; 그후 Control-Break파일
- Start the application with HPROF enabled: java -agentlib:hprof=heap=dump applicationHPROF 활성시켜 응용 프로그램 시작: java -agentlib:hprof=heap=dump application JConsole tool, MBeans tab
- JConsole 툴에서 MBeans 탭
- Start VM with -XX:+HeapDumpOnOutOfMemoryError ; if OutOfMemoryError is thrown, VM generates a heap dump.다음 옵션으로 VM 시작 -XX:+HeapDumpOnOutOfMemoryError;; OutOfMemoryError 가 던져지면, VM은 힙 덤프(heap dump)를 자동 생성합니다.
- Start the application with HPROF enabled: java -agentlib:hprof=file= file ,format=b application ; then Control-BreakHPROF
활성시켜 응용 프로그램 시작: java -agentlib:hprof=file=file,format=b application; 그후 Control-Break파일
모니터링 ( jstat is not available on Windows 98 or Windows ME.) (jstat 윈도우 98이나 윈도우 ME에서 사용할 수없습니다.)
Note: The vmID argument for the jstat command is the virtual machine identifier. See the jstat man page 참고 : jstat 명령에 대한 인수는 가상 머신 vmID 식별자입니다.
jstat man 페이지를 참조하십시오 for a detailed explanation.
자세한 설명
- Print statistics on the class loader: 클래스 로더에 통계 출력 :
- jstat -class vmID jstat -class vmID
- jstat -class vmID jstat -class vmID
- Print statistics on the compiler: 컴파일러에 대한 통계 출력 :
- Compiler behavior: jstat -compiler vmID 컴파일러 동작 : jstat -compiler vmID
- Compilation method statistics: jstat -printcompilation
vmID 컴파일 메소드에 대한 통계 : jstat - printcompilation vmID
- Compiler behavior: jstat -compiler vmID 컴파일러 동작 : jstat -compiler vmID
- Print statistics on garbage collection: 가비지 컬렉션에 통계 출력 :
- Summary of statistics: jstat -gcutil vmID 요약 통계 : jstat -gcutil vmID
- Summary of statistics, with causes: jstat -gccause vmID 오류 포함, 요약 통계 : jstat -
gccause vmID
- Behavior of the gc heap: jstat -gc vmID GC의 힙 동작(behavior) : jstat -gc vmID
- Capacities of all the generations: jstat -gccapacity vmID 모든 generations 용량 : jstat -gccapacity vmID
- Behavior of the new generation: jstat -gcnew vmID new generation 동작: jstat -gcnew
vmID
- Capacity of the new generation: jstat -gcnewcapacity vmID new generation 용량: jstat -gcnewcapacity vmID
- Behavior of the old and permanent generations: jstat -gcold vmID old 와 permanent generations 동작: jstat -gcold vmID
- Capacity of the old generation: jstat -gcoldcapacity vmID
old generations 용량 : jstat -gcoldcapacity vmID
- Capacity of the permanent generation: jstat -gcpermcapacity vmID permanent generations 용량: jstat -gcpermcapacity vmID
- Summary of statistics: jstat -gcutil vmID 요약 통계 : jstat -gcutil vmID
- Monitor objects awaiting finalization: finalization를 기다리는 개체 모니터링:
- JConsole tool, VM Summary tab JConsole 툴, VM 요약 탭
- getObjectPendingFinalizationCount method in java.lang.management.MemoryMXBean class java.lang.management.MemoryMXBean 클래스 안에 있는getObjectPendingFinalizationCount 메소드
- JConsole tool, VM Summary tab JConsole 툴, VM 요약 탭
- Monitor memory: 메모리 모니터 :
- Heap allocation profiles via HPROF: java -agentlib:hprof=heap=sites HPROF를 통해 힙 할당 프로필(profiles) : java -agentlib:hprof=heap=sites
- JConsole tool,
Memory tab JConsole 툴, 메모리 탭
- Control-Break prints generation information. Control – Break 는 generation 정보 출력
- Heap allocation profiles via HPROF: java -agentlib:hprof=heap=sites HPROF를 통해 힙 할당 프로필(profiles) : java -agentlib:hprof=heap=sites
- Monitor CPU usage: CPU 사용률 모니터 :
- By thread stack: java -agentlib:hprof=cpu=samples application 쓰레드 스택 관련 : java -agentlib:hprof=cpu=samples application By method: java -agentlib:hprof=cpu=times application
- 메소드 관련 : java -agentlib:hprof=cpu=times application
- JConsole tool, Overview and VM Summary tabs JConsole 툴, 개요 및 VM을 요약 탭
- By thread stack: java -agentlib:hprof=cpu=samples application 쓰레드 스택 관련 : java -agentlib:hprof=cpu=samples application By method: java -agentlib:hprof=cpu=times application
- Monitor thread activity: 쓰레드 활동 모니터 :
- JConsole tool, Threads tab JConsole 툴, 쓰레드 탭
- JConsole tool, Threads tab JConsole 툴, 쓰레드 탭
- Monitor class activity: 클래스 액티비티 모니터 :
- JConsole tool, Classes tab JConsole 툴, 클래스 탭
- JConsole tool, Classes tab JConsole 툴, 클래스 탭
- Monitor for the creation and termination of instrumented VMs (not Windows 98 or Windows ME): jstatd daemoninstrumented VMs (Windows 98이나 Windows ME 불가) 생성 및 종료 모니터 : jstatd daemon
- List the instrumented VMs (not Windows 98 or Windows ME): jpsinstrumented VMs (Windows 98이나 Windows ME 불가) 목록 : jps
- Provide interface between remote monitoring tools and local VMs
(not Windows 98 or Windows ME): jstatd daemon원격 모니터링 툴 및 로컬 VM 간 인터페이스 제공 (Windows 98 이나 Windows ME 불가) : jstatd daemon
- Request garbage collection: JConsole tool, Memory tab가비지 컬렉션 요청 : JConsole 툴, 메모리 탭
- Monitor for the creation and termination of instrumented VMs (not Windows 98 or Windows ME): jstatd daemoninstrumented VMs (Windows 98이나 Windows ME 불가) 생성 및 종료 모니터 : jstatd daemon