First, to modify the remote host (Linux) related files to be accessed, this document only describes the JMX mode of JAVA-JVISUALVM:
1. Open $catalina_home/bin/startup.sh and find the penultimate line (that is, exec "$PRGDIR"/"$EXECUTABLE" start "[email protected]" line above) and add the following:
Export catalina_opts= "$CATALINA _opts-dcom.sun.management.jmxremote-djava.rmi.server.hostname=192.168.*.*- Dcom.sun.management.jmxremote.port=7003-dcom.sun.management.jmxremote.ssl=false- dcom.sun.management.jmxremote.authenticate=true-dcom.sun.management.jmxremote.password.file=/opt/ apache-tomcat-6.0.18/conf/jmxremote.password-dcom.sun.management.jmxremote.access.file=/opt/ Apache-tomcat-6.0.18/conf/jmxremote.access "
2. Remark:
-dcom.sun.management.jmxremote Enable JMX remote monitoring
-djava.rmi.server.hostname=192.168.*.* the server address of the connection
-dcom.sun.management.jmxremote.port=7003 JMX Connection Port
-dcom.sun.management.jmxremote.ssl=false whether SSL encryption
-dcom.sun.management.jmxremote.authenticate=true The remote connection requires a password authentication (such as false after the can be omitted);
-dcom.sun.management.jmxremote.password.file=/opt/apache-tomcat-6.0.18/conf/jmxremote.password Specify the user name and password profile for the connection
-dcom.sun.management.jmxremote.access.file=/opt/apache-tomcat-6.0.18/conf/jmxremote.access A profile that specifies permissions for a connected user
3. Where Jmxremote.password file:
Monitorrole roor123
Controlrole root123
4.jmxremote.access file:
Monitorrole readonly
Controlrole ReadWrite
5. Restart the Tomcat service.
Second, create a JVISUALVM--JMX connection locally (Windows)
1. Open the Local installation Jdk_home/bin directory: C:\Java\jdk1.7.0_80\bin
2. Double-click: Jvisualvm.exe
3. Right-click Add Remote host:
4. Create a new JMX connection
5. View:
JAVA-JVISUALVM Remote monitoring Tomcat