开发者

IBM Websphere MQ Monitoring

I've been trying to get some performance statistics out of IBM WebSphere MQ to monitor with Spring Source's Hyperic HQ.

I'm after the message enqueue and dequeue rate along with queue depth of a few local queues to ensure messages are being delivered to and consumed by our local application.

Initially attempted to retrieve the data using WMI and windows performance counters however it seems that on one of our servers the counters aren't available for any of the local queues (just a load of temporary queues) and on the other the counters are available but don't always return a value correctly though WMI.

I've tried PCF (using M开发者_Python百科QIA_MSG_DEQ_COUNT) which wouldn't provide the counter requested. MQSC (Using DISPLAY QUEUE & DISPLAY QSTATUS) which didn't seem to support the queuing rates - only providing last message get / put date and time.

Anyone got an idea how to either get WMI and performance counters working correctly or an alternative to WMI that would provide the statistics I need?


Regarding MQIA_MSG_DEQ_COUNT, you should be aware that the RESET_QUEUE_STATISTICS command which returns this attribute is what I like to call the "quantum physics property of WMQ" because the act of observing the value resets the value. This is fine if you are the only one inquiring on the value and you have only one thread of inquiry. But if you have multiple inquiries going at once, they all reset the counter to zero at each inquiry, each one stepping on the other one's numbers. This aspect renders RESET_QUEUE_STATISTICS of limited use for real-time debugging and not suitable for reliable statistics gathering.

An alternative is to use MQ's Accounting and Statistics facility. In order to get the QMgr to produce Accounting and Statistics messages, it is necessary to enable them either at the QMgr or on a per-queue basis. The instructions for how to enable them are in the manual section Queue statistics information.

Note that the statistics are reported to an event queue and must be fetched and parsed. The documentation reference on parsing the event messages is in the Queue statistics message data section. There is a sample program in source format named amqsmon that shows how to fetch and format the statistics messages. The compiled version is also supplied to provide a human-readable listing of such messages.

Once you enable the statistics on the queue(s) of interest and have a way to parse the messages, simply point your parser at the appropriate event queue and collect the stats. An example of the output of amqsmon showing the stats available follows:

   RecordType: QueueStatistics
   QueueManager: 'saturn.queue.manager'
   IntervalStartDate: '2005-04-30'
   IntervalStartTime: '15.09.02'
   IntervalEndDate: '2005-04-30'
   IntervalEndTime: '15.39.02'
   CommandLevel: 600
   ObjectCount: 3
   QueueStatistics:
     QueueName: 'LOCALQ'
     CreateDate: '2005-03-08'
     CreateTime: '17.07.02'
     QueueType: Predefined
     QueueDefinitionType: Local
     QMinDepth: 0
     QMaxDepth: 18
     AverageQueueTime: [29827281, 0]
     PutCount: [26, 0]
     PutFailCount: 0
     Put1Count: [0, 0]
     Put1FailCount: 0
     PutBytes: [88, 0]
     GetCount: [18, 0]
     GetBytes: [52, 0]
     GetFailCount: 0
     BrowseCount: [0, 0]
     BrowseBytes: [0, 0]
     BrowseFailCount: 1
     NonQueuedMsgCount: 0
     ExpiredMsgCount: 0
     PurgedMsgCount: 0

This and other examples are provided in the manual in a section entitled, appropriately enough, amqsmon examples.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜