The following is a simple procedure for configuring using the JXM protocol, and the details can be read in the reference material after the article.
1. Remote host
(1) Modify the configuration file for the JMX service:
In the JDK root directory/jre/lib/management, save Jmxremote.password.template as Jmxremote.password.
Use file editing software to remove Jmxremote.password by editing
# Monitorrole QED
# Controlrole R&d
Before the # Note, save.
If the current system belongs to AIX, Linux, or Solaris systems, you need to change jmxremote.access and Jmxremote.password permissions
To read only, commands are as follows
chmod jmxremote.access Jmxremote.password
(2) Modify the startup configuration information for the JVM:
Windows system
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 the remote host port number.
-dcom.sun.management.jmxremote.ssl=false whether to use an SSL connection
-dcom.sun.management.jmxremote.authenticate=false whether to turn on remote service permissions
-djava.rmi.server.hostname remote host name, using IP address
(3) Restart the service.
2. Local Host Configuration
The
method starts the Jconsole command line tool by entering the <jdk_home>\bin directory one ,
. Add the transport computer information to the new connection in Jconsole.
For example: 192.168.1.24:1099 or service: JMX:RMI:///JNDI/RMI://192.168.1.24:1099&NBSP
<port> Transport host Port
Method Two ,
the version above JDK 1.6 contains a simple version of Jvisualvm.exe. Select Add remote host in the right mouse menu on remote, and enter the host name of the transport computer, which is actually the IP address of the remote computer to be detected. Right-click on the configured remote host to select Add JMX Connection ..., enter the remote host information according to the format required in method one.
Reference:
[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
[There's a baby hidden in the JDK. Its name is 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 documentation on Java VISUALVM
Http://download.oracle.com/javase/6/docs/technotes/guides/visualvm/intro.html
VISUALVM's download address is as follows:
Download Address: http://visualvm.java.net/