Book Image

Apache Karaf Cookbook

By : Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler
Book Image

Apache Karaf Cookbook

By: Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler

Overview of this book

Table of Contents (17 chapters)
Apache Karaf Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 commands can be pretty boring. In the previous screenshot, we can see that we have one queue defined at this moment with no message, no producers, and no consumers. So, let's get some data loaded to see what is happening.

How to do it…

We need to...