Queue statistics information

Use the queue attribute STATQ and the queue manager attribute STATQ to control the collection of queue statistics information

You can enable or disable queue statistics information collection for individual queues or for multiple queues. To control individual queues, set the queue attribute STATQ. You enable or disable queue statistics information collection at the queue manager level by using the queue manager attribute STATQ. For all queues that have the queue attribute STATQ specified with the value QMGR, queue statistics information collection is controlled at the queue manager level.

Queue statistics are incremented only for operations using IBM® MQ MQI Object Handles that were opened after statistics collection has been enabled.

Queue Statistics messages are generated only for queues for which statistics data has been collected in the previous time period.

The same queue can have several put operations and get operations through several Object Handles. Some Object Handles might have been opened before statistics collection was enabled, but others were opened afterwards. Therefore, it is possible for the queue statistics to record the activity of some put operations and get operations, and not all.

To ensure that the Queue Statistics are recording the activity of all applications, you must close and reopen new Object Handles on the queue, or queues, that you are monitoring. The best way to achieve this, is to end and restart all applications after enabling statistics collection.

To change the value of the queue attribute STATQ, use the MQSC command, ALTER QLOCAL and specify the parameter STATQ. The queue attribute STATQ can have the following values:

ON
Queue statistics information is collected for every connection to the queue manager that opens the queue.
OFF
Queue statistics information for this queue is not collected.
QMGR
The collection of queue statistics information for this queue is controlled according to the value of the queue manager attribute, STATQ. This is the default value.
To change the value of the queue manager attribute STATQ, use the MQSC command, ALTER QMGR and specify the parameter STATQ. The queue manager attribute STATQ can have the following values:
ON
Queue statistics information is collected for queues that have the queue attribute STATQ set as QMGR
OFF
Queue statistics information is not collected for queues that have the queue attribute STATQ set as QMGR. This is the default value.
NONE
The collection of queue statistics information is disabled for all queues, regardless of the queue attribute STATQ.

If the queue manager attribute STATQ is set to NONE, the collection of queue statistics information is disabled for all queues, regardless of the queue attribute STATQ.

For example, to enable statistics information collection for the queue, Q1, use the following MQSC command:

ALTER QLOCAL(Q1) STATQ(ON)
To enable statistics information collection for all queues that specify the queue attribute STATQ as QMGR, use the following MQSC command:

ALTER QMGR STATQ(ON)