天天看點

jvisualvm監控做成服務的jboss/tomcat

如果jboss做成了服務,啟動jvisualvm後會發現local沒有可監控的jboss,這時候需要修改bin/run.bat 在 java options 添加:

-Dcom.sun.management.jmxremote  
    -Dcom.sun.management.jmxremote.port=8999  
    -Dcom.sun.management.jmxremote.ssl="false"  
    -Dcom.sun.management.jmxremote.authenticate="false"   
           

如果是tomcat,找到系統資料庫:

HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\Tomcat7\Parameters\JAVA  
           

調整參數Options(将下列參數添加到對應值):

-Dcom.sun.management.jmxremote  
-Dcom.sun.management.jmxremote.port=8999  
-Dcom.sun.management.jmxremote.ssl="false"  
-Dcom.sun.management.jmxremote.authenticate="false" 
           

然後打開jvisualvm,在local下面添加對應端口的機子則可(這裡是8999)