Dashboard > Jetty > ... > Jetty Documentation > Running Jetty with jconsole
Running Jetty with jconsole Log In | Sign Up   View a printable version of the current page.

Added by Jan Bartel , last edited by Greg Wilkins on Mar 09, 2008  (view change)
Labels: 
(None)

Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

How to Run Jetty with jconsole

All you need do is start jconsole and then start jetty with a special system property:

Jetty Standalone

jconsole &
java -Dcom.sun.management.jmxremote -jar start.jar [config files]

Jetty Maven Plugin

If you are running the jetty maven plugin, then you need to start it like so:

mvn -DMAVEN_OPTS=-Dcom.sun.management.jmxremote jetty:run

You should see a dialog like so (Note that with the jetty maven plugin, there entry will say "org.codehaus.classworlds.Launcher "jetty:run"" instead):

Select the start.jar entry and click on the Connect button.A new jconsole window will open:

From this window you will be able to monitor memory usage, thread usage, classloading and vm statistics. You'll also be able to perform operations such as doing a manual garbage collect. Jconsole is an extremely powerful and useful tool.

Using the Jetty MBeans with jconsole

The MBean tab of jconsole allows access to managed objects within the java application, including MBeans provided by the JVM.
If you also want to be able to interact with the Jetty JMX implementation via jconsole, then you need to start Jetty JMX in a form that jconsole can access. Do:

java -Dcom.sun.management.jmxremote -jar start.jar etc/jetty-jmx.xml etc/jetty.xml [config files]
jconsole &

See JMX for more details.

Site running on a free Atlassian Confluence Open Source Project License granted to The Codehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.2 Build:#919 Nov 26, 2007) - Bug/feature request - Contact Administrators