Wednesday, June 21, 2006
Using JConsole to Monitor Applications
Java SE 5 (JDK 1.5) includes a powerful facility for monitoring Java applications and servers.
The GUI application that is the front-end for this facility is JConsole. Using the JMX Remote API, it can tap into applications running in other processes - even other computers - and display graphically or using tables exactly what is going on.
Using the JMX API, an application can declare MBeans. In addition, starting with Java SE 5, the JVM itself comes with a number of useful MBeans. These particular beans cut right into the JVM, giving you a view into its major moving parts:
That is enough to tell at a glance what is going on as far as the most common points of failure. Also, the more mysterious ones.
Using JConsole to Monitor Applications:
The article is fantastic. It is richly illustrated with numerous screenshots to concretely demonstrate what it is saying. It includes pithy little program listings interspersed throughout the text. And when they author mentions a class - he gives its full name - including the package - so you can go look it up.
The GUI application that is the front-end for this facility is JConsole. Using the JMX Remote API, it can tap into applications running in other processes - even other computers - and display graphically or using tables exactly what is going on.
Using the JMX API, an application can declare MBeans. In addition, starting with Java SE 5, the JVM itself comes with a number of useful MBeans. These particular beans cut right into the JVM, giving you a view into its major moving parts:
- logging
- class loading
- memory
- GC
- Threads
- OS
- compiler
That is enough to tell at a glance what is going on as far as the most common points of failure. Also, the more mysterious ones.
Using JConsole to Monitor Applications:
The Java 2 Platform, Standard Edition (J2SE) 5.0 release provides comprehensive monitoring and management support. It not only defines the management interfaces for the Java virtual machine, but also provides out-of-the-box remote monitoring and management on the Java platform and of applications that run on it. In addition, JDK 5.0 includes the Java Monitoring and Management Console (JConsole) tool. It uses the extensive instrumentation of the Java virtual machine to provide information on performance and resource consumption of applications running on the Java platform using Java Management
Extension (JMX) technology.
The article is fantastic. It is richly illustrated with numerous screenshots to concretely demonstrate what it is saying. It includes pithy little program listings interspersed throughout the text. And when they author mentions a class - he gives its full name - including the package - so you can go look it up.
