Requires JDK to be installed under the NTFS file system
First, configure the startup statement
In the case of a bin/catalina.bat (Linux for catalina.sh) under the Tomcat,window version, the annotation section on the header (. Bat is REM,. SH is #) followed by
Set java_opts=%java_opts%-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.port=8999- Dcom.sun.management.jmxremote.authenticate=false-dcom.sun.management.jmxremote.ssl=false
If you are installing Tomcat, there is no Catalina.bat file, we need to open tomcat5w.exe into the console, click on the Java tab, add the following 4 lines in the text box below Java_options
-dcom.sun.management.jmxremote
-dcom.sun.management.jmxremote.port=8999
-dcom.sun.management.jmxremote.authenticate=false
-dcom.sun.management.jmxremote.ssl=false
Note: These 4 lines of text are wrapped, and there is no space before and after each line.
Second, modify JMX remote access authorization
Defaults to Java_home/jre/lib/management jmxremote.access and Jmxremote.password
is to change the Jmxremote.password.template file name to Jmxremote.password.
Third, test whether JMX successfully configured
Start Tomcat, enter in Windows command window: Netstat-aon | Findstr "8999" If this port is already in use, it proves that the JMX configuration was successful
Four, turn on JMX monitoring
Run%java_home%\lib\jconsole.jar
Enter Tomcat machine IP, port input 8999
If you are running on this computer, you can enter the connection directly without entering the username and password.
Account number, password in the Jmxremote.password, such as account Controlrole, password r&d (the default monitorrole can only read, Controlrole can read and write, jmxremote.access can be configured). Point "Connection"
The corresponding data is given in the Mbean property page, which is Tomcat in the Catalina and Java.lang is the JVM. For bold bold values, you need to double click to see the content.