IBM MQ Family

IBM MQ Little Gem #44: Discovering old client versions

By Morag Hughson posted 10 days ago

This is part of a series of small blog posts which will cover some of the smaller, perhaps less likely to be noticed, features of IBM MQ. Read other posts in this series.

In a much earlier Little Gem post, I wrote about using the RPRODUCT and RVERSION fields that are part of DISPLAY CHSTATUS to help determine whether you have any back-level clients (or queue managers) connecting in to your queue manager. You can read that post here: IBM MQ Little Gem #2: RPRODUCT and RVERSION

The downside with trying to use DISPLAY CHSTATUS to see clients that connect to your queue manager is that you can only see them when they are connected. If the connection duration is very short, you might never catch them, and if you can't catch them, how can you know whether they are back-level?

Well, there's a feature that was added to MQ V9.1.0 that I never even noticed until now, that really helps, and that's what today's post is about.

IBM MQ produces a lot of information in output known as Accounting and Statistics. On the distributed platforms, this is emitted as PCF format messages on two queues, the SYSTEM.ADMIN.ACCOUNTING.QUEUE and the SYSTEM.ADMIN.STATISTICS.QUEUE. There are five different types of Accounting and Statistics information that can be enabled.

Type of data Enabled by
MQI accounting message ALTER QMGR ACCTMQI(ON)
Queue accounting message ALTER QMGR ACCTQ(ON)
MQI statistics message ALTER QMGR STATMQI(ON)
Queue statistics message ALTER QMGR STATQ(ON)
Channel statistics message ALTER QMGR STATCHL(HIGH)

In this post we are specifically looking at the first of those five, the MQI accounting record. In this message you get information for each connection that is made to the queue manager, with things like the Application Name, Pid, Tid, Connection ID and so on, to uniquely identify the application in question. Then you get various counts of what the application has done, such as the numbers of open calls, or the number of failed puts.

As part of identifying the application, if it is a client connected application you also get the Channel Name and the Connection Name, and new in V9.1.0, you now also get the Remote Product and Remote Version fields that you will be familiar with on DISPLAY CHSTATUS.

The benefit of getting this data in an accounting record is that you no longer have concerns about missing the clients when they connect. The queue manager is now looking at all connections on your behalf, and writing this data out, either when the connection ends, or on a regular interval if it stay connected for a long time. You cannot miss a connection now!

As shown in the table above, turning on MQI accounting is a very simple one - just use the following command:-


and then monitor the SYSTEM.ADMIN.ACCOUNTING.QUEUE for messages. If you don't have a tool to monitor this queue, and remove the messages from it, then take care with turning this feature on, because it will generate quite a number of messages on this queue, depending on how many applications you have connecting and disconnecting.

The screen shot below shows MQGem's MO71 MQ administration tool displaying accounting records collected and processed by MQEV.

MO71 display Accounting MQI records for clients with different Remote Versions

Morag Hughson is an MQ expert. She spent 18 years in the MQ Devt organisation before taking on her current job writing MQ Technical education courses with MQGem. She also blogs for MQGem. You can connect with her here on IMWUC or on Twitter and LinkedIn.