Using the ActiveMQ dstat command

The dstat command is a convenient way to see queue message statistics at a glance. It will list out the queues with queue size, the number of producers and consumers, the number of messages enqueued and dequeued, and the percentage of memory used.

Getting ready

In order to get started, we need to get the activemq-broker feature installed.

Tip

If you have run any previous recipes, a good way to get a clean environment is to stop Karaf, delete the data directory, and restart. This will clean up any data from the previous runs. Remember to reinstall the activemq-broker feature after restarting.

As an example, let's run the activemq:dstat command, as shown in the following screenshot.

Not very impressive. Without data, these ...

Get Apache Karaf Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.