JVISUALVM with JSTATD for remote monitoring +tomcat (view full version)

Source: Internet
Author: User

1. Turn off the firewall:

/etc/init.d/iptables stop

2. Start the remote JSTATD

2.1 Configure Java Secure Access, save the following code as a file Jstatd.all.policy (name random), but put it in Java_home/bin, the content is as follows,

Grant CodeBase "file:${java.home}/. /lib/tools.jar "{permission java.security.AllPermission;};

2.2 Enter into Java_home/bin, save the following code as file startjstatd.sh, and give execute permission

chmod 777 startjstatd.sh

View the contents of the file as shown in: (The & symbol is run in the background, nohup is not affected by the window closing)

3, open the local JVISUALVM, right-click Remort, select "Add remort Host ...", enter your remote IP in the popup box, such as 192.168.0.23. Connection Successful

4. Close Tomcat:

Find Tomcat Process number

Ps-ef |grep Tomcat

Kill the Tomcat process

Kill-9 <pid Process Number >

5, download Jmx_remote.jar to the Tomcat folder in the Lib directory

Cd/usr/local/tomcat/lib/wget Http://apache.fayea.com/tomcat/tomcat-7/v7.0.61/bin/extras/catalina-jmx-remote.jar

6. Modify Tomcat Server.xml

Cd/usr/local/tomcat/confvi Server.xml

Add the following code to the Server.xml configuration file

<listener classname= "Org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiregistryportplatform= "12345" rmiserverportplatform= "12346"/>

7. Modify the catalina.sh file under Tomcat's Bin directory

Cd/usr/local/tomcat/binvi catalina.sh

Add the following code to the catalina.sh configuration file

Catalina_opts= "-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.authenticate=false- dcom.sun.management.jmxremote.ssl=false-djava.rmi.server.hostname=192.168.0.23 "

You can also add the following code within the startup.sh

8. Start Tomcat

./startup.sh

9, Win7 add jmx, port number 12345

JVISUALVM with JSTATD for remote monitoring +tomcat (view full version)

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.