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 » Some help with MQSC script

Post new topic  Reply to topic
 Some help with MQSC script « View previous topic :: View next topic » 
Author Message
krypton
PostPosted: Thu May 31, 2018 8:40 am    Post subject: Some help with MQSC script Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

I am trying to combine these 2 statements in a single loop but not having any luck, can someone guide me through it.
By itself both the while statements are working.


while true ; do echo "dis chs(ABC.XYZ.SN) msgs" | runmqsc UNPRDQM1 & sleep 1; done

while true ; do echo "dis chs(XYZ.ABC.SN) msgs" | runmqsc UNPRDQM1 & sleep 1; done

_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 31, 2018 11:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

What goes wrong?

If this is how you're monitoring channel status on your appliance, are you sure this is the best way?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu May 31, 2018 3:33 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

& creates a background process.
&& or ; should work OK.

while true ; do echo "dis chs(ABC.XYZ.SN) msgs\ndis chs(ABC.ABC.SN) msgs" | runmqsc UNPRDQM1 ; sleep 1 ; done

worked for me in ksh.

Why do you want to do these chs commands? There may be a better approach....
_________________
Glenn
Back to top
View user's profile Send private message
krypton
PostPosted: Fri Jun 01, 2018 4:20 am    Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

Quote:
What goes wrong?

If this is how you're monitoring channel status on your appliance, are you sure this is the best way?


Hi Vitor, thank you for replying, this is not for all time monitoring, only when application says they are sending request and not getting reply, I want to see if the msgs count increase at the same time on both sender or receiver channel or not. So, that I can pinpoint the issue.
so, this is not something i am planning to do 24*7.
_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
krypton
PostPosted: Fri Jun 01, 2018 4:25 am    Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 186

Hi Glenn,

thank you, it worked now.


Quote:

Why do you want to do these chs commands? There may be a better approach....


mentioned in the other reply, it is only for troubleshooting purpose.
_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Some help with MQSC script
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.