ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » command for shutting down and starting all queue managers

Post new topic  Reply to topic
 command for shutting down and starting all queue managers « View previous topic :: View next topic » 
Author Message
mrfridaynight
PostPosted: Tue Nov 14, 2006 4:18 am    Post subject: command for shutting down and starting all queue managers Reply with quote

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
View user's profile Send private message MSN Messenger
jeevan
PostPosted: Tue Nov 14, 2006 4:20 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 14, 2006 4:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Code:
init 6


or
Code:
shutdown -r now



_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mrfridaynight
PostPosted: Tue Nov 14, 2006 4:46 am    Post subject: Reply with quote

Apprentice

Joined: 13 Nov 2006
Posts: 44

jefflowrey

I do NOT want to shut down the server!
Back to top
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Tue Nov 14, 2006 4:48 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Tue Nov 14, 2006 7:49 am    Post subject: Reply with quote

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
View user's profile Send private message
bbburson
PostPosted: Tue Nov 14, 2006 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Tue Nov 14, 2006 12:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
emileke
PostPosted: Wed Nov 15, 2006 1:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Michael Dag
PostPosted: Wed Nov 15, 2006 4:50 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

have look here
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » command for shutting down and starting all queue managers
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.