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 process

Post new topic  Reply to topic
 queue manager process « View previous topic :: View next topic » 
Author Message
krisrock
PostPosted: Tue Oct 02, 2007 10:37 am    Post subject: queue manager process Reply with quote

Acolyte

Joined: 11 Sep 2007
Posts: 65

Hi

I am working on a script to check whether the queue manager is running.

Is there any way to check whether the specific queue manager is running?


thanks in advance
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 02, 2007 10:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

dspmq
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
krisrock
PostPosted: Wed Oct 03, 2007 10:26 am    Post subject: Reply with quote

Acolyte

Joined: 11 Sep 2007
Posts: 65

this just shows whether it is running...
I need something like pid file or something
Back to top
View user's profile Send private message
belchman
PostPosted: Wed Oct 03, 2007 10:43 am    Post subject: Reply with quote

Partisan

Joined: 31 Mar 2006
Posts: 386
Location: Ohio, USA

Maybe ps -ef | grep amqzxma0
_________________
Make three correct guesses consecutively and you will establish a reputation as an expert. ~ Laurence J. Peter
Back to top
View user's profile Send private message
markt
PostPosted: Wed Oct 03, 2007 11:00 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

knowing a pid is USELESS

It CANNOT tell you reliably whether the qmgr is active.
dspmq tells you precisely that.

As has been said here more than once before, if you'd bothered to search.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 03, 2007 11:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Also, you asked "Is there any way to check whether the specific queue manager is running? "

So why are you complaining that "this just shows whether it is running... "?

Please don't reinvent the wheel.

Buy a monitoring solution. Implement it. Enjoy your life.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Oct 03, 2007 1:35 pm    Post subject: Reply with quote

Guest




Quote:
(dspmq) just shows whether it is running


More accurately, dspmq shows that the qmgr believes it is running. I'd guess that the original post is asking how to determine if the qmgr is doing productive work for the end-user.

That is what Jeff is suggesting when he recommends "the wheel" that has already been invented - a monitoring tool. Tivoli, TMON, MQEnterprise, others are already in "wheel" status.
Back to top
mehedi
PostPosted: Thu Oct 04, 2007 7:06 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2001
Posts: 102
Location: PSTech

You could also ping the queue manager
Here is a sample shell script

#
echo "ping qmgr" | runmqsc ABCD
# pingresult will be 0 on success and non-zero on error
if [ $pingresult -ne 0 ]
then
echo "QManager ABCD is not active $host for $dt "
Back to top
View user's profile Send private message MSN Messenger
SAFraser
PostPosted: Thu Oct 04, 2007 10:46 am    Post subject: Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

I would be curious to know if the original post-er has had a bad experience with dspmq? I ask because, although dspmq only shows you if the queue manager thinks it's running, I have never had a situation where dspmq displayed a "running" status but was not functioning.

This is a topic in my shop right now, so I thought I would ask....

Shirley
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Oct 04, 2007 11:04 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The HA support pack uses the MQSC Ping.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
markt
PostPosted: Thu Oct 04, 2007 12:51 pm    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 508

Quote:
The HA support pack uses the MQSC Ping.


dspmq didn't exist when the HA packages were originally written. These days, I think it would be the preferred choice, unless you want to get more sophisticated in checking the health, eg by putting a real msg to a loopback queue/channel and looking for the return.

dspmq is effectively doing an MQCONN (not exactly, but close) so it's pretty reliable. PING is slightly heavier processing, but it does exercise a bit more of the qmgr codepath than dspmq so it's avoiding a very hypothetical situation of the qmgr failing in such a way as to still leave internal control blocks usable.

The only issue I have with dspmq is that its responses are translated text. Easy to deal with on Unix, but not so easy on Windows. PING QMGR doesn't have that problem.

(Some people also think that what's written in qmstatus.ini is helpful for telling if the qmgr is running - they're wrong.)
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Thu Oct 04, 2007 1:09 pm    Post subject: Reply with quote

Jedi Knight

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

dspmq is great, but a little extension would be nice

Code:

$ java xdspmq

xdspmq 1.0.0                                  MQSystems - www.mqsystems.com
Thu Oct 04 16:02:27 CDT 2007 by mqm

Hostname                 lpar14
Name                     WebSphere MQ
Version                  6.0.0.0
CMVC level               p000-L050519
BuildType                IKAP - (Production)
Default QueueManager     D.APS2.QMGR

QMNAME(QMGRA)                                        STATUS(Running)
 Command Server                                      STATUS(Running)
 Channel Initiator                                   STATUS(Running)
 Listener (MQ Object)    on (default) Port(1417)     STATUS(Running)
QMNAME(TEST123)                                      STATUS(Ended normally)
 Listener (INETD)        on Port(ibm-mqseries)       STATUS(Running)
QMNAME(D.APS2.QMGR)                                  STATUS(Running)
 Command Server                                      STATUS(Stopped)
 Channel Initiator                                   STATUS(Running)
$



Code:

java xdspmq -log

xdspmq 1.0.0                                  MQSystems - www.mqsystems.com
Thu Oct 04 16:05:29 CDT 2007 by mqm

Hostname                 lpar14
Name                     WebSphere MQ
Version                  6.0.0.0
CMVC level               p000-L050519
BuildType                IKAP - (Production)
Default QueueManager     D.APS2.QMGR

QMNAME(QMGRA)                                        STATUS(Running)
 Command Server                                      STATUS(Running)
 Channel Initiator                                   STATUS(Running)
 Listener (MQ Object)    on (default) Port(1417)     STATUS(Running)
LogPrimaryFiles          3
LogSecondaryFiles        2
LogFilePages             1024
LogType                  CIRCULAR
LogBufferPages           0
LogPath                  /var/mqm/log/QMGRA/
LogWriteIntegrity        TripleWrite

QMNAME(TEST123)                                      STATUS(Ended normally)
 Listener (INETD)        on Port(ibm-mqseries)       STATUS(Running)
LogPrimaryFiles          3
LogSecondaryFiles        2
LogFilePages             1024
LogType                  CIRCULAR
LogBufferPages           0
LogPath                  /var/mqm/log/TEST123/
LogWriteIntegrity        TripleWrite

QMNAME(D.APS2.QMGR)                                  STATUS(Running)
 Command Server                                      STATUS(Stopped)
 Channel Initiator                                   STATUS(Running)
LogPrimaryFiles          3
LogSecondaryFiles        2
LogFilePages             1024
LogType                  CIRCULAR
LogBufferPages           0
LogPath                  /var/mqm/log/D!APS2!QMGR/
LogWriteIntegrity        TripleWrite

_________________
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 » queue manager process
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.