Monitoring Java Applications with JConsole
Posted by Mark Lucas (WANdisco) on 07 January 2010 11:20 AM
Jconsole gives you information about the performance and resource consumption of applications running on the Java platform; Namely Heap Usage, CPU (total JVM not per-thread), thread info, classes loaded and garbage collection info.
The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM).
JConsole is bundled with the Java Development Kit (JDK) in the Java SE platform version 6 update 7.
With Java SE 6 platform and above no setup is required.
The version of JConsole provided with the Java SE 6 platform can attach to any application that supports the Attach API.
On previous releases of the Java SE platform, applications that you wanted to monitor with JConsole needed to be started with the following option:
The jconsole executable can be found in JDK_HOME/bin, where JDK_HOME is the directory in which the JDK software is installed.
% jconsole processID
(where JDK_HOME/bin is in your path)
Thread based CPU usage
The JTop application is a JDK demonstration that shows the CPU usage of all threads running in the application.
This demo is useful for identifying threads that have high CPU consumption, and it has been updated to be used as a JConsole plug-in as well as a standalone GUI.
JTop as a plug-in
JTop is bundled with the Java SE 6 platform, as a demo application. You can run JConsole with the JTop plug-in by running the following command:
% JDK_HOME/bin/jconsole -pluginpath JDK_HOME/demo/management/JTop/JTop.jar
Using JConsole to Monitor Applications - http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html
Last edit: mlucas 07th Jan 2010