문서의 선택한 두 판 사이의 차이를 보여줍니다.
다음 판 | 이전 판 마지막 판 양쪽 다음 판 | ||
java:jcmd [2016/03/05 23:06] kwon37xi 만듦 |
java:jcmd [2019/02/07 12:23] kwon37xi [참조] |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== jcmd ====== | ====== jcmd ====== | ||
* [[https:// | * [[https:// | ||
+ | * 현재 실행중인 JVM 에 명령을 내려 정보를 보거나 행위를 할 수 있다. | ||
+ | ===== 예제 ===== | ||
+ | <code sh> | ||
+ | $ jcmd | ||
+ | # java process 목록이 출력됨. | ||
+ | 5485 sun.tools.jcmd.JCmd | ||
+ | 2125 MyProgram | ||
+ | |||
+ | $ jcmd 2125 help # 혹은 jcmd MyProgram help | ||
+ | # 해당 VM에 대해 실행할 수 있는 명령 목록이 나옴. | ||
+ | |||
+ | 2125: | ||
+ | The following commands are available: | ||
+ | JFR.stop | ||
+ | JFR.start | ||
+ | JFR.dump | ||
+ | JFR.check | ||
+ | VM.native_memory | ||
+ | VM.check_commercial_features | ||
+ | VM.unlock_commercial_features | ||
+ | ManagementAgent.stop | ||
+ | ManagementAgent.start_local | ||
+ | ManagementAgent.start | ||
+ | Thread.print | ||
+ | GC.class_stats | ||
+ | GC.class_histogram | ||
+ | GC.heap_dump | ||
+ | GC.run_finalization | ||
+ | GC.run | ||
+ | VM.uptime | ||
+ | VM.flags | ||
+ | VM.system_properties | ||
+ | VM.command_line | ||
+ | VM.version | ||
+ | help | ||
+ | |||
+ | $ jcmd MyProgram Thread.print | ||
+ | # Thread.print 명령 실행 | ||
+ | |||
+ | $ jcmd MyProgram VM.version | ||
+ | 2125: | ||
+ | Java HotSpot(TM) 64-Bit Server VM version 24.45-b08 | ||
+ | JDK 7.0_45 | ||
+ | </ | ||
+ | |||
+ | 현재 Tomcat 프로세스 전체 JVM 버전 출력하기 | ||
+ | <code sh> | ||
+ | jcmd | grep Bootstrap | cut -f1 -d' ' | xargs -I % jcmd % VM.version | ||
+ | </ | ||
+ | |||
+ | ===== 참조 ===== | ||
+ | * [[https:// | ||
+ | * [[https:// |