Monitoring Tomcat server using JConsole
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.
We can use this tool to monitor the Tomcat server for getting memory, threads, classes, VM, Mbeans details. It comes with JDK 5.0 And could be found inside bin folder (jconsole.exe).
There are 2 ways to launch this.
1. Start the tomcat and run this tool. And you will see the Tomcat Catalina process with its id, select that and click on connect.
Step 1: Supply the remote process.
e.g : <hostname>:<port> or service:jmx::<protocol>:<sap>
You will see the screen on the Console displaying all the details. It is very useful when it comes to debug issues with Server environment.
For more information of using this tool, you can read http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html.