Please make sure that Jconsole is immediately closed after investigation otherwise if left open, it might lead to downtime of application.
Jconsole is a JMX-compliant monitoring tool. It uses the extensive JMX instrumentation of the Java virtual machine to provide information on performance and resource consumption of applications running on the Java platform.
JConsole is used to access several core monitoring and management functionalities provided by the Java platform including:
a) Detect low memory
b) Enable or disable GC and class loading verbose tracing
c) Detect deadlocks
d) Control the log level of any loggers in an application
e) Access OS resources—Sun’s platform extension
f) Manage an application’s Managed Beans (MBeans)
a) Starting JConsole
The jconsole executable can be found in JDK_HOME/bin, where JDK_HOME is the directory in which the Java Development Kit (JDK) is installed. If this directory is in your system path, you can start JConsole by simply typing jconsole in a command (shell) prompt. Otherwise, you have to type the full path to the executable file.
b) Find out the pid of the process you would like to monitor.
For eg, lets take Pid: 24366 which is our SOA Managed Server.
d) Select the pid and click Connect.
Overview: The tab displays some key monitoring information on thread usage, memory consumption, and class loading, plus information on the JVM and operating system.
Memory: The chart shows the JVM’s memory use versus time, for heap and non-heap memory, and for specific memory pools. The memory pools available depend on the JVM being used.
Threads: The Threads list in the lower left lists all the active threads. If you enter a string in the Filter field, the Threads list will show only those threads whose name contains the string you enter. Click on the name of a thread in the Threads list to display information about that thread to the right, including the thread name, state, and stack trace.
Classes: The graph plots the number of classes loaded versus time:
Red line is the total number of classes loaded (including those subsequently unloaded).
Blue line is the current number of classes loaded.
The Details section at the bottom of the tab displays the total number of classes loaded since the JVM started, the number currently loaded and the number unloaded.
VM Summary: The VM tab provides information on the JVM.
The information includes:
Uptime: Total amount of time since the JVM was started.
Process CPU Time: Total amount of CPU time that the JVM has consumed since it was started.
Total Compile Time: Total accumulated time spent in just-in-time (JIT) compilation. The JVM implementation determines when JIT compilation occurs. The Hotspot VM uses adaptive compilation, in which the VM launches an application using a standard interpreter, but then analyzes the code as it runs to detect performance bottlenecks, or “hot spots”.
MBeans: The tree on the left shows all the MBeans, organized according to their objectNames. When you select an MBean in the tree, its attributes, operations, notifications and other information is displayed on the right.
You can set the value of attributes, if they are writeable (the value will be displayed in blue). You can also invoke operations displayed in the Operations tab.