Java Mission Controlクライアントは、リモートで実行しているJVMに接続し、JFR(Java Flight Recorder)記録を取得することができます。
サーバー側の設定
JVMのリモート接続は、JMXRMI (JMX over RMI) が使用されます。それを有効するには、以下のJVMオプションが使用されます。
・-Dcom.sun.management.jmxremote.port
・-Dcom.sun.management.jmxremote.authenticate
・-Dcom.sun.management.jmxremote.ssl
接続認証なしでJVMの起動例:
$java -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false myApp
又は、JAVA_TOOL_OPTIONSで指定する。
$set JAVA_TOOL_OPTIONS "-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
※JFRを有効には以下のオプションも必要です。
-XX:+UnlockCommercialFeatures -XX:+FlightRecorder
クライアント側の設定
1.%JAVA_HOME%\bin\jmc.exe
からJMC クライアントを起動する。