Enable JMX monitoring of Tomcat

Source: Internet
Author: User
Tags tomcat

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.