High Quality Enterprise Messaging.

Monitoring and Tracing

The monitoring examples in this section are with SwiftMQ Explorer. The same can be done with various other built-in SwiftMQ administration tools and the SNMP Management Extension Swiftlet.

Monitoring AMQP Connections

AMQP connections are located under the "Usage" section of the AMQP Swiftlet. Select it, right click, "Show Entity Table" is an alternate view of the same information:

The information shown in the above Entity Table frame and the Navigator frame below are limited to top-level live attributes of the connection:

To get more information down to sessions and even links, the router's "smart tree" needs to be disabled. The "smart tree" is a reduced management tree that displays only top-level usage information. This is to limit the amount of management traffic between the router and the SwiftMQ Explorer.

To disable "smart tree" (and thus enable the full tree), locate the attribute under the "Router Environment" node and disable it. Then save the configuration and reboot the router:

After the reboot and reconnect with SwiftMQ Explorer, start some AMQP clients (e.g. the AMQP samples) and expand the "Usage" section of the AMQP Swiftlet. Now the information shown is down to the links and even the changes in link credit and inbound/outbound windows can be oberserved:

To view it in an Entity Table frame, select the "Sessions" node, right click, "Show Entity Table":

Monitoring Queues

Another view can be opened on the Queue Manager Swiftlet's "Usage" section. It shows the message throughput of the queues. By selecting a queue and pushing the first button in the upper left corner, a message viewer will be opened and the queue messages can be inspected:

Monitoring Threadpools

The AMQP Swiftlet uses 2 threadpools:

Both threadpools (and all others) can be oberserved by opening an Entity Table frame on the Threadpool Swiftlet's "Usage" section:

Tracing and Debugging

A SwiftMQ Router has an integrated tracing facility, the Trace Swiftlet. Kernel Swiftlets such as the AMQP Swiftlet are using the "kernel" trace space to send trace output (if the trace space is enabled) about the internal processing of the AMQP Swiftlet. The trace output goes to <swiftmqinstall>/trace/router1/amqp.trace by default. Tracing can be enabled/disabled dynamically through SwiftMQ admin tools.

Another trace space "protocol" is used to send information about incoming and outgoing AMQP frames. This is the more interesting trace space for debugging.

Trace space "kernel" contains various predicate entries for different Kernel Swiftlets. Every entry can be enabled (default) or disabled. The AMQP Swiftlet predicate is in entry "19" by default. To get trace output, enable the "kernel" trace space and make sure, predicate "19" is enabled too. Be aware that kernel tracing produces huge output and slows down the router.

To get AMQP protocol information only, change the single predicate of the "protocol" space to "amqp%". If you let it at "%", it will also trace SMQP, SMQPR, SMQPHA. Then enable the "protocol" space. The trace output goes to <swiftmqinstall>/trace/router1/protocol.trace by default.

The following snippet shows how to enable the above tracing directly in the routerconfig.xml of router1 to have tracing enabled on startup:

    <swiftlet name="sys$trace">
      <spaces>
        <space name="kernel" enabled="true">
          <predicates>
            <predicate name="0" filename="../../trace/router1/manager.trace" value="%Manager"/>
            <predicate name="1" filename="../../trace/router1/net.trace" value="sys$net"/>
            <predicate name="10" filename="../../trace/router1/auth.trace" value="sys$auth%"/>
            <predicate name="11" filename="../../trace/router1/mgmt.trace" value="sys$mgmt%"/>
            <predicate name="12" filename="../../trace/router1/store.trace" value="sys$store"/>
            <predicate name="13" filename="../../trace/router1/xa.trace" value="sys$xa"/>
            <predicate name="14" filename="../../trace/router1/jac.trace" value="sys$jac"/>
            <predicate name="15" filename="../../trace/router1/timer.trace" value="sys$timer"/>
            <predicate name="16" filename="../../trace/router1/scheduler.trace" value="sys$scheduler"/>
            <predicate name="17" filename="../../trace/router1/monitor.trace" value="sys$monitor"/>
            <predicate name="18" filename="../../trace/router1/accounting.trace" value="sys$accounting"/>
            <predicate name="19" filename="../../trace/router1/amqp.trace" value="sys$amqp"/>
            <predicate name="2" filename="../../trace/router1/jms.trace" value="sys$jms"/>
            <predicate name="3" filename="../../trace/router1/deploy.trace" value="sys$deploy"/>
            <predicate name="4" filename="../../trace/router1/thread.trace" value="sys$thread%"/>
            <predicate name="5" filename="../../trace/router1/routing.trace" value="sys$rout%"/>
            <predicate name="6" filename="../../trace/router1/queuemanager.trace" value="sys$queue%"/>
            <predicate name="7" filename="../../trace/router1/topic.trace" value="sys$topic%"/>
            <predicate name="9" filename="../../trace/router1/jndi.trace" value="sys$jndi"/>
          </predicates>
        </space>
        <space name="protocol" enabled="true">
          <predicates>
            <predicate name="1" filename="../../trace/router1/protocol.trace" value="amqp%"/>
          </predicates>
        </space>
        <space name="queue">
          <predicates>
            <predicate name="1" filename="../../trace/router1/queue.trace" value="%"/>
          </predicates>
        </space>
        <space name="swiftlet">
          <predicates>
            <predicate name="1" filename="../../trace/router1/swiftlet.trace" value="%"/>
          </predicates>
        </space>
      </spaces>
    </swiftlet>