Pages

Friday 9 August 2013

Remote JMX connection

As I've been working for the past while on remote testing in JMeter, I'm also trying to monitor the memory usage as well as monitoring attributes of objects and classes.  I learned that the plugin from JVM called MBeans was able to monitor this type of information.  Aftering do more research, I learned that a remote JMX connection needs to be instantiated in order for MBeans to read the information.

With further research, I encountered a very useful blog here and  a follow entry here which gave me a better idea of how it all works.  Answers to questions that hadn't even arose yet were all answered a thorough walkthrough was provided.

To start things off, JMX is a technolgy that allows users and developers to manage their Java applications and services.  To start the JMX agent, arguments in the format of -Dpropertyname=value  are placed after the java command (java -Dpropertyname=value ./javaapp).

For my monitoring environment, the arguments I specifically need are:

  • -Dcom.sun.management.jmxremote (since I am running remote monitoring)
  • -Dcom.sun.management.jmxremote.port=portnum (where portnum is neither the port number of my jstatd connection nor jmeter-server)
  • -Dcom.sun.management.jmxremote.ssl=false (allows me to connect without needing my ssl configurations)
  • -Dcom.sun.management.jmxremote.authenticate=false (allows me to connect without a password file)
And voila!  The connection is made and I can successfully monitor my applications and the attributes :).  

No comments:

Post a Comment