jconsole is a gui tool that ships with the jdk.

since 1.6 it supports using a socks proxy to connect to a remote system.

jconsole can be used to monitor local and remote applciations.

(oracle recomment remote monitoring with jconsole, to limit the resource contention)

Dynamic attachment Edit

"However, the version of JConsole provided with the Java SE 6 platform can attach to any application that supports the Attach API. In other words, any application that is started in the Java SE 6 HotSpot VM is detected automatically by JConsole, and does not need to be started using the above command-line option."

So basically, if you don't have remote debugging enabled applications can be attached to locally using jconsole (and X forwarding, or something hacky like that)

Debugging jconsole Edit

So its not working. Well turn on the logging and the debugging like this then

jconsole -debug -J"-Djava.util.logging.config.file=FILENAME"

SSL Edit

glassfish and similar will enable SSL on JMX remote ports, so you can either configure it using the details below, or disable it like so;

if your jmx is protected by a firewall and tunnelled over SSH, you might want to disable authentication also;

Assuming you created a keystore as described in the JSSE Guide and started your application (Server) as follows:

   % java \ Server

To connect to this application, you need to run jconsole as follows:

   % jconsole \

Using jconsole - chapter 3 "Java SE Monitoring and Management guide"

troubleshooting Edit

tomcat 5 Edit

on tomcat 5.5x you can configure a remote JMX port using the standard JVM options like so in, or whereever is appropriate;

   set \ \ \


Tomcat 6 Edit

tomcat provides some ant tasks to allow ant to work with JMX management extensions here;

glassfish Edit

glassfish provides a JSR 160 compliant JMX connector on port 8686 by default

this is enabled from the "server-config"->Admin Service menu

other Edit

Note: If the JMX agent is using in a connector which is not included in the Java platform, you need to add the connector classes to the classpath when running jconsole as follow:

jconsole -J-Djava.class.path=JAVA_HOME/lib/jconsole.jar:JAVA_HOME/lib/tools.jar:connector-path