Application Activity Trace Viewer

IBM MQ has a feature called Application Activity Trace, which allows you to trace what an application is doing, see the progression of MQ API calls, the objects utilised, the options used, the time taken for each call and so on.

To get the most out of this feature, which writes its output as PCF messages, you need to be able to, not only read the content of those PCF messages, but display them in a way that allows you to drill down into the data, exclude data from your view to allow you to focus on what’s important, search for particular objects in use, or particular reason codes, and so on.

To this end, MO71 now has an Application Activity Trace viewer. At it’s simplest, it allows you to see the progression of MQ API calls, just like the IBM-supplied sample amqsact. However it can do so much more than that.

Activity Trace Output

MO71 Activity Trace Output

Drilling down

Rather than having to decide to view every MQ API call in high detail, the viewer allows you to drill down into the verb you are interested in, without the confusion of seeing high detail of everything else at the same time.

Activity Trace Drill down MQINQ

MO71 Activity Trace – Drill down into MQINQ

Activity Trace API Selection

MO71 Activity Trace API Selection

Filter the output

With a trace that spans many pages full, even when only showing one line per verb, you may wish to reduce the clutter on your screen further. You can filter the output in many different ways to see what you’re looking for. For example, you could choose to hide all the MQPUTs and MQGETs and focus on the other calls, like the MQOPENs.

Activity Trace No PUTs and GETs

MO71 Activity Trace with PUTs and GETs excluded

You can filter the output to focus on a particular object or objects that you are interested in, or a particular process id. In fact there are many different factors that you can used to filter down the data to make is easier to view.

Activity Trace Settings

MO71 Activity Trace Settings Tab with filtering

Health-checking your application

There are a number of behaviours that MO71 can check for in your application. These are listed on the Health tab, and if any issues are found you will see them highlighted with a red exclamation mark. You can display the instances in a separate window which then allows you to jump into the main output window at the point where the issue was detected.

Activity Trace Health

MO71 Activity Trace Health Tab

The current list of health issues is not final, and if you have any other issues you would like to see MO71 check for, please comment below or get in touch in the usual ways.

The Application Activity Trace viewer in MO71 will help you make sense of, and get great insight from, your tracing of your applications.


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 support@mqgem.com and a 1-month trial licence will be sent to you.

Import queue managers from an MQ Explorer export

In a recent update to MO71 V9.0.4 a new feature was added to allow you to import queue manager location information from an MQ Explorer export file.

MQ Explorer Export menu

The menu option to export MQ Explorer settings

To export your configuration from MQ Explorer, right-click on the top level folder in the left-hand navigation pane, and choose Export MQ Explorer Settings…

This will bring up a dialog for Export. Press Next on the first panel, then on the second panel you can indicate where you want the XML file to be written and what you want to be exported. MO71 will only import the Sets and Remote queue manager information, but will not complain if there is other information in the XML file, so you can go ahead and export it all if you wish.

MO71 doesn’t import local queue managers from an MQ Explorer export file since you can import local queue managers directly in MO71 as discussed in an earlier post.

MO71 Import MQ Explorer Menu

The menu to import queue managers

Once you have your exported XML file from MQ Explorer, you can drive the import from the MO71 File menu, which then brings up a dialog.

In this dialog, navigate to the location where you exported your MQ Explorer settings and click on Read MQ Explorer XML File.

MO71 Import MQ Explorer Dialog

Import MQ Explorer Locations Dialog – choose your queue managers

The list below will show all the queue managers that were found in the MQ Explorer XML file. If any of the found queue managers are already locations in MO71, the Explorer entry will have a ‘no entry’ symbol beside it showing it cannot be added again. You can click on any others to indicate you wish to import them and the red cross will change to a green tick.

If you were using Sets to group your queue managers in MQ Explorer, you can choose to have those associations imported into MO71 as well. MO71 has several grouping concepts (as described in Can you see your QMgr for the trees?). A queue manager can be in a single group on the main window, and it can be in multiple Networks, which are used in various places where queue managers are listed in MO71. Since a queue manager could be in multiple MQ Explorer Sets, you can choose whether to translate this part of the configuration into Network names or the first one into a QM Group, or both.

Once you have selected all the ones you want, click on Import, and you’re done.

And of course, just as with imported local queue managers, and queue managers imported from a CCDT file, you can edit the imported ones after the locations are created to change the location labels and any other settings.


The new version can be downloaded from the MO71 Download Page. If you don’t have a licence and would like to try out MO71 then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.

MO71 version 9.0.4 is released

MQGem Software is pleased to announce that a new version of MO71, our GUI Administrative tool for IBM MQ, is now available.

The main features of the release are as follows:-

MO71 Activity Trace Viewer

MO71 Activity Trace Viewer – Settings Panel

Browse, search, format and display Activity Trace information

The new Activity Trace viewer allows much easier viewing and searching of the information generated. Easily find reason codes, or filter by object names, locate applications using certain options which they shouldn’t, and so much more. More information can be read in Application Activity Trace Viewer.

Import queue manager connection information from MQ Explorer

You can now import an MQ Explorer export file to make migrating to an MO71 configuration much easier. This enhances the already provided import of local queue managers, and import from a CCDT file, all helping you get set up and going with MO71 much quicker. More information can be read in Import queue managers from an MQ Explorer export.

Copy text from the container windows to the clipboard

Container windows are used for a number of features in MO71. The Activity Trace viewer is the newest, but they are also used for the Network View and the
Application View. It is now possible to select text in containers and press Ctrl-C to have that text copied to the clipboard


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 support@mqgem.com and a 1-month trial licence will be sent to you.

MQGem Monthly (June 2017)

MQGem Monthly Banner
VOLUME III. – No. 6. FRIDAY, 30 JUNE, 2017 PRICE: FREE

Welcome to the June edition of the MQGem Monthly Newsletter, bringing you company news from MQGem Software, information about the MO71, MQSCX, MQEdit, and QLOAD products, and interesting articles about IBM MQ.

News

A new version of QLOAD, V9.0.1, was released this month. Read more about it here.

IBM announced and released MQ V8 on HPE NonStop, the first Queue Manager release of MQ on the NonStop platform since Version 5.3. Read more here.

Interesting IBM MQ links

Here are a few links that caught our eye this month.

We share all the above links on our Twitter feed and Facebook page so if you don’t want to wait until the end-of-month newsletter, follow us on there.

Upcoming events

There are a number of conference events where IBM MQ will be featured in the coming months. Hopefully you’ll be able to sign up to one near you and obtain some MQ technical education.

Product Info

This months highlighted product information is a video showing how to use the very powerful filters provided in MO71.

IBM MQ Latest Maintenance

Make sure you’re on the latest maintenance level of your version of IBM MQ. These are the latest Fix Packs at the time of going to press. Check here for the latest versions now, and here for the planned dates for the next ones.

Contact Information

Are you looking forward to summer and some time off? We’d love to hear from you. Get in touch by email or follow us on one of our social media channels.
EmailFacebookTwitterLinkedInYouTubeWordPress

← Previous Newsletter

Migrating a Queue Manager?

If you’re planning to migrate a queue manager, from one machine to another, or perhaps you’re consolidating some queue managers onto an MQ Appliance, you are probably aware of, and have even become familiar with, the steps required to export your object definitions and recreate them on the new queue manager. There are a number of tools available that can do this for you – including those from MQGem.

What about your messages though?

While it’s generally a good idea to reduce the load, and drain off as many messages as you can prior to migrating a queue manager. For example if it’s in a cluster, suspend it from the cluster before the move, to reduce the number of messages heading its way. Let all the applications drain the queues of messages and so on. However, it’s not always possible to drain every last message from all your queues.

QLOAD Offload all queuesIn the latest version of QLOAD, V9.0.1, there’s a new feature that will help out when migrating a queue manager. It allows you to unload the messages from all your queues, with one command. And then you can load the messages onto the queues on another queue manager, with one command (or piecemeal if you prefer). You would combine this with your favoured object definition export tool, and before loading the messages, you’d first recreate the queues on the new queue manager with the exported commands.

Here’s an example of QLOAD unloading all the queues on my queue manager.

qload -m MQG1 -i* -f*

The command will produce the following output to show what has been unloaded. Using the -i (lower case) flag means that the messages are only browsed on the queues and are not destructively removed.

APP1.INPUT                                           2  Done.
APP1.RESULT                                         10  Done.
APP2.INPUT                                           1  Done.
APP2.RESULT                                          4  Done.
Q1                                                  28  Done.
Q2                                                  42  Done.
SYSTEM.ADMIN.QMGR.EVENT                              7  Done.
SYSTEM.AUTH.DATA.QUEUE                             126  Done.
SYSTEM.CHANNEL.SYNCQ                                 3  Done.
SYSTEM.CHLAUTH.DATA.QUEUE                            5  Done.
SYSTEM.CLUSTER.REPOSITORY.QUEUE                      3  Done.
SYSTEM.DURABLE.SUBSCRIBER.QUEUE                      1  Done.
SYSTEM.HIERARCHY.STATE                               2  Done.
SYSTEM.INTER.QMGR.FANREQ                             1  Done.
SYSTEM.RETAINED.PUB.QUEUE                            2  Done.
WORK.REQUEST                                         7  Done.

Total : 7 Queues, 94 Messages
 plus : 9 System Queues, 150 Messages

Listing the directory where I ran the qload command, I can now see I have a file for each queue, with an extension .qld. If you prefer to have a different extension then you can alter the command accordingly. For example, use -f*.txt.

I can copy these files to another machine, or simply use a client connection to the other machine accordingly. Then I can run the following QLOAD command to load the messages onto the new queue manager.

qload -m MQG1 -o* -f*

QLOAD will make some checks when you run a load for multiple queues in this way. It will check that all the queues exist that it has files for in the directory matching the file pattern you specified (which assumes an extension of .qld if you just use ‘*’), and it will check that all those queues are empty. If it finds any problems it will report as follows:-

APP1.RESULT                            RC(2085) Unknown object name.
APP2.RESULT                            Not empty.

There are potential problems with these queues.
Are you sure you want to continue?

This lets you know to go and define the missing queues if you need them – there are messages to go onto them so the assumption is that you do need them. It also warns you of non-empty queues. Now if you’ve already started using this queue manager, you might be expecting this situation, but otherwise, you should rectify it, and then re-run QLOAD.

APP1.INPUT                                       2     Done.
APP1.RESULT                                      10    Done.
APP2.INPUT                                       1     Done.
APP2.RESULT                                      4     Done.
Q1                                               28    Done.
Q2                                               42    Done.
WORK.REQUEST                                     7     Done.

Total : 7 Queues, 94 Messages

You’ll notice that this output does not mention the SYSTEM queues that were offloaded. A generic upload will not upload most SYSTEM queues.
SYSTEM.CLUSTER.TRANSMIT.QUEUE and SYSTEM.DEAD.LETTER.QUEUE are the exceptions. The messages were unloaded to files though, so if you really need to load them you can do so the traditional way, by specifying the full queue name on the command and not using the generic upload.


The new version can be downloaded from the QLOAD Download Page. Any current licensed users of QLOAD can run the new version on their existing licence. If you don’t have a licence and would like to try out QLOAD then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.

QLOAD version 9.0.1 is released

MQGem Software is pleased to announce that a new version of QLOAD, our queue load/unload tool for IBM MQ, is now available.

The main features of the release are as follows:-

  • Unload and Load all queue with one command
    Great for taking a backups of messages or for migratory purposes. Save time and effort by doing all queues at once. Read more about this in Migrating a Queue Manager?.
  • Filter messages based on the reason code in the Dead-letter Header
    Very useful when dealing with messages on your Dead-letter Queue. Save off only those specific messages you are interested in.
  • Copy/Move messages based on the target Q/QMgr in a MQDLH or MQXQH
    Copy or move messages currently on the Dead-letter queue or a transmission queue, based on the target queue and/or queue manager in the MQDLH (Dead-letter header) or MQXQH (Transmission header).

The new version can be downloaded from the QLOAD Download Page. Any current licensed users of QLOAD can run the new version on their existing licence. If you don’t have a licence and would like to try out QLOAD then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.

Running the Trigger Monitor as a SERVICE

There was a recent update to MO71 that allowed multiple SERVICE objects to be edited at once.

The example used in the screenshot was of the trigger monitor being run as a service, and is straight out of Knowledge Center (with the exception of a more meaningful object name).

It uses the provided amqsstop program as recommended too. The parameters that amqsstop expects are provided in the STOPARG which include the +MQ_SERVER_PID+ which is a token representing the process id of the process started by the STARTCMD and STARTARG arguments.

I was playing around with this SERVICE object a little more today and discovered that the STOP SERVICE command doesn’t work. This post covers what I discovered and how to fix it.

You’ll note from the screen shot that I’m running a 64-bit Windows queue manager – you can tell that from the path of the amqsstop program which is in the bin64 directory. However, I used the runmqtrm program from the bin directory. This is no doubt a migratory aid for those users that had scripts etc starting the trigger monitor from that location prior to the Windows queue manager becoming a 64-bit entity.

Having started my trigger monitor with the above definition, I can see it’s status using the DISPLAY SVSTATUS command.

AMQ8632: Display service status details.
   SERVICE(TRIGGER.MONITOR)                STATUS(RUNNING)
   PID(3384)                               SERVTYPE(SERVER)
   STARTDA(2017-06-17)                     STARTTI(11.40.55)
   CONTROL(QMGR)                           STARTCMD(C:\mqm8004\bin/runmqtrm)
   STARTARG(-m MQG1 -q ACCOUNTS.INITQ)     STOPCMD(C:\mqm8004\bin64/amqsstop)
   STOPARG(-m MQG1 -p 3384)             
   DESCR(Trigger Monitor Service Auto Started with QMgr)
   STDOUT( )                               STDERR( )

Part of this display is the process ID of the trigger monitor, and you can also see that the replaceable insert +MQ_PROCESS_ID+ in the STOPARG attribute has been replaced with the same PID.

When you issue the MQ command STOP SERVICE(TRIGGER.MONITOR) it issues a PCF Inquire Connections command with a WHERE clause asking for all those connections where the PID is 3384. You can see in the MQ trace that the answer which comes back is MQRCCF_NONE_FOUND.

Now I know the trigger monitor is running so I find it myself in a DISPLAY CONN command and I see this:-

AMQ8276: Display Connection details.
   CONN(876C445920002201)                
   EXTCONN(414D51434D5147312020202020202020)
   TYPE(*)                               
   PID(4604)                               TID(1) 
   APPLDESC(WebSphere MQ Trigger Monitor)
   APPLTAG(:\mqm8004\bin64\runmqtrm.exe)   APPLTYPE(SYSTEM)
   ASTATE(NONE)                            CHANNEL( )
   CLIENTID( )                             CONNAME( )
   CONNOPTS(MQCNO_SHARED_BINDING)          USERID(MUSR_MQADMIN)
   UOWLOG( )                               UOWSTDA(2017-06-17)
   UOWSTTI(11.40.55)                       UOWLOGDA( )
   UOWLOGTI( )                             URTYPE(QMGR)
   EXTURID(XA_FORMATID[] XA_GTRID[] XA_BQUAL[])
   QMURID(0.20482)                         UOWSTATE(ACTIVE)

So there are two interesting things in this output. Firstly the PID is different. Secondly, it’s the bin64 version of runmqtrm. There’s no sign of the bin version of runmqtrm with PID(3384) anywhere in DISPLAY CONN. So I guess it didn’t make a connection to the queue manager.

Next thing to check out is the processes that the Windows OS thinks are running. I look for and find both PID(3384) and PID(4604).

runmqtrm processes

Two processes running called runmqtrm

So it seems that the runmqtrm in the bin directory is not a copy of the one in the bin64 directory, but something else that starts the bin64 version of runmqtrm. This means that amqsstop doesn’t work because it is trying to find the first process which never connected to the queue manager.

The fix to get your Trigger Monitor Service definition to work again with a STOP SERVICE command is to use the bin64 version of runmqtrm directly in the STARTCMD and avoid this double hop which leaves you with two processes running unnecessarily.

DEFINE SERVICE(TRIGGER.MONITOR) +
       SERVTYPE(SERVER) CONTROL(QMGR) +
       DESCR('Trigger Monitor Service Auto Started with QMgr') +
       STARTCMD('+MQ_INSTALL_PATH+bin64\runmqtrm') +
       STARTARG('-m +QMNAME+ -q ACCOUNTS.INITQ') +
       STOPCMD('+MQ_INSTALL_PATH+bin64\amqsstop') +
       STOPARG('-m +QMNAME+ -p +MQ_SERVER_PID+')

You don’t have the same problem on Unixes, because there aren’t the two bin directories on those platforms. So this is very specific to Windows.

Really it’s a shame that there isn’t a replaceable insert something like +MQ_BIN_DIR_PATH+ so that these platform differences would be completely removed from the SERVICE object definition. But I suppose you could make one yourself and put it into the service.env file.


IBM Certified SpecialistIBM Champion 2017 Cloud

Morag Hughson
IBM Champion 2017 – Cloud
IBM Certified System Administrator – MQ V8.0
Find her on: LinkedIn: http://uk.linkedin.com/in/moraghughson Twitter: https://twitter.com/MoragHughson SlideShare: http://www.slideshare.net/moraghughson developerWorks: https://www.ibm.com/developerworks/community/profiles/html/profileView.do?userid=110000EQPN