JAVA VIRTUALVM Remote Monitoring configuration

Source: Internet
Author: User

Virtual VM is the JDK6 Update7 tool, there is a tendency to assemble other JDK tools, the current version of JDK7 has supported most of the monitoring capabilities, as if not as Jprofile and Youkit to support real-time tracking memory stack to locate the memory leak problem.

For remotely applied connections, Virtual VMS provide two ways: Jmx and JSTATD, and the configuration of these two connections is described below.

Jmx:

Locate the Jmxremote.password.template file under Jre/lib/management in the JDK directory on the remote server, and then copy it to the file that Pwd.file points to (for example, CP./ JMXREMOTE.PASSWORD.TEMPLATE/JMX/JMX.PWD), add the username and password in the last line of the Jmx.pwd file, in the format: username password

such as: Jmx JMX

Adding JVM Parameters

Java_options= "${java_options}-dcom.sun.management.jmxremote.port=6789"

Java_options= "${java_options}-dcom.sun.management.jmxremote.pwd.file=/jmx/jmx.pwd"

Java_options= "${java_options}-dcom.sun.management.jmxremote.ssl=false"

Java_options= "${java_options}-dcom.sun.management.jmxremote.authenticate=false"

Finally, after restarting the remote server application, you can connect using the Java VIRTUALVM.

JSTATD:

Create a Java.policy file on the remote server, such as:

/tmp/jstatd.java.policy 
Grant codebase "file:${java.home}/. /lib/tools.jar "{ 
   permission java.security.AllPermission; 
};

To start the JSTATD process on a remote server:

Jstatd-j-djava.security.policy=/tmp/jstatd.java.policy-j-djava.rmi.server.logcalls=true

You can then connect with the Java VIRTUALVM on the client.

Source: http://stevex.blog.51cto.com/4300375/771990

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.