远程监控JVM
设置tomcat中catalina.sh设置JAVA_OPTS=
JAVA_OPTS="-server -Xms595M -Xmx595M -Xmn223M -XX:SurvivorRatio=10 -Xss1M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+UseCMSCompactAtFullCollection -XX:+ExplicitGCInvokesConcurrent -Djava.rmi.server.hostname=192.168.58.128 -Dcom.sun.management.jmxremote.port=1234 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -agentpath:/opt/jprofiler7/bin/linux-x86/libjprofilerti.so=port=8849,nowait"
在CMD中输入
![](https://images2018.cnblogs.com/blog/774142/201804/774142-20180410163000955-676430040.png)
或在运行中输入jvisualvm
右键添加远程主机,添加JVM连接