JVM Monitoring and Management Using JMX


This steps will allow you to monitor your JVM using JMX for JAVA 1.5

  1. Go to $JRE_HOME/lib/management
  2. copy jmxremote.password.template and rename to jmxremote.password
  3. change the file mode so it can be edited.
  4. edit the jmxremote.password file. uncomment the setting for password at the bottom of the file.
    monitorRole  QED
    controlRole   R&D
  5. these roles must exist in jmxremote.access file.
  6. 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
  7. 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
  8. 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

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: