MQ

IBM MQ Little Gem #53: JOBNAME in Channel Status

By Morag Hughson posted 19 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 this post I want to take a look at one attribute that is part of the channel status output of a running channel. It's a field called JOBNAME and it's contents may not be immediately obvious. Here's an example from a Windows queue manager.

AMQ8417I: Display Channel Status details.
   CHANNEL(MQGEM.SVRCONN)                  CHLTYPE(SVRCONN)
   CONNAME(127.0.0.1)                      CURRENT
   JOBNAME(000042040000000C)               STATUS(RUNNING)
   SUBSTATE(RECEIVE)                    

Looking in the IBM Docs, the JOBNAME field is described as follows:

JOBNAME

A name that identifies the MQ process that is currently providing and hosting the channel.

On Multiplatforms, this name is the concatenation of the process identifier and the thread identifier of the MCA program, displayed in hexadecimal.

So in my above example, this specific channel is currently running on a process ID of 0x00004204 and within that process it is thread 0x0000000C.

So why is this useful?

The process identified by this field is an amqrmppa process, a Channel Pool process. These processes are responsible for running all the channels (unless you specifically configure your system to avoid them). There will be a number of these processes, depending on how many channels you have. Once an amqrmppa process has more than 64 channels running in it, a new amqrmppa process will be started. Given that channel start and end as required, you might have less threads in one amqrmppa process and yet still have additional processes running. Channels are not re-balanced across processes because that would require restarted network connections which would be disruptive.

It is likely that you monitor these processes on your machine just as with all the other processes, and if you saw unexpected memory use or CPU use you might ask yourself, "I wonder which channel is causing that?" To answer that question, you would find the process ID, and convert it into hexadecimal, and then use that number in the command shown below. In my example, I'm looking for process 16900 which I've spotted in task manager.

I convert that decimal number 16900 into hex and I get 0x00004204, and then plug it into the command.

DISPLAY CHSTATUS(MQGEM.SVRCONN) WHERE(JOBNAME LK '00004204*' )

Interestingly, the documentation says that you cannot use JOBNAME in a WHERE clause, but it seems to work. I'd be interested if others also manage to get this to work too.

Now that you can list all the channels running in that process, you can see whether there are any signs of things misbehaving, for example, SUBSTATE could show if a channel is looping in an exit.

In summary, now you know that multiple channels run in threads in amqrmppa processes and how to identify which ones are running in any particular process. I hope this will be useful for your monitoring.


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.

#Little-Gem
#IBMMQ
#ChampionsCorner

Permalink