Author |
Message
|
prithun |
Posted: Tue Jun 20, 2006 5:52 am Post subject: check status of queue manager |
|
|
Apprentice
Joined: 08 Apr 2005 Posts: 33
|
I have an application which has two queue managers.
I want to check whether a specific Queue Manager is running or not.
Is there any utility to check the status.
Can anybody please tell me a way to do it. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jun 20, 2006 5:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What have you tried? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Tue Jun 20, 2006 6:13 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Quote: |
Is there any utility to check the status.
|
MQCONN  |
|
Back to top |
|
 |
dgolding |
Posted: Tue Jun 20, 2006 7:44 am Post subject: |
|
|
 Yatiri
Joined: 16 May 2001 Posts: 668 Location: Switzerland
|
"dspmq" from the command line is a pretty good step - we use that in the beginning of all our MQ monitoring, to see who's up or not..... |
|
Back to top |
|
 |
kevinf2349 |
Posted: Tue Jun 20, 2006 10:57 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
If you are on Windows you can also look in the registry and it will tell you the status too.
What are you trying to achieve? Are you writing a monitor or do you just want to have the application 'fail-over'?
The thing about using MQCONN is that it will work on all platforms (and as a client too.) |
|
Back to top |
|
 |
markt |
Posted: Tue Jun 20, 2006 12:33 pm Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
The Windows registry does not tell you THE status. It will tell you A status, but not necessarily one you can believe.
Question: How does the key get updated?
Answer: By a queue manager changing it as it changes state.
Question: So how can it get updated if the queue manager abends?
Answer: It can't.
(Same situation if you look in the ini files on Unix.)
Only way to tell for sure is to do some real work to the queue manager. In the HA scripts, a runmqsc PING QMGR command is normally used. Alternatively use dspmq (which wasn't available at the time the HA scripts were first written). Or write your own program to do MQCONN and return status. |
|
Back to top |
|
 |
vennela |
Posted: Tue Jun 20, 2006 1:10 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
In short for the question posted originally by prithun the answer is
dspmq |
|
Back to top |
|
 |
kevinf2349 |
Posted: Tue Jun 20, 2006 1:31 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Vennela
Try that on z/OS and see how far you get.  |
|
Back to top |
|
 |
vennela |
Posted: Tue Jun 20, 2006 2:54 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
kevinf2349 wrote: |
Vennela
Try that on z/OS and see how far you get.  |
Well, I should have qualified my answer as dspmq for distributed platforms.
But again, I definitely agree with the posts above. But for somebody who is so new to the product who cannot determine the status, I thought dspmq should be enough.
For this kind of problems here, the above solutions probably make sense.
http://www.mqseries.net/phpBB2/viewtopic.php?t=29106&highlight=registry |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Jun 21, 2006 4:57 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Vennela
That is really why I asked what they were actually wanting to do. If they are writing a monitor then I agree with you DSPMQ is probably the way to go, but if it is just for an appliaction then, in my opinion, applications shouldn't need to do anything, the return from MQCONN should be enough. |
|
Back to top |
|
 |
LuisFer |
Posted: Wed Jun 21, 2006 11:09 am Post subject: |
|
|
 Partisan
Joined: 17 Aug 2002 Posts: 302
|
In my opinion, dspmq should must be enough. But with the dspmq i see the
QMgr running, but the listener, the command Server?.
I've an utility called MQPING (for Unix & Tandem) , this one sends a PING QMGR by MQAI and calculate the Elapsed Time for the Request/Reply and the CPUTIME for each API. The source is at http://www.luisfer.info/fuentes/mqping.c
Regards |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 21, 2006 2:18 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In my opinion, amqscnxc should be enough. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prithun |
Posted: Thu Jun 22, 2006 12:12 am Post subject: |
|
|
Apprentice
Joined: 08 Apr 2005 Posts: 33
|
dspmq solved my problem. I wanted to know the status from a shell script. Thanks for all the replies. |
|
Back to top |
|
 |
ccfoo242 |
Posted: Mon Aug 07, 2006 10:51 am Post subject: |
|
|
Newbie
Joined: 31 Jan 2006 Posts: 7
|
LuisFer wrote: |
In my opinion, dspmq should must be enough. But with the dspmq i see the
QMgr running, but the listener, the command Server?.
I've an utility called MQPING (for Unix & Tandem) , this one sends a PING QMGR by MQAI and calculate the Elapsed Time for the Request/Reply and the CPUTIME for each API. The source is at http://www.luisfer.info/fuentes/mqping.c
Regards |
Thanks for the source. I'll try to get this compiled for Windows as well. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Aug 07, 2006 9:12 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
LuisFer wrote: |
I've an utility called MQPING (for Unix & Tandem) , this one sends a PING QMGR by MQAI and calculate the Elapsed Time for the Request/Reply and the CPUTIME for each API. The source is at http://www.luisfer.info/fuentes/mqping.c |
Hi,
Is it ok if I post your code on my web site?
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|