Monitor JVM memory usage of remote hosts using Java's built-in visualvm

Source: Internet
Author: User
Tags ssl connection visualvm jconsole

The following is a simple procedure for configuring the jxm protocol. For more information, see references.
1. Remote Host

(1) modify the configuration file of the JMX service:
In the JDK root directory/JRE/lib/management, save jmxremote. Password. template as jmxremote. Password.
Remove the jmxremote. Password File by using the file editing software.
# Monitorrole QED
# Controlrole R & D
Note and save the previous.
If the current system belongs to the Aix, Linux, or Solaris system, you also need to change the permissions of jmxremote. Access and jmxremote. Password.
Read-only write. The command is as follows:
Chmod 600 jmxremote. Access jmxremote. Password

(2) modify the jvm startup configuration:

 

Windows
Set java_opts =-DCOM. Sun. Management. jmxremote. Port = <port>-DCOM. Sun. Management. jmxremote. SSL = false
-DCOM. Sun. Management. jmxremote. Authenticate = false-djava. RMI. server. hostname = -DCOM. Sun. Management. jmxremote. SSL = false

 

Aix, Linux, or Solaris
Export java_opts = "-DCOM. Sun. Management. jmxremote. Port = <port>-DCOM. Sun. Management. jmxremote. SSL = false
-DCOM. Sun. Management. jmxremote. Authenticate = false-djava. RMI. server. hostname = -DCOM. Sun. Management. jmxremote. SSL = false"

For example:
Set java_opts =-DCOM. Sun. Management. jmxremote. Port = 1099-DCOM. Sun. Management. jmxremote. SSL = false
-DCOM. Sun. Management. jmxremote. Authenticate = false-djava. RMI. server. hostname = 192.168.1.24
-DCOM. Sun. Management. jmxremote. SSL = false

 

The configuration is described as follows:
-DCOM. Sun. Management. jmxremote. Port: Specifies the port number of the remote host.
-DCOM. Sun. Management. jmxremote. SSL = false: whether to use SSL connection
-DCOM. Sun. Management. jmxremote. Authenticate = false: whether to enable remote Service Permissions
-Djava. RMI. server. hostname: Remote Host Name, IP address used

 

(3) restart the service.

 

2. Local host configuration

Method 1,
Go to the <jdk_home> \ bin directory and start the jconsole command line tool. In the new connection of jconsole, add the information of the running computer.
<Hostname >:< port> or service: JMX: <protocol >:< sap>
Example: 192.168.1.24: 1099 or service: JMX: RMI: // JNDI/RMI: // 192.168.1.24: 1099
<Hostname> check the Server IP Address
<Port> host port
Method 2,
JDK 1.6includes a simple jvisualvm.exe file. Right-click Remote and choose add remote host from the shortcut menu. Enter the Host Name of the running computer, which is actually the IP address of the remote computer to be detected. Right-click the configured Remote Host and choose add JMX connection.... Enter the remote host information in the format required in method 1.

Refer:
[Java visualvm Getting Started Guide]
Http://visualvm.java.net/zh_CN/gettingstarted.html
[Java visualvm Quickstart]
Http://visualvm.java.net/api-quickstart.html
[Monitoring wasce in jconsole] [main reference]
Http://publib.boulder.ibm.com/wasce/V2.1.0/en/working-with-jconsole.html
[JDK also contains a baby named visualvm]
Http://developer.51cto.com/art/200906/130424.htm
[JVM memory monitoring: visualvm]
Http://www.diybl.com/course/3_program/java/javajs/20100719/461823.html
Sun's instructions on Java visualvm
Http://download.oracle.com/javase/6/docs/technotes/guides/visualvm/intro.html

 

The visualvm is as follows:

: Http://visualvm.java.net/

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.