Overview
GridGain comes with an extensive collection of JMX MBeans that exposes all major monitoring and statistical information about all nodes in the grid. This information is available via programmatic interface as well as through any JMX-compliant Web or standalone GUI viewer such as JConsole.
Starting JConsole
To start JConsole, simply go to your JAVA_HOME/bin folder and click on jconsole.exe on Windows or jconsole on Linux/Unix. We recommend using JConsole from Java6 distribution and above as it is friendlier to use. You can use it even if GridGain is started under Java5.
After having started JConsole, select the JVM for a grid node you wish to connect to and click Connect.
| Windows Domain and JConsole If you are using standard JDK JConsole on Windows you may encounter an undocumented behavior when you cannot locally connect to the JConsole if you logged in into Windows domain. In this case you will need to connect as 'remote'. For more information on troubleshooting see the following link: http://java.sun.com/j2se/1.5.0/docs/guide/management/faq.html |
For more information see Monitoring and Management Using JMX![]()
Connnecting to a Remote Grid Node
With JConsole you can connect to a remote grid node. For that, you need to uncomment the following line in GRIDGAIN_HOME/gridgain.sh or GRIDGAIN_HOME/gridgain.bat scripts, depending on your installation. Snippet below is split into multiple lines for formatting purposes.
JMX_MON="${JMX_MON} -Dcom.sun.management.jmxremote.port=49112
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false"
Then, on JConsole select "Remote Process" radio button and enter your grid node IP and port in the following format: "192.168.2.3:49112". Note that port "49112" is the one used by default when starting GridGain with remote JConsole connectivity option.
Working with JConsole
This section shows some examples GridGain JMX MBeans viewed in JConsole together with some standard JConsole screens.
Local Node Metrics
The image below is a snapshot of Local Node Metrics MBean which exposes over 50 statistical and monitoring properties for a given grid node. As you see, if you double-click on any property, it displays as a graph. For example, example below displays CPU load of a node as a graph. Note that you can also view current and average job execution time, current and average job wait time (time in waiting queue), number of executed/canceled/rejected jobs, total jobs, etc...

Thread Information
JConsole allows you to see all the threads running in your application, their state, and stack trace. For example, the image below shows information about TCP handshaker thread which runs in GridMulticastDiscoverySpi.

CPU Utilization
You have several options to view CPU utilization of a node. In addition to standard CPU utilization screen in JConsole,
GridGain exposes its own CPU metrics (it uses Hyperic SIGAR to detect CPU load). Current and Average CPU Utilization metrics are available as properties of Local Node Metrics MBean. Note that in many cases Hyperic SIGAR will provide more precise CPU utilization metrics than the default view in JConsole.

Heap Utilization
Screen shot below shows JVM Heap Utilization for a grid node. Note, that the same information is also available on Local Node Metrics MBean and can be viewed there as well.
Loaded Classes
Use number of loaded classes to detect if peer class loading is properly loading and unloading your classes. Image below shows a standard JConsole view which shows a graph for a number of loaded classes:

