Skip to content

14. Application Analysis using JConsole

Ingo Rockel edited this page Nov 16, 2017 · 1 revision

With JDK 1.5 Sun introduced JConsole, a swing based tool for instrumentalizing the new JMX MBeans for VM analysis in 1.5 and to provide easy remote access to all other JMX MBeans offered (e.g. by the application server or an application). With the release of JDK 1.6 Sun enhanced the utility to also support plugins and simplified access to the applications to analyze. With JConsole it is quite easy to do some application analysis without critical impact on the application.

For enabling remote access to an application using JConsole you need an open port from the machine the application is running on and start the application with this port. To connect to a remote application running with JDK 1.5 you need to specify something like this:

                -Dcom.sun.management.jmxremote.port=5555 
                -Dcom.sun.management.jmxremote 
                -Dcom.sun.management.jmxremote.authenticate=false 
                -Dcom.sun.management.jmxremote.ssl=false

I have done this for connecting to an Oracle Application Server 10.1.3.2 instance. Note: this is not the recommended setting for an production environment as is insecure. Read the jconsole documentation on how to set up a secure connection to a JVM.