1: Open Tomcat's catalina.sh script file with vim on the Linux server to be monitored, and add the following parameters to the first line:
Java_opts= "-djava.rmi.server.hostname=120.26.204.80-dcom.sun.management.jmxremote- Dcom.sun.management.jmxremote.port=8999-dcom.sun.management.jmxremote.authenticate=true- Dcom.sun.management.jmxremote.ssl=false
-dcom.sun.management.jmxremote.pwd.file=/usr/java/jdk1.6.0_02/jre/lib/management/jmxremote.password
"
Java.rmi.server.hostname is used to set the IP address to monitor the server,Com.sun.management.jmxremote.port set the port to be monitored, Com.sun.management.jmxremote.authenticate Set Whether authentication is required,COM.SUN.MANAGEMENT.JMXREMOTE.SSL set whether SSL secure connection, Com.sun.management.jmxremote.pwd.file user settings Password file
2: Set Password file:
/jre/lib/in JDK installation directory Management directory has a jmxremote.password.template file, copy one and change the name jmxremote.password,
3: Use the JDK's own tool Jconsole tool to connect to remote Linux,
Remotely connect Linux monitoring JVM using Jconsole