java -Djava.rmi.server.hostname=192.168.1.58 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10081 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar xuean-fireduty.jar
注意:-Djava.rmi.server.hostname=实际需要监控查看的IP
如果是tomcat,需要在 tomcat 的 catalina.sh 中添加如下参数:
JAVA_OPTS=' -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false'_
3)在VisulVM上添加远程主机
4)在VisualVM上添加JMX链接
作者:7ColorLotus
链接:https://www.jianshu.com/p/12721b0b02d9
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。