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.