|
Monitoring Java Applications with JConsole
Posted by Mark Lucas (WANdisco) on 07 January 2010 11:20 AM
|
|
|
Summary: Introduction to an invaluable console tool for monitoring Java applications and virtual machines.
PurposeJconsole 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.
ArchitectureThe 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).
Version CompatibilityJConsole is bundled with the Java Development Kit (JDK) in the Java SE platform version 6 update 7. SetupWith 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: % -Dcom.sun.management.jmxremote LocationThe jconsole executable can be found in JDK_HOME/bin, where JDK_HOME is the directory in which the JDK software is installed. To execute: % jconsole processID (where JDK_HOME/bin is in your path) Thread based CPU usageThe 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 References
Using JConsole to Monitor Applications - http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html Last edit: mlucas 07th Jan 2010 | |
|
|
|



