IBM Websphere MQ 监控
我一直在尝试从 IBM WebSphere MQ 中获取一些性能统计数据,以便使用 Spring Source 的 Hyperic HQ 进行监控。
我关注消息入队和出队率以及一些本地队列的队列深度,以确保消息被传递到我们的本地应用程序并由我们的本地应用程序使用。
最初尝试使用 WMI 和 Windows 性能计数器检索数据,但似乎在我们的一台服务器上,计数器不适用于任何本地队列(只是临时队列的负载),而在另一台服务器上,计数器可用,但尽管 WMI 并不总是正确返回值。
我尝试过 PCF(使用 MQIA_MSG_DEQ_COUNT
),但它无法提供请求的计数器。 MQSC(使用 DISPLAY QUEUE 和 DISPLAY QSTATUS)似乎不支持排队率 - 只提供最后一条消息获取/放置的日期和时间。
有人知道如何让 WMI 和性能计数器正常工作,或者知道如何使用 WMI 的替代方案来提供我需要的统计信息吗?
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 MQIA_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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于 MQIA_MSG_DEQ_COUNT ,您应该知道返回此属性的 RESET_QUEUE_STATISTICS 命令就是我所说的“WMQ 的量子物理属性”,因为观察值的行为重置该值。如果您是唯一询问该价值的人并且您只有一个询问线索,那么这很好。但是,如果您同时进行多个查询,则每次查询时它们都会将计数器重置为零,每个查询都会踩到另一个号码。这方面使得 RESET_QUEUE_STATISTICS 对于实时调试的用途有限,并且不适合可靠的统计信息收集。
另一种方法是使用 MQ 的会计和统计工具。为了让 QMgr 生成记帐和统计消息,有必要在 QMgr 上或按队列启用它们。有关如何启用它们的说明位于手册部分队列统计信息。
请注意,统计信息将报告给事件队列,并且必须获取和解析。有关解析事件消息的文档参考位于 队列统计消息数据部分。有一个源格式的示例程序,名为 amqsmon 显示如何获取和格式化统计消息。还提供编译版本以提供此类消息的人类可读列表。
一旦您启用了感兴趣的队列的统计信息并有办法解析消息,只需将解析器指向适当的事件队列并收集统计信息即可。显示可用统计信息的 amqsmon 输出示例如下:
本手册中标题为 amqsmon 示例。
Regarding
MQIA_MSG_DEQ_COUNT
, you should be aware that theRESET_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 rendersRESET_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:
This and other examples are provided in the manual in a section entitled, appropriately enough, amqsmon examples.