|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
RDQM "centralized" start / stop qm scripts? |
« View previous topic :: View next topic » |
Author |
Message
|
mqprimerib |
Posted: Thu Sep 26, 2024 9:14 am Post subject: RDQM "centralized" start / stop qm scripts? |
|
|
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 |
|
 |
hughson |
Posted: Thu Sep 26, 2024 6:49 pm Post subject: |
|
|
 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 |
|
 |
mqprimerib |
Posted: Fri Sep 27, 2024 4:34 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Sun Sep 29, 2024 2:32 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|