Date Created: Wed 30-Jan-2008

Related Document Categories:

Get my WebSphere MQ course here >> http://www.themiddlewareshop.com/products/


Today I learned the command

endmqm (end queue manager)

Purpose:
Use the endmqm command to end (stop) a specified local queue manager. This command stops a queue manager in one of three modes:
Controlled or quiesced shutdown
Immediate shutdown
Preemptive shutdown
The attributes of the queue manager and the objects associated with it are not affected. You can restart the queue manager using the strmqm (Start queue manager) command.

To delete a queue manager, stop it and then use the dltmqm (Delete queue manager) command.

Issuing the endmqm command will effect any client application connected through a server-connection channel. The effect varies depending on the parameter used, but it is as though a STOP CHANNEL command was issued in one of the three possible modes. See WebSphere MQ Clients, for information on the effects of STOP CHANNEL modes on server-connection channels. The endmqm optional parameter descriptions state which STOP CHANNEL mode they will be equivalent to.

Note: The endmqm command does not allow the ability to stop all queue managers at once. You have to stop them one at a time. This is often scripted by MQ admins.

Examples:

-bash-3.1$ endmqm venus.queue.manager
Quiesce request accepted. The queue manager will stop when all outstanding work
is complete.

----------------------------------------------

To do: A script to end all Message Queue Managers.

#stopmqm.sh
queuemanagers=`dspmq | awk '{ print $1 }' | tr -d "(QMNAME)"`
echo $queuemanagers
for i in $queuemanagers
do
`endmqm $i`
done

or use sed as opposed to trim

queuemanagers=`dspmq | awk '{ print $1 }' | sed 's/QMNAME(//g;s/)//g'`
echo $queuemanagers
for i in $queuemanagers
do
`endmqm $i`
done

----------------------------------------------

The script above will put a request on the queue, but have to grep for STATUS(Ended normally) as it might take a while for queue manager to shut down ie as shown below

after a call to stopmqm.sh

QMNAME(venus.queue.manager) STATUS(Ended normally)
QMNAME(my.queue.manager) STATUS(Quiescing)

Get my WebSphere MQ course here >> http://www.themiddlewareshop.com/products/


Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


  • Linked In
  • Twitter
  • About Me
  • My Blog
  • Contact Me

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories