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)

猜你喜欢

转载自chembo.iteye.com/blog/1539232