Author |
Message
|
mrfridaynight |
Posted: Tue Nov 14, 2006 4:18 am Post subject: command for shutting down and starting all queue managers |
|
|
Apprentice
Joined: 13 Nov 2006 Posts: 44
|
Hi All,
On the command line, is there a command to shut down ALL queue managers and a command to start ALL queue managers.
Its a bit frustrating having to stop them 1 by 1 and start them 1 by 1
Thanks |
|
Back to top |
|
 |
jeevan |
Posted: Tue Nov 14, 2006 4:20 am Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
as far as I know, there is not single command doing that but you can write a script and put the command in loop. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 14, 2006 4:38 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
or
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mrfridaynight |
Posted: Tue Nov 14, 2006 4:46 am Post subject: |
|
|
Apprentice
Joined: 13 Nov 2006 Posts: 44
|
jefflowrey
I do NOT want to shut down the server! |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 14, 2006 4:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I know...
It's relatively easy to parse the output of dspmq using something like awk or sh or perl.
On the other hand, most people don't add or remove queue managers very often, so simply hardcoding the names of the queue managers in a script that runs endmqm several times is even easier. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
exerk |
Posted: Tue Nov 14, 2006 7:49 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
On our AIX systems we have a script that reads a file, which contains the list of queue managers, and loops through starting the qmgr's (v6.0) and associated processes (v5.3). As we add more qmgr's we just add the names to the file. The script is initialised whenever the server is bounced, and individual queue managers can be stopped/started as necessary. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
bbburson |
Posted: Tue Nov 14, 2006 7:55 am Post subject: |
|
|
Partisan
Joined: 06 Jan 2004 Posts: 378 Location: Nowhere near a queue manager
|
exerk wrote: |
As we add more qmgr's we just add the names to the file. |
Use 'dspmq' to derive your list of qmgrs and you won't have to worry with keeping the other file up to date. |
|
Back to top |
|
 |
exerk |
Posted: Tue Nov 14, 2006 12:13 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Some of them are VCS controlled, hence the use of a names file as HA qmgr's do not appear in the names file. However your suggestion is ideal for blades etc. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
emileke |
Posted: Wed Nov 15, 2006 1:33 am Post subject: |
|
|
Centurion
Joined: 19 Aug 2001 Posts: 110 Location: South Africa
|
Write a little script with the following:
dspmq | grep -i "QMNAME" | cut -d '(' -f2,3 | cut -d ')' -f1 | while read QMGR
do
echo "stopping Command Server for Queue Manager ${QMGR}...."
/usr/bin/su - $UID -c "endmqcsv $QMGR"
echo "Command Server for Queue Manager ${QMGR} stopped...."
sleep 3
echo "stopping Queue Manager ${QMGR}...."
/usr/bin/su - $UID -c "endmqm -i $QMGR"
echo "Queue Manager ${QMGR} Stopped...."
/usr/bin/su - $UID -c "endmqlsr -m $QMGR"
done
Hope it helps _________________ Emile M Kearns |
|
Back to top |
|
 |
Michael Dag |
Posted: Wed Nov 15, 2006 4:50 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
|