day16_jvm02_jconsole

C:\Program Files\Java\jdk1.8.0_151\bin\jconsole.exe

jvm parameters are monitored in a startup file.

/opt/apache-tomcat-8.5.41/bin vi catalina.sh modify this profile

JAVA_OPTS="-Dcom.sun.management.jmxremote.port=8011

                       -Djava.rmi.server.hostname = XXXXXip address

                       -Dcom.sun.management.jmxremote.rmi.prot=8011

                       -Dcom.sun.management.jmxremote.ssl=false

                       -Dcom.sun.management.jmxremote.authenticate=false"

JAVA_OPTS only a force, if more needs to leave a comment out of use, if you want to be appended to monitor two

Restart tomcat

sh startup.sh && tail -f ../logs/catalina.out

Check the port number

netstat  -anp|grep 1090

Connections are not being given:

jvm using the IP address of hostname -i, / the hosts 127.0.0.1, so always connect remote I / etc is not on.
Simply add java startup parameters -Djava.rmi.server.hostname = 192.168.0.10 explanatory JVM returns the IP address to the jconsole.

 

 

Guess you like

Origin www.cnblogs.com/njq666/p/10975273.html