Thoughts on software development and other stuff

Firing up the JMX Reporter in Coherence 3.4

without comments

Lately I have been helping customers set up the Coherence JMX Reporter. This is a new feature in 3.4 that will output statistics for the cluster to a CSV file that can be loaded into Excel for analysis. This feature can be enabled or disabled (it is disabled by default) in a running 3.4 cluster that has JMX for the cluster already enabled.

First, log into JConsole and take a look at the attributes for the Reporter MBean. The ConfigFile property points to an XML file that contains a list of reports to be executed (each report is also defined by an XML file.) The default value is reports/report-group.xml, however if you want to sample all of the OOTB reports, change this value to reports/report-all.xml. Alternatively, you can define your own reports based on the JMX information that you’d like to keep track of. These reports ship inside of coherence.jar.

After selecting the reports to run and (optionally) the IntervalSeconds (60 by default) and the OutputPath (defaults to the directory the JVM process is running in), flip over to the Reporter operations and select “start.”

Note: if using JConsole that ships with 1.6, you may have to specify that the IntervalSeconds is a long type. For instance, to specify a 30 second interval, enter “30L” without the quotes into the field. This is due to a bug in JConsole.

After starting up the reporter, you should see a few .txt files generated in the OutputPath. These reports are described in detail in the user guide. I opened up two of them (Cache Size and Memory Status and took a few screenshots of these files in Excel:

This graph is demonstrating the total size of the data in a cache.

The light blue line is showing the amount of heap allocated, and the red is showing the amount of heap being used.

Written by Patrick Peralta

February 19th, 2009 at 11:56 am