endmqm lets you stop a running queue manager. But there are rare occasions where it wont work and you need to kill the queue manager processes yourself. As a queue manager is made up of a number of processes, there is a list which gives the recommended order to stop the processes in.
Considering how rare a situation this is, it never ceases to surprise me how many WMQ Sys Admins have some sort of kill script in their arsenal, ready to nuke an errant queue manager.
But as people do, and as often these scripts have been around for a long while, I thought it was worth highlighting that the order in which you stop the processes was changed for WMQ v6, point out where the new order can be found, and briefly talk about some interesting points behind the order.
The order to end processes in WebSphere MQ v6 can be found in an appendix of the WebSphere MQ System Administration Guide, for both Windows and UNIX systems.
The first process to end is amqzmuc0 - the critical process manager. This contains the logger, and ending it prevents any further transactional work.
The next process to end is amqzxma0 - the execution controller. The execution controller identifies when other processes die. Stopping this prevents it from producing a pile of “Process X has died” FFST error reports as they are ended. It also prevents any new connections being made to the queue manager.
At the other end of the list is amqpcsea - the command server. By this point in the list, these are processes which do not access any critical queue manager resources, so can be safely left until last.

5 comments
Comments feed for this article
March 23, 2007 at 10:56 am
Pankaj
Good Article. But most of the times i wonder which particular process belongs to which particular queue manager, if there are many other queue managers running and i want to stop only one particular queue manager.
Is there any way to list/identify particular queue manager processes to kill?
March 23, 2007 at 11:20 am
Dale Lane
The easiest way (and the way that is recommended in the Sys Admin Guide, I think) is to do a full process listing, filtered by the name of your queue manager. All queue manager processes will include the name of the queue manager in the full command.
E.g.
ps -ef | grep QMNAMEThis might cause you problems if you have similarly named queue managers (e.g. BOB and BOBBY - where doing a grep on “BOB” will show processes from both queue managers)
In these circumstances, a more definitive way is to use
dspmq -cwhich shows the PIDs associated with each queue manager.Hope that helps
Dale
March 23, 2007 at 1:36 pm
Franz Baumgartner
Thank you for the information.
I recently opened a PMR to get the order of stopping a qmgr manually! The reason are discrepancies seen in SysAdminGuide and HACMP SupportPack MC91 (MQ v6).
There is a good script in SupportPac MC91 (even if you don’t have a HACMP installation, you can use it on Unix systems) to stop a qmgr in a sequence of controlled, immediate and preemptive commands waiting xx seconds for the next phase (command) to execute. The last brutal command is then to kill the qmgr processes using a process list of order. But this process list (including v5 and v6 processes) doesn’t match the order in SysAdminGuide.
IBM PMR stated, the SysAdminGuide is the right one, thus you have to reorder file hamqproc file matching SysAdminGuide order (see Dale’s topic)
See hamstart and hamqmstop scripts in MC91.
Hope you can start and stop qmgrs without need to use last phase of killing processes.
Franz
March 24, 2007 at 12:18 pm
protocol7 » Blog Archive » links for 2007-03-24
[...] Stopping queue managers (when nothing else will) (tags: ibm websphere wmq by:dale_lane) [...]
March 28, 2007 at 7:07 pm
AIXπ » links for 2007-03-25
[...] Stopping queue managers (when nothing else will) « a Hursley view on WebSphere MQ (tags: by:dale_lane ibm websphere wmq) [...]