A third option is to uncomment the same within <code>start.ini</code> (done by default in Jetty Hightide).

A third option is to uncomment the same within <code>start.ini</code> (done by default in Jetty Hightide).

−

Once you enable JMX, you can use jconsole or any other JMX client to see the Jetty mbeans. In jconsole this is under the mbeans tab. You should see many mbeans under <code>org.eclipse.jetty.*</code> namespace. Many mbeans (handlers, connectors, etc.) now have individual <code>dump()</code> methods; for example you can go to the mbean <code>org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0</code>, call the <code>dump()</code> operation, and see stack traces of the idle threads in that threadpool.

+

===Viewing Jetty MBeans===

−

==Using the Server mbean Dump Method==

+

Once you enable JMX, you can use jconsole or any other JMX client to see the Jetty MBeans. In jconsole this is under the MBeans tab. You should see many MBeans under <code>org.eclipse.jetty.*</code> namespace. Many MBeans (handlers, connectors, etc.) now have individual <code>dump()</code> methods; for example you can go to the MBean <code>org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0</code>, call the <code>dump()</code> operation, and see stack traces of the idle threads in that threadpool.

−

The Server mbean also has a <code>dump()</code> method, which dumps everything, plus a <code>dumpStdErr()</code> operation that dumps to stderr rather than replying to jconsole.

+

==Using the Server MBean Dump==

+

+

The Server MBean also has a <code>dump()</code> method, which dumps everything, plus a <code>dumpStdErr()</code> operation that dumps to stderr rather than replying to jconsole.

Introduction

The dump feature in Jetty provides a good snapshot of the status of the threadpool, select sets, classloaders, and so forth. To get maximum detail from the dump, you need to setDetailDump(true) on any QueuedThreadPools you are using. You can do this by a direct call if you are embedding Jetty, or in jetty.xml.

Configuring the Dump Feature on the Server

These methods cause a dump at startup (to verify structure) and at shutdown (to see the current state). With dumpBeforeStop(true), you can hit Ctrl-C at any time to see server status (for example, if it is in 100% or a strange pause).

Configuring JMX When Starting Jetty

Uncommenting start.ini to Configure JMX

A third option is to uncomment the same within start.ini (done by default in Jetty Hightide).

Viewing Jetty MBeans

Once you enable JMX, you can use jconsole or any other JMX client to see the Jetty MBeans. In jconsole this is under the MBeans tab. You should see many MBeans under org.eclipse.jetty.* namespace. Many MBeans (handlers, connectors, etc.) now have individual dump() methods; for example you can go to the MBean org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0, call the dump() operation, and see stack traces of the idle threads in that threadpool.

Using the Server MBean Dump

The Server MBean also has a dump() method, which dumps everything, plus a dumpStdErr() operation that dumps to stderr rather than replying to jconsole.