JVM Monitoring and Management Using JMX
This steps will allow you to monitor your JVM using JMX for JAVA 1.5
- Go to $JRE_HOME/lib/management
- copy jmxremote.password.template and rename to jmxremote.password
- change the file mode so it can be edited.
- edit the jmxremote.password file. uncomment the setting for password at the bottom of the file.
monitorRole QED
controlRole R&D - these roles must exist in jmxremote.access file.
- add these option to your JVM JAVA_OPTIONS parameter
-Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=<port-number>
-Dcom.sun.management.jmxremote.local.only=false will allow you to monitor your JVM from remote machine.
-Dcom.sun.management.jmxremote.ssl=false will allow you to not using SSL (they need more settings)
-Dcom.sun.management.jmxremote.port=<port-number> is the port number to connect to JMX - Now you can monitor you JVM using jconsole. You should have jconsole if you have jdk installed on your machine. Just and the JAVA_HOME and add JAVA_HOME/bin to you PATH. Then run this command:
jconsole ip-address:port
- Go to remote tab and insert your username and password (for example monitorRole QED)
Now you can monitor your JVM from your local machine.
For complete documentation you can read here: http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html#jconsole_remote
Recent Comments