jconsole - Java Monitoring and Management Console

In this article we are going to elaborate the jconsole command tool which is a part of JAVA commands (comes with jdk package). This article is the continuation of this previous article.

As we know the standard format of commands in java, the jconsole command also have the format(in command prompt)
jconsole [option] [connection..]
In here , a Connection will be consist of java process ID of a local JVM or Name of host on which JVM is running and the port number specified by the system property or address of the JMX agent( following this) . So ,
connection = pid | host:port | jmxUrl
jconsole command launches a graphical console tool that enables monitoring and managing Java applications and virtual machines on a local or remote machine.

jconsole options:
-interval=[n] : Set the update interval to n seconds (default = 4s).
-notile : Does not tile windows initially (for two+ connections).
-pluginpath [path to plugins]: Specify a list of directories or JAR files for JConsole plugins.
-J[option] : Pass option to the Java virtual machine on which jconsole is running.

When we start jconsole, we get the Java Monitoring & Management console with New Connection wizard. (I have started jconsole from command prompt, so we can see the jconsole in local process).

We can get remote process also.

Now, we connect to a process. ( I have connected to jconsole it self). When we connect, we get detail information viewer.
In overview, we can see the graphs of Memory, Threads, Classes, CPU used by VM. Detail of these information are displayed in separate tabs. We can select time range which define the display information's time span.

In right upper corner we can see the disconnect button used for disconnect with current VM.

Memory : In this tab we see detail memory used.
-Perform GC button performs garbage collection if we click on that. GC performs on Eden Space(heap), Survivor Space(heap), Tenured Generation(heap), Permanent Generation(non-heap), Code Cache(non-heap).
-We can see different type of memory information from selectable combo option
-In Down right, we can see Heap & Non-Heap memory info using a Bar chart.
-In Down Left , we can get detail memory info.

Threads : In this tab we see detail Thread operations