Discussion:
Which application has a clustered qalias open
David Awerbuch (BLOOMBERG/ 731 LEXIN)
2013-07-10 13:21:19 UTC
Permalink
Hi everyone,

It's a beautiful day here in New York City. The sun is shining, the birds are singing, trucks and geese are a-honking ... but I wander.

Let's open the mail box and pick a user's letter at random. Oh, here's a good one, submitted by RG in London:

"I have a cluster-exposed QAlias on Qmgr QMA, which resolves to a local QRemote on QMA.

Question: Using WMQ resources and Linux commands, how can I determine which WMQ Client application instance has MQOPENed this particular QAlias for output on a different queue manager on the cluster, and through which queue manager?

I was eventually able to determine the source Qmgr independently (QMB). The SYSTEM.CLUSTER.TRANSMIT.QUEUE on QMB is opened by about 200 instances of 4 different applications; how can I tell which one of these is opening the particular QAlias?"

Hmmm ... that's 2 good questions. Anyone want to field this one?

Thanks,
Dave



<< Seriously? I don't understand why you don't understand what I don't understand!! >>
David Ware
2013-07-10 15:26:12 UTC
Permalink
Hi David,

For the first stage of this, finding which queue managers in a cluster are
currently using a clustered queue, there is no easy way unfortunately. You
could look at the running cluster receiver channels on the host queue
manager but that's obviously not very useful in a system with many queues
and queue managers. This is similar to a recent requirement that was
raised (33160), you might like to add your views to that.

Regarding the second part, working out who has the alias open on the
source queue manager, this should be achievable through the use of RUNMQSC
on QMB with "DISPLAY CONN(*) TYPE(HANDLE) WHERE(OBJNAME EQ 'alias_name')",
then take the returned CONN values and re-drive "DISPLAY CONN(conn_value)"
to get more information on the application.

Thanks
David



From: "David Awerbuch (BLOOMBERG/ 731 LEXIN)" <dawerbuch-AlFclGv/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org,
Date: 10/07/2013 14:21
Subject: Which application has a clustered qalias open
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>



Hi everyone,

It's a beautiful day here in New York City. The sun is shining, the birds
are singing, trucks and geese are a-honking ... but I wander.

Let's open the mail box and pick a user's letter at random. Oh, here's a
good one, submitted by RG in London:

"I have a cluster-exposed QAlias on Qmgr QMA, which resolves to a local
QRemote on QMA.

Question: Using WMQ resources and Linux commands, how can I determine
which WMQ Client application instance has MQOPENed this particular QAlias
for output on a different queue manager on the cluster, and through which
queue manager?

I was eventually able to determine the source Qmgr independently (QMB).
The SYSTEM.CLUSTER.TRANSMIT.QUEUE on QMB is opened by about 200 instances
of 4 different applications; how can I tell which one of these is opening
the particular QAlias?"

Hmmm ... that's 2 good questions. Anyone want to field this one?

Thanks,
Dave



<< Seriously? I don't understand why you don't understand what I don't
understand!! >>






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
David Awerbuch (BLOOMBERG/ 731 LEXIN)
2013-07-10 15:50:54 UTC
Permalink
Hi David (am I talking to myself here?),

Thanks for the response. The user remains stymied by the inability to determine which queue manager is hosting the client application that is opening the queue alias; he needs to know that information in order to execute the DIS CONN(*) command you provided - that is the key to working the issue.

Can anyone else provide more information?

Thanks,
David


----- Original Message -----
From: ***@uk.ibm.com
To: David Awerbuch (BLOOMBERG/ 731 LEXIN)
Cc: ***@listserv.meduniwien.ac.at
At: Jul 10 2013 11:26:31

Hi David,

For the first stage of this, finding which queue managers in a cluster are currently using a clustered queue, there is no easy way unfortunately. You could look at the running cluster receiver channels on the host queue manager but that's obviously not very useful in a system with many queues and queue managers. This is similar to a recent requirement that was raised (33160), you might like to add your views to that.

Regarding the second part, working out who has the alias open on the source queue manager, this should be achievable through the use of RUNMQSC on QMB with "DISPLAY CONN(*) TYPE(HANDLE) WHERE(OBJNAME EQ 'alias_name')", then take the returned CONN values and re-drive "DISPLAY CONN(conn_value)" to get more information on the application.

Thanks
David



From: "David Awerbuch (BLOOMBERG/ 731 LEXIN)" <***@bloomberg.net>
To: ***@listserv.meduniwien.ac.at,
Date: 10/07/2013 14:21
Subject: Which application has a clustered qalias open
Sent by: MQSeries List <***@listserv.meduniwien.ac.at>


Hi everyone,

It's a beautiful day here in New York City. The sun is shining, the birds are singing, trucks and geese are a-honking ... but I wander.

Let's open the mail box and pick a user's letter at random. Oh, here's a good one, submitted by RG in London:

"I have a cluster-exposed QAlias on Qmgr QMA, which resolves to a local QRemote on QMA.

Question: Using WMQ resources and Linux commands, how can I determine which WMQ Client application instance has MQOPENed this particular QAlias for output on a different queue manager on the cluster, and through which queue manager?

I was eventually able to determine the source Qmgr independently (QMB). The SYSTEM.CLUSTER.TRANSMIT.QUEUE on QMB is opened by about 200 instances of 4 different applications; how can I tell which one of these is opening the particular QAlias?"

Hmmm ... that's 2 good questions. Anyone want to field this one?

Thanks,
Dave


<< Seriously? I don't understand why you don't understand what I don't understand!! >>






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU







<< Seriously? I don't understand why you don't understand what I don't understand!! >>
Tim Zielke
2013-07-12 02:49:04 UTC
Permalink
Hi David,

lsof may be of some help here.

On QMA, if you run the DIS QSTATUS TYPE(HANDLE) command on the queue that is opened, you can see the pid of the channel process that has the queue open. Let's say for argument sake it is 12345.

If you do an lsof -p 12345 on QMA (it sounded like QMA was running on linux), you can see what established TCP connections (presuming you are using TCP) that pid has opened. If there are not too many, that can tie you back to the server for the other queue manager. Here is an abbreviated lsof example on one of our Linux sandbox servers:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
amqrmppa 24195 mqm 5u IPv6 39643528 0t0 TCP server1.hewitt.com:ibm-mqseries->server2.hewitt.com:42923 (ESTABLISHED)

Unfortunately, MQ is not using the LWP or light-weight process id for the TID in the DIS QSTATUS TYPE(HANDLE). If it was, you could use a combination of strace and the DIS QSTATUS TYPE(HANDLE) to more than likely get the server on the other end of the connection. IBM probably has their reasons for their internal TID number they are displaying in that command, but it would be helpful if they would also list the LWP id for a DIS QSTATUS TYPE(HANDLE) in Linux. The Linux kernel views a thread like a process, and even uses the same id bucket to hand out ids to processes or threads (which Linux calls a light-weight process or LWP).

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of David Awerbuch (BLOOMBERG/ 731 LEXIN)
Sent: Wednesday, July 10, 2013 10:51 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Which application has a clustered qalias open

Hi David (am I talking to myself here?),

Thanks for the response. The user remains stymied by the inability to determine which queue manager is hosting the client application that is opening the queue alias; he needs to know that information in order to execute the DIS CONN(*) command you provided - that is the key to working the issue.

Can anyone else provide more information?

Thanks,
David


----- Original Message -----
From: ***@uk.ibm.com<mailto:***@uk.ibm.com>
To: David Awerbuch (BLOOMBERG/ 731 LEXIN)<mailto:***@bloomberg.net>
Cc: ***@listserv.meduniwien.ac.at<mailto:***@listserv.meduniwien.ac.at>
At: Jul 10 2013 11:26:31
Hi David,

For the first stage of this, finding which queue managers in a cluster are currently using a clustered queue, there is no easy way unfortunately. You could look at the running cluster receiver channels on the host queue manager but that's obviously not very useful in a system with many queues and queue managers. This is similar to a recent requirement that was raised (33160<http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=33160>), you might like to add your views to that.

Regarding the second part, working out who has the alias open on the source queue manager, this should be achievable through the use of RUNMQSC on QMB with "DISPLAY CONN(*) TYPE(HANDLE) WHERE(OBJNAME EQ 'alias_name')", then take the returned CONN values and re-drive "DISPLAY CONN(conn_value)" to get more information on the application.

Thanks
David



From: "David Awerbuch (BLOOMBERG/ 731 LEXIN)" <***@bloomberg.net>
To: ***@listserv.meduniwien.ac.at,
Date: 10/07/2013 14:21
Subject: Which application has a clustered qalias open
Sent by: MQSeries List <***@listserv.meduniwien.ac.at>
________________________________



Hi everyone,

It's a beautiful day here in New York City. The sun is shining, the birds are singing, trucks and geese are a-honking ... but I wander.

Let's open the mail box and pick a user's letter at random. Oh, here's a good one, submitted by RG in London:

"I have a cluster-exposed QAlias on Qmgr QMA, which resolves to a local QRemote on QMA.

Question: Using WMQ resources and Linux commands, how can I determine which WMQ Client application instance has MQOPENed this particular QAlias for output on a different queue manager on the cluster, and through which queue manager?

I was eventually able to determine the source Qmgr independently (QMB). The SYSTEM.CLUSTER.TRANSMIT.QUEUE on QMB is opened by about 200 instances of 4 different applications; how can I tell which one of these is opening the particular QAlias?"

Hmmm ... that's 2 good questions. Anyone want to field this one?

Thanks,
Dave



<< Seriously? I don't understand why you don't understand what I don't understand!! >>


________________________________


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






<< Seriously? I don't understand why you don't understand what I don't understand!! >>
Tim Zielke
2013-07-12 15:15:07 UTC
Permalink
Another option is to use the undocumented amqrdbgm (program that looks at the channel cache information).

As long as that client app on QMB is putting often to your clustered alias queue on QMA, you can check the channel queue cache on QMA with amqrdbgm (followed by a q command) and find the channel pid/tid that is referencing your queue. Once you have the channel pid/tid, you can do the i (identify) option and see the RemoteQmgr name that the channel pid/tid is talking to.

Below is an example of a queue manager on server2, where an application is doing a PUT to a clustered qalias TCZ.TEST2.ALIAS which resides on server1, and using amqrdbgm to discover the remote queue manager from server1.

***@server1$ amqrdbgm
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
Selected PID(-1) TID(-1) Options()
q
24195.9 Cache 1 of 200; MaxChain 1 Free 199
Fri Jul 12 10:10:34 2013 User[mqm ]
Qm[SERVER1.MQTEST1 ]
Q[TCZ.TEST2.ALIAS ]
Selected PID(-1) TID(-1) Options()
i
24195.9 Qm[SERVER1.MQTEST1 ] Chl[CLUSTER.2S.SERVER1 ]
RemoteQMgr[SERVER2.MQTEST1 ]
24195.1 Qm[SERVER1.MQTEST1 ] Chl[]
32343.1 Qm[SERVER1.MQTEST1] Chl[]
32345.1 Qm[SERVER1.MQTEST1 ] Chl[]
Selected PID(-1) TID(-1) Options()

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Tim Zielke
Sent: Thursday, July 11, 2013 9:49 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Which application has a clustered qalias open

Hi David,

lsof may be of some help here.

On QMA, if you run the DIS QSTATUS TYPE(HANDLE) command on the queue that is opened, you can see the pid of the channel process that has the queue open. Let's say for argument sake it is 12345.

If you do an lsof -p 12345 on QMA (it sounded like QMA was running on linux), you can see what established TCP connections (presuming you are using TCP) that pid has opened. If there are not too many, that can tie you back to the server for the other queue manager. Here is an abbreviated lsof example on one of our Linux sandbox servers:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
amqrmppa 24195 mqm 5u IPv6 39643528 0t0 TCP server1.hewitt.com:ibm-mqseries->server2.hewitt.com:42923 (ESTABLISHED)

Unfortunately, MQ is not using the LWP or light-weight process id for the TID in the DIS QSTATUS TYPE(HANDLE). If it was, you could use a combination of strace and the DIS QSTATUS TYPE(HANDLE) to more than likely get the server on the other end of the connection. IBM probably has their reasons for their internal TID number they are displaying in that command, but it would be helpful if they would also list the LWP id for a DIS QSTATUS TYPE(HANDLE) in Linux. The Linux kernel views a thread like a process, and even uses the same id bucket to hand out ids to processes or threads (which Linux calls a light-weight process or LWP).

Thanks,
Tim

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of David Awerbuch (BLOOMBERG/ 731 LEXIN)
Sent: Wednesday, July 10, 2013 10:51 AM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Which application has a clustered qalias open

Hi David (am I talking to myself here?),

Thanks for the response. The user remains stymied by the inability to determine which queue manager is hosting the client application that is opening the queue alias; he needs to know that information in order to execute the DIS CONN(*) command you provided - that is the key to working the issue.

Can anyone else provide more information?

Thanks,
David

----- Original Message -----
From: ***@uk.ibm.com<mailto:***@uk.ibm.com>
To: David Awerbuch (BLOOMBERG/ 731 LEXIN)<mailto:***@bloomberg.net>
Cc: ***@listserv.meduniwien.ac.at<mailto:***@listserv.meduniwien.ac.at>
At: Jul 10 2013 11:26:31
Hi David,

For the first stage of this, finding which queue managers in a cluster are currently using a clustered queue, there is no easy way unfortunately. You could look at the running cluster receiver channels on the host queue manager but that's obviously not very useful in a system with many queues and queue managers. This is similar to a recent requirement that was raised (33160<http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=33160>), you might like to add your views to that.

Regarding the second part, working out who has the alias open on the source queue manager, this should be achievable through the use of RUNMQSC on QMB with "DISPLAY CONN(*) TYPE(HANDLE) WHERE(OBJNAME EQ 'alias_name')", then take the returned CONN values and re-drive "DISPLAY CONN(conn_value)" to get more information on the application.

Thanks
David



From: "David Awerbuch (BLOOMBERG/ 731 LEXIN)" <***@bloomberg.net>
To: ***@listserv.meduniwien.ac.at,
Date: 10/07/2013 14:21
Subject: Which application has a clustered qalias open
Sent by: MQSeries List <***@listserv.meduniwien.ac.at>
________________________________



Hi everyone,

It's a beautiful day here in New York City. The sun is shining, the birds are singing, trucks and geese are a-honking ... but I wander.

Let's open the mail box and pick a user's letter at random. Oh, here's a good one, submitted by RG in London:

"I have a cluster-exposed QAlias on Qmgr QMA, which resolves to a local QRemote on QMA.

Question: Using WMQ resources and Linux commands, how can I determine which WMQ Client application instance has MQOPENed this particular QAlias for output on a different queue manager on the cluster, and through which queue manager?

I was eventually able to determine the source Qmgr independently (QMB). The SYSTEM.CLUSTER.TRANSMIT.QUEUE on QMB is opened by about 200 instances of 4 different applications; how can I tell which one of these is opening the particular QAlias?"

Hmmm ... that's 2 good questions. Anyone want to field this one?

Thanks,
Dave



<< Seriously? I don't understand why you don't understand what I don't understand!! >>

________________________________


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





<< Seriously? I don't understand why you don't understand what I don't understand!! >>
Loading...