Controlling statistics messaging

The collection of statistics data is controlled by queue manager, queue, and channel attributes.

 

Collecting MQI statistics information

The collection of MQI statistics information is controlled by the queue manager attribute, STATMQI. To change the value of this queue manager attribute, we can use the MQSC command,

ALTER QMGR and specify the parameter STATMQI. STATMQI can have the following values:

ON

MQI statistics information is collected for every connection to the queue manager.

OFF

MQI statistics information is not collected. This is the default value.

For example, to enable MQI statistics use the following MQSC command:

ALTER QMGR STATMQI(ON)

 

Collecting queue statistics information

Queue statistics information collection can be enabled or disabled for individual queues, or for multiple queues. To control individual queues, the queue attribute STATQ must be set to enable or disable queue statistic information collection. To control many queues together, queue statistics information collection can be enabled or disabled at the queue manager level 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.

To change the value of the queue attribute STATQ, we can use the MQSC command,

ALTER QLOCAL and specify the parameter STATQ. To change the value of the queue manager attribute STATQ, we can use the MQSC command,

ALTER QMGR 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.

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.

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)

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.

 

Collecting channel statistics information

Channel statistics information collection can be enabled or disabled for individual channels, or for multiple channels. To control individual channels, the channel attribute STATCHL must be set to enable or disable channel statistic information collection. To control many channels together, channel statistics information collection can be enabled or disabled at the queue manager level using the queue manager attribute STATCHL. For all channels that have the channel attribute STATCHL specified with the value, QMGR, channel statistics information collection is controlled at the queue manager level.

Automatically defined cluster-sender channels are not WebSphere MQ objects, so do not have attributes in the same way as channel objects. To control automatically defined cluster-sender channels, use the queue manager attribute, STATACLS. This attribute determines whether automatically defined cluster-sender channels within a queue manager are enabled or disabled for channel statistics information collection.

Channel statistics information collection can be set to one of the three monitoring levels, low, medium or high. This is set at either object level, or at the queue manager level. The choice of which level to use is dependant on your system. Collecting statistics information data may require the execution of some relatively expensive instructions, so in order to reduce the impact of channel statistics information collection, the medium and low monitoring options measure a sample of the data at regular intervals rather than collecting data all the time. Table 20 summarizes the levels available with channel statistics information collection:

Table 20. Detail level of channel statistics information collection
Level Description Usage
Low

Measure a small sample of the data, at regular intervals.

For objects that process a high volume of messages.

Medium

Measure a sample of the data, at regular intervals.

For most objects.

High

Measure all data, at regular intervals.

For objects that process only a few messages per second, on which the most current information is important.

To change the value of the channel attribute STATCHL, we can use the MQSC command,

ALTER CHANNEL and specify the parameter STATCHL.

To change the value of the queue manager attribute STATCHL, we can use the MQSC command,

ALTER QMGR and specify the parameter STATCHL.

To change the value of the queue manager attribute STATACLS, we can use the MQSC command,

ALTER QMGR and specify the parameter STATACLS.

The channel attribute, STATCHL, can have the following values:

LOW

Channel statistics information is collected with a low level of detail.

MEDIUM

Channel statistics information is collected with a medium level of detail.

HIGH

Channel statistics information is collected with a high level of detail.

OFF

Channel statistics information is not collected for this channel.

This is the default value.

QMGR

The channel attribute is set as QMGR. The collection of statistics information for this channel is controlled by the value of the queue manager attribute, STATCHL.

The queue manager attribute, STATCHL, can have the following values:

LOW

Channel statistics information is collected with a low level of detail, for all channels that have the channel attribute STATCHL set as QMGR.

MEDIUM

Channel statistics information is collected with a medium level of detail, for all channels that have the channel attribute STATCHL set as QMGR.

HIGH

Channel statistics information is collected with a high level of detail, for all channels that have the channel attribute STATCHL set as QMGR.

OFF

Channel statistics information is not collected for all channels that have the channel attribute STATCHL set as QMGR.

This is the default value.

NONE

The collection of channel statistics information is disabled for all channel, regardless of the channel attribute STATCHL.

The queue manager attribute, STATACLS, can have the following values:

LOW

Statistics information is collected with a low level of detail for automatically defined cluster-sender channels.

MEDIUM

Statistics information is collected with a medium level of detail for automatically defined cluster-sender channels.

HIGH

Statistics information is collected with a high level of detail for automatically defined cluster-sender channels.

OFF

Statistics information is not for automatically defined cluster-sender channels.

This is the default value.

QMGR

The collection of statistics information for automatically defined cluster-sender channels is controlled by the value of the queue manager attribute, STATCHL.

For example, to enable statistics information collection, with a medium level of detail, for the sender channel

QM1.TO.QM2, use the following MQSC command:

ALTER CHANNEL(QM1.TO.QM2) CHLTYPE(SDR) STATCHL(MEDIUM) 

To enable statistics information collection, at a medium level of detail, for all channels that specify the channel attribute STATCHL as QMGR, use the following MQSC command:

ALTER QMGR STATCHL(MEDIUM)

To enable statistics information collection, at a medium level of detail, for all automatically defined cluster-sender channels, use the following MQSC command:

ALTER QMGR STATACLS(MEDIUM)

 

Generating statistics messages

Statistics messages are generated at configured intervals, and when a queue manager shuts down in a controlled fashion.

The configured interval is controlled by the STATINT queue manager attribute. STATINT specifies the interval, in seconds, between the generation of statistics messages. The default statistics interval is 1800 seconds (30 minutes). To change the statistics interval we can you the MQSC command

ALTER QMGR and specify the STATINT parameter. For example, to change the statistics interval to 900 seconds (15 minutes) use the following MQSC command:

ALTER QMGR STATINT(900)

To write the currently collected statistics data to the statistics queue before the statistics collection interval is due to expire, we can use issue the MQSC command

RESET QMGR TYPE(STATISTICS). This causes the collected statistics data to be written to the statistics queue and a new statistics data collection interval to begin.