31
Beginners Guide to WMQ Stats Beginners Guide WMQ Statistics for Distributed platforms © Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 1

1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Beginners Guide

WMQ Statistics forDistributed platforms

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 1

Page 2: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Table of ContentsTable of Contents.................................................................................................................2Introduction..........................................................................................................................3Introduction..........................................................................................................................3

Note to z/OS Administrators...........................................................................................4Notes to All Administrators.............................................................................................4

Queue Manager Commands................................................................................................5Displaying the Queue Manager Monitoring and Statistics Settings............................5Setting the Queue Manager Queue Statistics Parameter.............................................7Setting the Statistics Interval.......................................................................................9Setting Queue Manager Queue Monitoring:..............................................................10

Queue Level Commands....................................................................................................12Queue Statistics.............................................................................................................12Queue Level Queue Monitoring....................................................................................13

Statistics evaluation test.....................................................................................................14Statistics Evaluation via AMQSMON...........................................................................19

Monitoring evaluation test.................................................................................................23Acknowledgements............................................................................................................25

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 2

Page 3: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Introduction

This document is to introduce a novice to statistics gathering and monitoring WMQ queues on distributed platforms. The information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac, WebSphere MQ Explorer - Configuration and Display Extension Plug-ins. In addition WMB SupportPac IH03, WebSphere Message Broker V6-Message display, test & performance utilities, was used for testing.

WMQ documentation is available at:

http://www-01.ibm.com/software/integration/wmq/library/

WMQ and WMB SupportPacs are available at:

http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg27007197#1

Statistics gathering is an important facet of WMQ administration. Without statistics it is difficult, if not impossible, to determine queue activity. Activity levels of the queues assists with capacity planning, can help administrators track daily volumes and spikes, and can be used for trend analysis.

Monitoring queue activity can help signal problems that may be developing. Indications can include sudden increases in queue depth, an increase in the average time messages remain on the queue, or messages not arriving as expected.

Statistics gathering and monitoring is controlled at two levels – the queue manager and individual queue level. The settings work together to provide flexibility. This document shows how to set the parameters to gather statistics as well as monitoring information to determine the current usage.

Note that all examples were captured on Windows, but there are no differences for the other distributed platforms.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 3

Page 4: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Note to z/OS Administrators

For WMQ for z/OS administrators who are very familiar with the SMF data generated by WMQ, the queue statistics and accounting data produced by distributed queue managers is not the same. Nor is it divided quite the same way between the two types of data.

This document focuses on the statistics data.

Notes to All Administrators

If messages are not read from the statistics queues, that queue can grow excessively large. If you turn on statistics generation, be prepared to clear the queue regularly. In a production environment, you may want to consider turning off all statistics on individual queues before setting the queue manager parameter on.

This document does not discuss the Accounting messages that can also be generated by WMQ. For more information on WMQ accounting, please see the Monitoring WebSphere MQ manual referenced above.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 4

Page 5: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Queue Manager CommandsDisplaying the Queue Manager Monitoring and Statistics Settings

The queue manager must allow statistics to be gathered. Verify the setting of the STATQ, STATINT, and MONQ for the queue manager. This can be done via RUNMQSC using the DISPLAY QMGR MONQ STATQ STATINT command, as shown

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 5

Page 6: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Or via the MQExplorer by displaying the Statistics Monitoring and Online Monitoring panels:

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 6

Page 7: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Setting the Queue Manager Queue Statistics Parameter

If the queue statistics (STATQ) parameter is set to ‘NONE’ this MUST be reset to either ‘OFF’ or ‘ON’. It is important to note that changing this setting will probably start statistics gathering for all queues that have been defined using the defaults. The valid values for the STATQ parameter are:

NONE Statistics data collection is turned off for queues regardless of the setting of their STATQ parameter. This is the queue manager’s initial default value.

OFF Statistics data collection is turned off for queues specifying a value of QMGR in their STATQ parameter.

ON Statistics data collection is turned on for queues specifying a value of QMGR in their STATQ parameter

To set the value of STATQ ‘ON’ use the RUNMQSC ALTER QMGR STATQ(ON) command, as shown:

If you want to control the statistics for queues at the queue manager level, set the queue manager STATQ to ON, and set the STATQ parameter on individual queues to QMGR.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 7

Page 8: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

To set the value using the MQExplorer Panels:

Use the drop down options on the Queue Statistics option to set the value to ‘On’ and click on the Apply button:

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 8

Page 9: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Setting the Statistics Interval

Often customers would like to use the same statistics interval as they use on z/OS. As delivered, the default is for 30 minutes, or 1800 seconds. To alter the statistics interval, once again you use the ALTER QMGR command. In the sample the interval is being changed to 60 seconds (one per minute) for test purposes. This is not recommended for production environments.

To perform the same task in the MQExplorer, alter the number of seconds on the Statistics and monitoring page and hit the apply button as shown.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 9

Page 10: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Setting Queue Manager Queue Monitoring:

Queue monitoring has several settings, as described in the MQSC Command Reference Manual:

OFF Online monitoring data collection is turned off for queues specifying a value of QMGR in their MONQ parameter. This is the queue manager’s initial default value.

NONE Online monitoring data collection is turned off for queues regardless of the setting of their MONQ parameter.

LOW Online monitoring data collection is turned on, with a low ratio of data collection, for queues specifying a value of QMGR in their MONQ parameter.

MEDIUM Online monitoring data collection is turned on, with a moderate ratio of data collection, for queues specifying a value of QMGR in their MONQ parameter.

HIGH Online monitoring data collection is turned on, with a high ratio of data collection, for queues specifying a value of QMGR in their MONQ parameter.

To set the queue monitoring value at the queue manager level use the ALTER QMGR command as shown below. In this example the default at the queue manager level is being set to LOW.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 10

Page 11: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

To set the monitoring on with the MQExplorer, from the online monitoring pane use the drop down menu and select ‘LOW’ as shown:

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 11

Page 12: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Queue Level Commands

Queue Statistics

Once statistics and monitoring are enabled for the queue manager, corresponding changes may need to be made to the queues being evaluated.

To turn statistics gathering for an individual queue, use the ALTER QLOCAL command STATQ(ON) as shown:

To alter the queue using the MQExplorer from the queue properties panel, select the statistics folder, from the drop down on Queue Statistics select ‘On’ as shown.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 12

Page 13: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Queue Level Queue MonitoringMonitoring may need to be turned on for individual queues, though you may find the queues are already to reflect the setting from the queue manager (MONQ(QMGR)).

To turn monitoring on for an individual queue, use the ALTER QLOCAL command MONQ(option) as shown. This example sets the value to low.

To alter the queue using the MQExplorer from the queue properties panel, select the statistics folder, from the drop down on Queue Monitoring select ‘On’ as shown.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 13

Page 14: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Statistics evaluation test

After turning statistics gathering on for the test queue, TEST.STATISTICS.QUEUE, use a load utility to add 100 messages to the queue. The SYSTEM.ADMIN.STATISTICS.QUEUE holds the statistic messages. Its depth should increase and in reviewing the messages via the MQExplorer, the last one on the queue applies to the TEST.STATISTICS.QUEUE, the queue name is in plain text as shown.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 14

Page 15: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Using the MQExplorer, with SupportPac MS0P installed, review the statistical information about the queues usage as shown in the following steps.

From the MQExplorer right click on the SYSTEM.ADMIN.STATISTICS.QUEUE. Select the ‘Format Statistics Records’ option as shown.

The ‘Operation Pop-up’ should appear.

Click ‘OK’

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 15

Page 16: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Expand the ‘Used Queue count’, and the statistics gathered are displayed.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 16

Page 17: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Additional messages were added to the queue, and an additional statistics record was created. Using the MQExplorer again, the cumulative figures for the two test loads are shown:

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 17

Page 18: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Messages were read from the queue, and the statistics were updated as shown.

The average life of a message on the queue is displayed.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 18

Page 19: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Statistics Evaluation via AMQSMON

When you need granular information about the message traffic on a queue, the standard AMQSMON program may be used to print the individual statistics messages. This information can be used to evaluate peak message traffic periods and usage patterns, which can be particularly useful in capacity planning. Knowing that the daily average is 500,000 messages is useful, knowing that 70% of that message traffic arrives between 8:00 and 8:30 am and on average remains on the queue for more than 30 seconds, is even more useful when determining capacity needs.

There are options that may be used to limit the results from the request. They are documented in chapter 16 of the Monitoring WebSphere MQ manual (SC34-6593).

To print the statistics from the test environment, the following was entered from a Windows command prompt:

amqsmon -m WBRK6_DEFAULT_QUEUE_MANAGER -t statistics

The report generated from this test included the following four records. For this document, some of the fields of interest have been highlighted.

MonitoringType: QueueStatisticsQueueManager: 'WBRK6_DEFAULT_QUEUE_MANAGER'IntervalStartDate: '2008-07-30'IntervalStartTime: '11.06.42'IntervalEndDate: '2008-07-30'IntervalEndTime: '11.07.42'CommandLevel: 600ObjectCount: 1QueueStatistics: 0 QueueName: 'TEST.STATISTICS.QUEUE' CreateDate: '2008-07-24' CreateTime: '19.54.41' QueueType: Predefined QueueDefinitionType: Local QMinDepth: 0 QMaxDepth: 101 AverageQueueTime: [0, 0] PutCount: [101, 0] PutFailCount: 0 Put1Count: [0, 0] Put1FailCount: 0 PutBytes: [2626, 0] GetCount: [0, 0] GetBytes: [0, 0] GetFailCount: 0 BrowseCount: [0, 0] BrowseBytes: [0, 0] BrowseFailCount: 0

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 19

Page 20: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

NonQueuedMsgCount: 0 ExpiredMsgCount: 0 PurgeCount: 0

MonitoringType: QueueStatisticsQueueManager: 'WBRK6_DEFAULT_QUEUE_MANAGER'IntervalStartDate: '2008-07-30'IntervalStartTime: '11.07.42'IntervalEndDate: '2008-07-30'IntervalEndTime: '11.08.42'CommandLevel: 600ObjectCount: 1QueueStatistics: 0 QueueName: 'TEST.STATISTICS.QUEUE' CreateDate: '2008-07-24' CreateTime: '19.54.41' QueueType: Predefined QueueDefinitionType: Local QMinDepth: 101 QMaxDepth: 200 AverageQueueTime: [0, 0] PutCount: [99, 0] PutFailCount: 0 Put1Count: [0, 0] Put1FailCount: 0 PutBytes: [2574, 0] GetCount: [0, 0] GetBytes: [0, 0] GetFailCount: 0 BrowseCount: [0, 0] BrowseBytes: [0, 0] BrowseFailCount: 0 NonQueuedMsgCount: 0 ExpiredMsgCount: 0 PurgeCount: 0

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 20

Page 21: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

MonitoringType: QueueStatisticsQueueManager: 'WBRK6_DEFAULT_QUEUE_MANAGER'IntervalStartDate: '2008-07-30'IntervalStartTime: '11.08.42'IntervalEndDate: '2008-07-30'IntervalEndTime: '11.09.42'CommandLevel: 600ObjectCount: 1QueueStatistics: 0 QueueName: 'TEST.STATISTICS.QUEUE' CreateDate: '2008-07-24' CreateTime: '19.54.41' QueueType: Predefined QueueDefinitionType: Local QMinDepth: 150 QMaxDepth: 200 AverageQueueTime: [98384832, 0] PutCount: [0, 0] PutFailCount: 0 Put1Count: [0, 0] Put1FailCount: 0 PutBytes: [0, 0] GetCount: [50, 0] GetBytes: [1300, 0] GetFailCount: 0 BrowseCount: [0, 0] BrowseBytes: [0, 0] BrowseFailCount: 0 NonQueuedMsgCount: 0 ExpiredMsgCount: 0 PurgeCount: 0

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 21

Page 22: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

MonitoringType: QueueStatisticsQueueManager: 'WBRK6_DEFAULT_QUEUE_MANAGER'IntervalStartDate: '2008-07-30'IntervalStartTime: '11.09.42'IntervalEndDate: '2008-07-30'IntervalEndTime: '11.10.42'CommandLevel: 600ObjectCount: 1QueueStatistics: 0 QueueName: 'TEST.STATISTICS.QUEUE' CreateDate: '2008-07-24' CreateTime: '19.54.41' QueueType: Predefined QueueDefinitionType: Local QMinDepth: 100 QMaxDepth: 155 AverageQueueTime: [159714700, 0] PutCount: [20, 0] PutFailCount: 0 Put1Count: [0, 0] Put1FailCount: 0 PutBytes: [520, 0] GetCount: [70, 0] GetBytes: [1820, 0] GetFailCount: 0 BrowseCount: [0, 0] BrowseBytes: [0, 0] BrowseFailCount: 0 NonQueuedMsgCount: 0 ExpiredMsgCount: 0 PurgeCount: 0

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 22

Page 23: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Monitoring evaluation testAs with the Statistics test, 100 messages were loaded onto the TEST.MONITORING.QUEUE. Using the DISPLAY QSTATS command shows:

From the MQExplorer the display of the QSTATS looks as follows:

Loading more messages onto the queues and displaying the status updated the depth and the ‘last put’ values as shown.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 23

Page 24: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

From the MQExplorer the queue status has been updated as shown.

After getting some of the messages from the queue, the QSTATS have been altered as shown.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 24

Page 25: 1) The queue manager must allow statistics to be …€¦ · Web viewThe information is taken from the Monitoring WebSphere MQ manual (document number SC34-6593) and the MS0P SupportPac,

Beginners Guide to WMQ Stats

Acknowledgements

I would like to thank Gene Kuehlthau and Mark Taylor for their patience, advice and valuable assistance.

© Copyright IBM Corporation, 2008 Beginners Guide to WMQ Stats Page: 25