The status output from IBM MQ contains a number of fields which steadily increase as things happen. The table below contains a few examples of these. I’m sure you have used a number of these to determine whether, for example, “is this channel actually doing anything?”, by hitting refresh on a GUI screen or repeatedly issuing an MQSC command to see if the numbers are changing.
|Status||Field Name||MQSC Keyword|
|Channel||No. of messages||MSGS|
|SSL/TLS Key Resets||SSLRKEYS|
In the latest version of MO71, the user columns feature has been enhanced to allow you to turn these fields into a rate field. Here’s how…
I’m going to use the Bytes Sent and No. of Messages status fields on a channel, to determine the transfer rate (bytes/second) and the message rate (messages/second) of my channel. I’ll start with the No. of Messages field. My filter on a Channel Status List will look like this:-
usrcol("Message rate", MSGS, text+diff+rate);TRUE
Filters, as you may already know, are a boolean expression, so just in case my user column has a value of zero (which would result in the row not being displayed), I finish off my filter with “TRUE” just to ensure each row is always displayed, even if there is a zero value.
I have used two new options on my user column – the ‘diff’ option and the ‘rate’ option. These will often go hand-in-hand. The ‘diff’ option instructs MO71 to calculate the difference between this value and the previous value – handy when using these numbers that just steadily increase. If you combined the use of ‘diff’ with the auto-refresh option on list dialogs, you would have some semblance of a rate. However, also adding the ‘rate’ option instructs MO71 to calculate the rate for you using the time period since the last refresh of the dialog (so you don’t have to use auto-refresh).
Note: While most of the time you will likely use ‘diff’ and ‘rate’ together, there are some instances where you might only need one. For example, the output from RESET QSTATS is already showing you the difference from last time, so in that case all you would need is the ‘rate’ option.
I also want the transfer rate, so I’ll add another very similar user column to my filter. Here’s the addition:-
usrcol("Transfer rate", BYTSSENT, text+diff+rate+bytes)
This looks almost identical to my first user column. The one difference is the ‘bytes’ option. This marks the new user column to have a unit of Bytes, and the new Units feature of MO71 kicks in and labels it according to your preferences for units.
Here’s a screenshot of both user columns in action.
Another set of status fields output by IBM MQ includes counts of things that, rather than steadily increase, tend to waver around. Some examples of these types of fields are shown in the table below.
|Status||Field Name||MQSC Keyword|
|Open Input Count||IPPROCS|
|Open Output Count||OPPROCS|
|Oldest Message Age||MSGAGE|
Fields like these, and of course also your rate fields from the first half of this post, can be averaged using new user column features in the latest version of MO71.
To demonstrate, here’s a filter to create a user column showing the average queue depth.
usrcol("Average Depth", CURDEPTH, text+avgl);TRUE
In the same way that IBM MQ indicator fields have a short term and a long term rolling average, MO71 user column averages use a similar concept. You can choose a short term average, ‘avgs’, or a long term average, ‘avgl’, depending on how you want spikes in the numbers to be shown – do you want anomalies to be “forgotten” by the average number fairly quickly, or to affect the average number shown for a longer period.
I’m also going to add another filter to calculate the average message age.
usrcol("Average Age", MSGAGE, text+secs+avgl);
Adding these to my queue status display gives me a way to tell that there had been a spike of messages on my queues, even though everything is all good now, the long term average takes a while to forget about the spike and allows me to see a past problem.
Of course, the beauty of these user columns is that you are only limited by your imagination. See what you can come up with.
The new version can be downloaded from the MO71 Download Page. Any current licensed users of MO71 can run the new version on their existing licence. If you don’t have a licence and would like to try out MO71 then send an email to email@example.com and a 1-month trial licence will be sent to you.