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 » RDQM "centralized" start / stop qm scripts?

Post new topic  Reply to topic
 RDQM "centralized" start / stop qm scripts? « View previous topic :: View next topic » 
Author Message
mqprimerib
PostPosted: Thu Sep 26, 2024 9:14 am    Post subject: RDQM "centralized" start / stop qm scripts? Reply with quote

Apprentice

Joined: 30 Mar 2016
Posts: 36
Location: Detroit Rock City

Hi gang,

We've recently spun up a couple of 3 node RDQM clusters running MQ 9.3. No issues there but it is still new to me. I find some simple tasks like endmqm $QM and strmqm $QM a bit more involved

It appears you can only run those start/stop commands on the QM's current node. So this requires me to get on a node in the HA cluster and use rdqmstatus to find the current location. Then log onto that node if different, and then start/stop.

I was going to make a simple shell script to get the current location from rdqmstatus and then run the start /stop command over ssh. But I find that capturing the output rdqmstatus isn't that easy as I can't just pipe output to parse:

[mqm@host21 ~]$ rdqmstatus -m QM.EC1.1 |grep current
Node: host21
Queue manager status: Running elsewhere
HA role: Secondary
HA status: Normal
HA control: Enabled
HA current location: host23
HA preferred location: host23
HA blocked location: None
HA floating IP interface: eth0
HA floating IP address: 10.1.1.29

Node: host22
HA status: Normal

Node: host23
HA status: Normal


I'm just wondering if anyone else has attempted something like this. Or if there is another way that I'm not aware of.

As always, I appreciate any and all feedback.
Thanks
DM
Back to top
View user's profile Send private message
hughson
PostPosted: Thu Sep 26, 2024 6:49 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1959
Location: Bay of Plenty, New Zealand

I'll leave others to comment on easy ways to parse output in Linux shell scripts - not my forte.

However, I do wonder whether you can do something that makes use of the preferred location for the queue manager.

In your output it shows you have a preferred location set. This is where the queue manager ought to be running if it can. If you need to stop and restart it, you could, from any node, change the preferred location to somewhere else, and then it will be automatically stopped and restarted wherever the new preferred location is.

If, on the other hand, your preferred locations are set very deliberately, then you could just code your script to expect the queue manager to be at its always preferred location? If it's not there, there is something wrong with the node and you have bigger fish to fry, and once the node is fixed the system will automatically stop and restart it back over there anyway, resulting the restart you were needing to do having been done.

Might be some legs in that? Just a thought anyway.
Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
mqprimerib
PostPosted: Fri Sep 27, 2024 4:34 am    Post subject: Reply with quote

Apprentice

Joined: 30 Mar 2016
Posts: 36
Location: Detroit Rock City

Thanks for given me another way to approach this. I appreciate it.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Sep 29, 2024 2:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mqprimerib wrote:
Thanks for given me another way to approach this. I appreciate it.

Forget the preferred location as it may be suspended for maintenance.
You should check the current location. On the current location the role should be primary...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » RDQM "centralized" start / stop qm scripts?
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.