How to use JConsole of JDK1.5

JConsole is a GUI tool for monitoring resource consumption and performance of applications running on JVM.

Step 1. Enable connections to the X server (xhost +).

Step 2. Set com.sun.management.jmxremote property when starting the java application for JConsole monitor  (JDK_HOME/bin/java -Dcom.sun.management.jmxremote …)

Step 3. Start JConsole (JDK_HOME/bin/jconsole) and select a process you want to monitor

or specify a specific process id when starting JConsole (JDK_HOME/bin/jconsole PID).

PS: If you do not do Step 2, no managed VM can be monitored. A message, such as XXX is not a managed VM, will occur.

Reference: JConsole

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s