Enable Statistics Gathering
Each producer, consumer, destination, and route can gather overall statistics and statistics for each of its destinations. To enable statistic gathering, you must set the statistics parameter to enabled. This parameter can be specified in the configuration file, and it can be changed dynamically using the set server command.
The statistics parameter allows you to globally enable and disable statistic gathering. Statistics are kept in server memory for the life of each object. If you wish to reset the total statistics for all objects to zero, disable statistic gathering, then re-enable it. Server statistics are also reset when the server shuts down and restarts, or in the event of a fault-tolerant failover.
For each producer, consumer, destination, and route the total number of sent/received messages and total size of messages is maintained. Also, producers and consumers keep these statistics for each destination that they use to send or receive messages.
The rate of incoming/outgoing messages and message size is calculated over an interval. By default, the average is calculated every three seconds. You can increase or decrease this value by altering the rate_interval parameter. This parameter can be set in the configuration file or dynamically using the set server command. Setting this parameter to 0 disables the tracking of statistics over an interval—only the total statistics for the destination, route, producer, or consumer are kept.
Gathering total statistics for producers, consumers, destinations, and routes consumes few system resources. Under most circumstances, enabling statistic gathering and average calculations should not affect system performance.