Jconsole, JVISUALVM monitoring the configuration of Tomcat running under remote Linux

Source: Internet
Author: User
Tags tomcat server jconsole

1. Edit tomcat/bin/catalina.sh

Locate the Execute the requested Command and add the following code to the comment (No line break in the middle):

catalina_opts= "$CATALINA _opts-djava.rmi.server.hostname=10.12.116.135-dcom.sun.management.jmxremote- Dcom.sun.management.jmxremote.port=8088-dcom.sun.management.jmxremote.ssl=false- Dcom.sun.management.jmxremote.authenticate=true "

NOTE: hostname is the tomcat server Ip,port is the monitoring port (cannot be duplicated with Tomcat ports).

2. Edit Jmxremote.access and Jmxremote.password

These two files are in the/home/java/jdk1.6.0_02/jre/lib/management directory of the JDK, and the CD enters into the management directory, Rename the jmxremote.password.template to Jmxremote.password, which is the user name password that controls the remote connection.

Compile: VI Jmxremote.password, modify the following two lines to remove the comment #:

# Monitorrole XXXXXX

# Controlrole XXXXXX

Monitorrole is the view role, with read-only permission, XXXXXX is the password that is set.

Controlrole is the control user, has read and write permissions, XXXXXX is the password set.

3. If a firewall is turned on, add the port to the Firewall trust list

Add the following line to the/etc/sysconfig/iptables:

-A rh-firewall-1-input-p tcp-m state--state new-m TCP--dport 8088-j ACCEPT

Then start Tomcat, and the 8088 port you just set is on the listening state.

4.jconsole monitoring of Tomcat running under remote Linux

In the bin directory of the native JDK, open jconsole.exe, select "Remote Process", enter the IP address and port number of the server where Tomcat resides, and enter the user name and password:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/7C/wKiom1Wd6bmBMX6KAAFE1hqgaR8288.jpg "title=" 1.jpg " alt= "Wkiom1wd6bmbmx6kaafe1hqgar8288.jpg"/>

Click "Connect" to view the monitoring situation:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/7C/wKiom1Wd6cuDE7cIAAKD5j2TI70542.jpg "title=" 2.jpg " alt= "Wkiom1wd6cude7ciaakd5j2ti70542.jpg"/>

5.JVISUALVM monitoring of Tomcat running under remote Linux

Similarly, in the bin directory of the native JDK, open Jvisualvm.exe and right-click on the remote to add the remote host:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/78/wKioL1Wd67ThQasRAALSeXv2N1U557.jpg "title=" 3.png " alt= "Wkiol1wd67thqasraalsexv2n1u557.jpg"/>

Right-click on the remote host to add a JMX connection

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/7C/wKiom1Wd6g7yxhyaAAIruUYGhEI389.jpg "title=" 5.jpg " alt= "Wkiom1wd6g7yxhyaaairuuyghei389.jpg"/>


Double-click the JMX connection to view the monitoring situation:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/7F/wKiom1WeFpvyufjFAATFEsde8hE505.jpg "title=" 6.jpg " alt= "Wkiom1wefpvyufjfaatfesde8he505.jpg"/>


This article from "If Small build" blog, declined reprint!

Jconsole, JVISUALVM monitoring the configuration of Tomcat running under remote Linux

Related Article

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.