...
Using JConsole and Java 5
The Java-2 Platform, Standard Edition (J2SE) 5.0 release includes a JMX monitoring
tool, JConsole. JConsole monitors applications running on the Java platform and
provides information on their performance and resource consumption. Please see
Sun's documentation for more information:
http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html
The JConsole executable can be found in the bin
directory of the J2SE
installation directory.
To use JConsole to monitor ServiceMix:
Note: ServiceMix should be running first!
You need to know the ServiceMix port number and the ServiceMix container id.
By default:
- the port is 1099
- Run jconsole from a command shell:
Code Block cd [J2SE_install_dir]\bin jconsole
- Click on the Advanced tab.
Enter the following in the Form:
JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/defaultJBIJMX
Testing JConsole with ServiceMix
To see JConsole in action, start one of the ServiceMix examples running, for instance, the
Basic Example:
Code Block |
---|
cd [servicemix_install_dir]\examples\basic
..\..\bin\servicemix servicemix.xml
|
Then run JConsole and
To enable JMX remoting with Java 5 on some platforms you need to do this first (e.g. on windows?)the JAVA_OPTS environment variable needs to be set first. There's no need to set this on OS X for sureor Windows:
Code Block |
---|
export JAVA_OPTS="-Dcom.sun.management.jmxremote.port=5001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" |
...