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 » queue manager stop script

Post new topic  Reply to topic
 queue manager stop script « View previous topic :: View next topic » 
Author Message
paustin_ours
PostPosted: Mon Aug 27, 2018 5:09 am    Post subject: queue manager stop script Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Can someone share a queue manager script that waits and kills processes in the correct order after a wait period. used to have one in the past and it is common enough figured i would ask here if someone can share if they have one they currently use.
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Mon Aug 27, 2018 6:07 am    Post subject: Re: queue manager stop script Reply with quote

Grand High Poobah

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

paustin_ours wrote:
Can someone share a queue manager script that waits and kills processes in the correct order after a wait period.


The endmqm command "kills" all the processes in the correct order.

If you mean that you want to signal application processes to shut down, then wait a period of time for them to do it, then shut down anyway, it's the endmqm command, followed by a sleep command, followed by an endmqm command with a -i parameter.

If you mean something else, then you need to explain it more.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Aug 27, 2018 7:07 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Do you have a qmgr that doesn’t end normally - with endmqm?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Mon Aug 27, 2018 2:20 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Am surprised you guys haven't come across this ... Many a times a endmqm -i runs for a long time...we end up killing mq processes in a specific order that is documented in infocenter.
Back to top
View user's profile Send private message Yahoo Messenger
bruce2359
PostPosted: Mon Aug 27, 2018 3:41 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

paustin_ours wrote:
Am surprised you guys haven't come across this ... Many a times a endmqm -i runs for a long time...we end up killing mq processes in a specific order that is documented in infocenter.

We've all come across this. How to stop a qmgr is a very basic MQ concept.

I'd guess that some application ignored your runmqm -c. Next time you plan to do an endmqm, display (with MQSC commands or MQExplorer or equivalent) active connections.

The -c switch (default) allows all connected apps to continue until MQDISConnect - but no new connections. The -i switch allows all current MQI calls to complete but no new MQI calls.

The -p switch ends the qmgr without waiting for either of the above. The qmgr ends normally with -c, -i, and -p.

All MQI calls should include _FAIL_IF_QUIESCING option so that the app will understand that the qmgr is being shut down while the app is running. An MQGET call with an infinite WAITINTERVAL will behave as you've observed.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.


Last edited by bruce2359 on Mon Aug 27, 2018 3:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon Aug 27, 2018 3:42 pm    Post subject: Reply with quote

Jedi

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

paustin_ours wrote:
Am surprised you guys haven't come across this ... Many a times a endmqm -i runs for a long time...we end up killing mq processes in a specific order that is documented in infocenter.
If -i doesn't work, you can try -p.

The problem with scripting kill -9 is that the list of processes and the correct order is dependent on MQ version, possibly on fixpack level as well.

If you are regularly killing processes, you should raise a Service Request with IBM to understand why you need to do this. Its definitely abnormal. There may be some underlying OS or resource issue.
_________________
Glenn
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 28, 2018 5:11 am    Post subject: Reply with quote

Grand High Poobah

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

gbaddeley wrote:
If you are regularly killing processes, you should raise a Service Request with IBM to understand why you need to do this.





gbaddeley wrote:
Its definitely abnormal. There may be some underlying OS or resource issue.


again

paustin_ours wrote:
Am surprised you guys haven't come across this ... Many a times a endmqm -i runs for a long time...we end up killing mq processes in a specific order that is documented in infocenter


It's very seldom (in my personal experience) for a -i to run for a long time. Each instance I can remember I've traced to a contact admin who coded an MQGet with an unlimited wait and no fail if quiescing. Those you resolve with a -p and a good solid talk with the idiot responsible.

I've brought down a queue manager using kill -9 in the order specified I think half a dozen times in over 20 years, and in each instance there was a crisis at the server level.

(#include WindozeRant.h)

If this happens so often you need to script for it, you have a serious problem.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » queue manager stop 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.