Jvisualvm Remote Monitoring Tomcat

Source: Internet
Author: User

1. In the last row of $ catalina_home/bin/startup. Sh (that isExec "$ prgdir"/"$ executable" start "[email protected]"Line above) Add the following content:

 
Export catalina_opts ="$ CATALINA_OPTS-Dcom.sun.management.jmxremote-djava. RMI. server. hostname = 192.168.1.130-DCOM. sun. management. jmxremote. port = 7003-DCOM. sun. management. jmxremote. SSL = false-DCOM. sun. management. jmxremote. authenticate = true-DCOM. sun. management. jmxremote. password. file = .. /CONF/jmxremote. password-DCOM. sun. management. jmxremote. access. file = .. /CONF/jmxremote. access"

The parameters are described as follows:

-DCOM. Sun. Management. jmxremote enables JMX Remote Monitoring-Djava. RMI. server. hostname =192.168.1.130This is the address connecting your Tomcat server-DCOM. Sun. Management. jmxremote. Port =7003JMX connection Port-DCOM. Sun. Management. jmxremote. SSL =FalseSSL encryption?-DCOM. Sun. Management. jmxremote. Authenticate =TruePassword authentication is required for remote connection.-DCOM. Sun. Management. jmxremote. Password. File = ../CONF/Jmxremote. Password specifies the connection user name and password configuration file-DCOM. Sun. Management. jmxremote. Access. File = ../CONF/jmxremote. Access specifies the configuration file with the permission of the connected user.

2. In $ catalina_home/lib/jmxremote. Access, add the user name and permissions for connection monitoring:

MonitorroleReadonlyControlrole readwrite

3. Add the username and password for connection monitoring in $ catalina_home/lib/jmxremote. Password. the user's permissions are in jmxremote. Access and configured:

 
Monitorrole111111Controlrole222222

4. modify the permissions of jmxremote. Access and jmxremote. Password:

 
Sudo chmod600JMX *

5. Restart tomcat.

6. Open jvisualvm.exe under $ java_home/bin, as shown in the following figure:

7. Right-click on the remote server, add the host, and enter the IP address of the server:

8. Right-click on the remote host and add a JMX connection. My port number is 7003. OK:

9. This will prompt you to enter the user name and password, that is, the user name and password you set in jmxremote. Password:

10. Enter the correct user name and password, and click the link to open the connection. The following figure is displayed:

you can view the server resources and tomcat threads.

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.