Discussion:
Any way to tie MQ thread id to the OS thread id?
Tim Zielke
2013-08-07 13:56:30 UTC
Permalink
Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded application that has many threads connected to the queue manager, be able to see the native or operating system TID or thread id that is connected for the process. This would be helpful when you want to see what threads are connected, and then look at other process information (i.e. CPU time) for each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to be some type of internal sequential number that the queue manager is using that is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between 29773 - 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00 java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00 java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e. amqrdbgm) that would already do this? I am thinking at least the WebSphere MQ Development team might have a need to do something like this (tie the MQ internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this kind of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon

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
Andrew Hickson
2013-08-08 13:13:24 UTC
Permalink
I don't believe there is any consumable way to currently request this
information from the queue manager.

It would be unusual ( and not recommended) for a user application to be
using fastpath bindings, and when any other binding most of the MQ work is
handled on a thread in a queue manager process (and hence the application
thread CPU utilization is of dubious value). Similarly, in the case of a
shared hConn the hConn can be used on multiple threads, and in the case of
a client connection there's an even bigger disjoint between what happens
in the application process, and what happens in the queue manager
processes on the server.



From: Tim Zielke <tim.zielke-PR+tvw7B/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 07/08/2013 14:56
Subject: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>



Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find
it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded
application that has many threads connected to the queue manager, be able
to see the native or operating system TID or thread id that is connected
for the process. This would be helpful when you want to see what threads
are connected, and then look at other process information (i.e. CPU time)
for each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to
be some type of internal sequential number that the queue manager is using
that is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between
29773 - 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00
java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00
java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e.
amqrdbgm) that would already do this? I am thinking at least the
WebSphere MQ Development team might have a need to do something like this
(tie the MQ internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this
kind of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon


List Archive - Manage Your List Settings - Unsubscribe
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com

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
Tim Zielke
2013-08-08 13:46:53 UTC
Permalink
Hi Andy,

Thanks for the information. To clarify, what I was really looking for was just a way to know which specific threads (i.e. the native thread ids) of a multi-threaded application have connected to the distributed queue manager (for Linux and Solaris). It sounds like this ability does not exist.

Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Andrew Hickson
Sent: Thursday, August 08, 2013 8:13 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

I don't believe there is any consumable way to currently request this information from the queue manager.

It would be unusual ( and not recommended) for a user application to be using fastpath bindings, and when any other binding most of the MQ work is handled on a thread in a queue manager process (and hence the application thread CPU utilization is of dubious value). Similarly, in the case of a shared hConn the hConn can be used on multiple threads, and in the case of a client connection there's an even bigger disjoint between what happens in the application process, and what happens in the queue manager processes on the server.



From: Tim Zielke <tim.zielke-PR+tvw7B/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 07/08/2013 14:56
Subject: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>
________________________________



Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded application that has many threads connected to the queue manager, be able to see the native or operating system TID or thread id that is connected for the process. This would be helpful when you want to see what threads are connected, and then look at other process information (i.e. CPU time) for each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to be some type of internal sequential number that the queue manager is using that is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between 29773 - 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00 java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00 java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e. amqrdbgm) that would already do this? I am thinking at least the WebSphere MQ Development team might have a need to do something like this (tie the MQ internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this kind of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon



________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>


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
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

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
T.Rob
2013-08-08 13:56:22 UTC
Permalink
Couldn't you go backwards from netstat to see which threads have a socket
open to the IP address and port of the target QMgr? For bindings mode, is
there a way to figure that out by looking at who is holding shared memory
and semaphores?





From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of
Tim Zielke
Sent: Thursday, August 08, 2013 9:47 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?



Hi Andy,



Thanks for the information. To clarify, what I was really looking for was
just a way to know which specific threads (i.e. the native thread ids) of a
multi-threaded application have connected to the distributed queue manager
(for Linux and Solaris). It sounds like this ability does not exist.



Thanks,

Tim



From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of
Andrew Hickson
Sent: Thursday, August 08, 2013 8:13 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?



I don't believe there is any consumable way to currently request this
information from the queue manager.

It would be unusual ( and not recommended) for a user application to be
using fastpath bindings, and when any other binding most of the MQ work is
handled on a thread in a queue manager process (and hence the application
thread CPU utilization is of dubious value). Similarly, in the case of a
shared hConn the hConn can be used on multiple threads, and in the case of a
client connection there's an even bigger disjoint between what happens in
the application process, and what happens in the queue manager processes on
the server.



From: Tim Zielke <tim.zielke-PR+tvw7B/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 07/08/2013 14:56
Subject: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>

_____




Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find
it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded
application that has many threads connected to the queue manager, be able to
see the native or operating system TID or thread id that is connected for
the process. This would be helpful when you want to see what threads are
connected, and then look at other process information (i.e. CPU time) for
each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to be
some type of internal sequential number that the queue manager is using that
is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between 29773
- 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00
java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00
java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e.
amqrdbgm) that would already do this? I am thinking at least the WebSphere
MQ Development team might have a need to do something like this (tie the MQ
internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this kind
of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon



_____


<http://listserv.meduniwien.ac.at/archives/mqser-l.html> List Archive -
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> Manage Your
List Settings -
<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%
20mqseries> Unsubscribe

Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at
<http://www.lsoft.com/resources/manuals.asp> http://www.lsoft.com



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

_____

List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> -
Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%
20mqseries>

Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>



_____

List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> -
Manage Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%
20mqseries>

Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>


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
Andrew Hickson
2013-08-08 14:38:27 UTC
Permalink
Neither a socket file handle, nor attached shared memory is thread
specific.
A thread is logically bound to a non-shared hConn within MQ, but the OS
doesn't understand this binding.

One option you might consider requesting (RFE) is to be allowed to provide
some sort of string identifier to MQCONN which would then be reflected in
the DIS CONN output. This might have wider applicability than extending
DIS CONN to better identify the OS thread for a thread specific
connection.



From: "T.Rob" <t.rob-CkT6zf+urXSzW/GOMZKyElesiRL1/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 08/08/2013 14:56
Subject: Re: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>



Couldn't you go backwards from netstat to see which threads have a socket
open to the IP address and port of the target QMgr? For bindings mode, is
there a way to figure that out by looking at who is holding shared memory
and semaphores?


From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf
Of Tim Zielke
Sent: Thursday, August 08, 2013 9:47 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

Hi Andy,

Thanks for the information. To clarify, what I was really looking for was
just a way to know which specific threads (i.e. the native thread ids) of
a multi-threaded application have connected to the distributed queue
manager (for Linux and Solaris). It sounds like this ability does not
exist.

Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf
Of Andrew Hickson
Sent: Thursday, August 08, 2013 8:13 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

I don't believe there is any consumable way to currently request this
information from the queue manager.

It would be unusual ( and not recommended) for a user application to be
using fastpath bindings, and when any other binding most of the MQ work is
handled on a thread in a queue manager process (and hence the application
thread CPU utilization is of dubious value). Similarly, in the case of a
shared hConn the hConn can be used on multiple threads, and in the case of
a client connection there's an even bigger disjoint between what happens
in the application process, and what happens in the queue manager
processes on the server.



From: Tim Zielke <tim.zielke-PR+tvw7B/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 07/08/2013 14:56
Subject: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>




Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find
it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded
application that has many threads connected to the queue manager, be able
to see the native or operating system TID or thread id that is connected
for the process. This would be helpful when you want to see what threads
are connected, and then look at other process information (i.e. CPU time)
for each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to
be some type of internal sequential number that the queue manager is using
that is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between
29773 - 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00
java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00
java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e.
amqrdbgm) that would already do this? I am thinking at least the
WebSphere MQ Development team might have a need to do something like this
(tie the MQ internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this
kind of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon



List Archive - Manage Your List Settings - Unsubscribe
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com


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

List Archive - Manage Your List Settings - Unsubscribe
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com


List Archive - Manage Your List Settings - Unsubscribe
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com


List Archive - Manage Your List Settings - Unsubscribe
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com

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
Tim Zielke
2013-08-08 15:03:30 UTC
Permalink
For clarity, it would be helpful if the DIS CONN TID documentation would say that the TID is a number internal to the queue manager and not the "real" thread id. When I read the TID documentation, I would take it to mean the TID would be the "real" thread id at face value. In Linux, it is obvious that this is not the case since processes and light-weight processes are assigned ids out of the same bucket and the LWP id is nowhere near what DIS CONN is showing. However, in Solaris the OS tracks the native thread id as a sequential number starting from 1 (similar to what the queue manager is doing). So it would be easy for someone to mistakenly think the DIS CONN TID was the actual thread id in Solaris.

TID
Number specifying the thread identifier within the application process that has opened the specified queue.
This parameter is not valid on z/OS.
Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Andrew Hickson
Sent: Thursday, August 08, 2013 9:38 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

Neither a socket file handle, nor attached shared memory is thread specific.
A thread is logically bound to a non-shared hConn within MQ, but the OS doesn't understand this binding.

One option you might consider requesting (RFE) is to be allowed to provide some sort of string identifier to MQCONN which would then be reflected in the DIS CONN output. This might have wider applicability than extending DIS CONN to better identify the OS thread for a thread specific connection.



From: "T.Rob" <t.rob-CkT6zf+urXSzW/GOMZKyElesiRL1/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 08/08/2013 14:56
Subject: Re: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>
________________________________



Couldn't you go backwards from netstat to see which threads have a socket open to the IP address and port of the target QMgr? For bindings mode, is there a way to figure that out by looking at who is holding shared memory and semaphores?


From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Tim Zielke
Sent: Thursday, August 08, 2013 9:47 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

Hi Andy,

Thanks for the information. To clarify, what I was really looking for was just a way to know which specific threads (i.e. the native thread ids) of a multi-threaded application have connected to the distributed queue manager (for Linux and Solaris). It sounds like this ability does not exist.

Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Andrew Hickson
Sent: Thursday, August 08, 2013 8:13 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org<mailto:MQSERIES-0lvw86wZMd9k/***@public.gmane.orgAC.AT>
Subject: Re: Any way to tie MQ thread id to the OS thread id?

I don't believe there is any consumable way to currently request this information from the queue manager.

It would be unusual ( and not recommended) for a user application to be using fastpath bindings, and when any other binding most of the MQ work is handled on a thread in a queue manager process (and hence the application thread CPU utilization is of dubious value). Similarly, in the case of a shared hConn the hConn can be used on multiple threads, and in the case of a client connection there's an even bigger disjoint between what happens in the application process, and what happens in the queue manager processes on the server.



From: Tim Zielke <tim.zielke-PR+tvw7B/***@public.gmane.org<mailto:tim.zielke-PR+tvw7B/***@public.gmane.org>>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org<mailto:MQSERIES-JX7+OpRa80Ties2YCUG/***@public.gmane.orgniwien.ac.at>
Date: 07/08/2013 14:56
Subject: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org<mailto:MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>>

________________________________




Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded application that has many threads connected to the queue manager, be able to see the native or operating system TID or thread id that is connected for the process. This would be helpful when you want to see what threads are connected, and then look at other process information (i.e. CPU time) for each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to be some type of internal sequential number that the queue manager is using that is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between 29773 - 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00 java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00 java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e. amqrdbgm) that would already do this? I am thinking at least the WebSphere MQ Development team might have a need to do something like this (tie the MQ internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this kind of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon



________________________________


List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>



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

________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>



________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>



________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>


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
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

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
Roger Lacroix
2013-08-08 16:37:51 UTC
Permalink
Hi,

Actually, I discovered that this information is available via API
Exit. When I was writing MQ Auditor, I discovered that when the API
Exit is invoked both the PID and TID are available for the connecting
application. So, if you want to write and use an API Exit, then you
can get that information (or you could use MQ Auditor).

Regards,
Roger Lacroix
Capitalware Inc.

At 11:03 AM 8/08/13, you wrote:
>For clarity, it would be helpful if the DIS CONN TID documentation
>would say that the TID is a number internal to the queue manager and
>not the "real" thread id. When I read the TID documentation, I
>would take it to mean the TID would be the "real" thread id at face
>value. In Linux, it is obvious that this is not the case since
>processes and light-weight processes are assigned ids out of the
>same bucket and the LWP id is nowhere near what DIS CONN is
>showing. However, in Solaris the OS tracks the native thread id as
>a sequential number starting from 1 (similar to what the queue
>manager is doing). So it would be easy for someone to mistakenly
>think the DIS CONN TID was the actual thread id in Solaris.
>
>TID
>Number specifying the thread identifier within the application
>process that has opened the specified queue.
>This parameter is not valid on z/OS.
>Thanks,
>Tim
>
>From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On
>Behalf Of Andrew Hickson
>Sent: Thursday, August 08, 2013 9:38 AM
>To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
>Subject: Re: Any way to tie MQ thread id to the OS thread id?
>
>Neither a socket file handle, nor attached shared memory is thread specific.
>A thread is logically bound to a non-shared hConn within MQ, but the
>OS doesn't understand this binding.
>
>One option you might consider requesting (RFE) is to be allowed to
>provide some sort of string identifier to MQCONN which would then be
>reflected in the DIS CONN output. This might have wider
>applicability than extending DIS CONN to better identify the OS
>thread for a thread specific connection.
>
>
>
>From: "T.Rob" <t.rob-CkT6zf+urXSzW/GOMZKyElesiRL1/***@public.gmane.org>
>To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
>Date: 08/08/2013 14:56
>Subject: Re: Any way to tie MQ thread id to the OS thread id?
>Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>
>
>
>
>
>Couldn't you go backwards from netstat to see which threads have a
>socket open to the IP address and port of the target QMgr? For
>bindings mode, is there a way to figure that out by looking at who
>is holding shared memory and semaphores?
>
>
>From: MQSeries List
>[<mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org>mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org]
>On Behalf Of Tim Zielke
>Sent: Thursday, August 08, 2013 9:47 AM
>To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
>Subject: Re: Any way to tie MQ thread id to the OS thread id?
>
>Hi Andy,
>
>Thanks for the information. To clarify, what I was really looking
>for was just a way to know which specific threads (i.e. the native
>thread ids) of a multi-threaded application have connected to the
>distributed queue manager (for Linux and Solaris). It sounds like
>this ability does not exist.
>
>Thanks,
>Tim
>
>From: MQSeries List
>[<mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org>mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org]
>On Behalf Of Andrew Hickson
>Sent: Thursday, August 08, 2013 8:13 AM
>To:
><mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org>MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
>Subject: Re: Any way to tie MQ thread id to the OS thread id?
>
>I don't believe there is any consumable way to currently request
>this information from the queue manager.
>
>It would be unusual ( and not recommended) for a user application to
>be using fastpath bindings, and when any other binding most of the
>MQ work is handled on a thread in a queue manager process (and hence
>the application thread CPU utilization is of dubious value).
>Similarly, in the case of a shared hConn the hConn can be used on
>multiple threads, and in the case of a client connection there's an
>even bigger disjoint between what happens in the application
>process, and what happens in the queue manager processes on the server.
>
>
>
>From: Tim Zielke <<mailto:tim.zielke-PR+tvw7B/***@public.gmane.org>tim.zielke-PR+tvw7B/***@public.gmane.org>
>To:
><mailto:MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
>Date: 07/08/2013 14:56
>Subject: Any way to tie MQ thread id to the OS thread id?
>Sent by: MQSeries List
><<mailto:MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>
>
>
>
>
>
>
>
>Hello,
>
>On distributed MQ (specifically Linux x86 and Solaris SPARC), I
>would find it helpful to be able to do a "DIS CONN(*) ALL" and for a
>multi-threaded application that has many threads connected to the
>queue manager, be able to see the native or operating system TID or
>thread id that is connected for the process. This would be helpful
>when you want to see what threads are connected, and then look at
>other process information (i.e. CPU time) for each thread with a "ps
>-eLf" command.
>
>When I do a "DIS CONN(*) ALL", the TID that is being displayed
>appears to be some type of internal sequential number that the queue
>manager is using that is different than the native thread id for the process.
>
>For example, I see this on Linux x86:
>
>AMQ8276: Display Connection details.
> CONN(B89BF75101A30020)
> EXTCONN(414D51434C524745444130312E4D5154)
> TYPE(CONN)
> PID(29773) TID(2)
> APPLDESC( ) APPLTAG(java)
>
>when the light weight process ids (i.e. threads) for 29773 are
>between 29773 - 29883:
>
>***@lrgeda01$ ps -eLF | grep 29773
>UID PID PPID LWP C NLWP STIME TTY TIME CMD
>app1 29773 1 29773 0 21 215207 66460 0 08:27
>pts/1 00:00:00 java
>.
>.
>app1 29773 1 29883 0 21 215207 66460 1 08:39
>pts/1 00:00:00 java
>
>
>I had a few questions regarding this.
>
>1. Is anyone aware of any documented or undocumented commands (i.e.
>amqrdbgm) that would already do this? I am thinking at least the
>WebSphere MQ Development team might have a need to do something like
>this (tie the MQ internal tid number to the OS tid number).
>
>2. If the answer to #1 is no, would anyone else be interested in
>this kind of information? I will raise an RFE if there is some interest.
>
>Thanks,
>Tim Zielke
>CICS/MQ Systems Programmer
>Aon
>
>
>
>
>----------
>
>
><http://listserv.meduniwien.ac.at/archives/mqser-l.html>List Archive
>-
><http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1>Manage
>Your List Settings -
><mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>Unsubscribe
>
>
>Instructions for managing your mailing list subscription are
>provided in the Listserv General Users Guide available at
><http://www.lsoft.com/resources/manuals.asp>http://www.lsoft.com
>
>
>
>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
>
>
>----------
>
><http://listserv.meduniwien.ac.at/archives/mqser-l.html>List Archive
>-
><http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1>Manage
>Your List Settings -
><mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>Unsubscribe
>
>
>Instructions for managing your mailing list subscription are
>provided in the Listserv General Users Guide available at
><http://www.lsoft.com/resources/manuals.asp>http://www.lsoft.com
>
>
>
>
>----------
>
><http://listserv.meduniwien.ac.at/archives/mqser-l.html>List Archive
>-
><http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1>Manage
>Your List Settings -
><mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>Unsubscribe
>
>
>Instructions for managing your mailing list subscription are
>provided in the Listserv General Users Guide available at
><http://www.lsoft.com/resources/manuals.asp>http://www.lsoft.com
>
>
>
>----------
>
><http://listserv.meduniwien.ac.at/archives/mqser-l.html>List Archive
>-
><http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1>Manage
>Your List Settings -
><mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>Unsubscribe
>
>
>Instructions for managing your mailing list subscription are
>provided in the Listserv General Users Guide available at
><http://www.lsoft.com/resources/manuals.asp>http://www.lsoft.com
>
>
>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
>
>----------
><http://listserv.meduniwien.ac.at/archives/mqser-l.html>List Archive
>-
><http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1>Manage
>Your List Settings -
><mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>Unsubscribe
>
>
>Instructions for managing your mailing list subscription are
>provided in the Listserv General Users Guide available at
><http://www.lsoft.com/resources/manuals.asp>http://www.lsoft.com
>
>
>----------
><http://listserv.meduniwien.ac.at/archives/mqser-l.html>List Archive
>-
><http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1>Manage
>Your List Settings -
><mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>Unsubscribe
>
>
>Instructions for managing your mailing list subscription are
>provided in the Listserv General Users Guide available at
><http://www.lsoft.com/resources/manuals.asp>http://www.lsoft.com

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
Tim Zielke
2013-08-08 22:23:48 UTC
Permalink
"Neither a socket file handle, nor attached shared memory is thread specific."

Regarding the socket file or files in general with threads in Linux (this probably also applies to UNIX), I thought I would share some details on why they are not specific to the thread. I found this helpful in understanding how this works, so maybe others will, as well.

When threads are created in Linux, they usually specify CLONE_FILES. What this means is that the data structure (called files_struct) that tracks the open files for a thread is shared between the main process and the threads. So when one thread opens a file, it is visible to all the other threads and the main process since they are all pointing to the same FILES or files_struct data structure. So bottom line is that there is no separation in open files between a thread of a given process, since they are all sharing the same files_struct which tracks the open files.

Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Andrew Hickson
Sent: Thursday, August 08, 2013 9:38 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

Neither a socket file handle, nor attached shared memory is thread specific.
A thread is logically bound to a non-shared hConn within MQ, but the OS doesn't understand this binding.

One option you might consider requesting (RFE) is to be allowed to provide some sort of string identifier to MQCONN which would then be reflected in the DIS CONN output. This might have wider applicability than extending DIS CONN to better identify the OS thread for a thread specific connection.



From: "T.Rob" <t.rob-CkT6zf+urXSzW/GOMZKyElesiRL1/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 08/08/2013 14:56
Subject: Re: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>
________________________________



Couldn't you go backwards from netstat to see which threads have a socket open to the IP address and port of the target QMgr? For bindings mode, is there a way to figure that out by looking at who is holding shared memory and semaphores?


From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Tim Zielke
Sent: Thursday, August 08, 2013 9:47 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

Hi Andy,

Thanks for the information. To clarify, what I was really looking for was just a way to know which specific threads (i.e. the native thread ids) of a multi-threaded application have connected to the distributed queue manager (for Linux and Solaris). It sounds like this ability does not exist.

Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Andrew Hickson
Sent: Thursday, August 08, 2013 8:13 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org<mailto:MQSERIES-0lvw86wZMd9k/***@public.gmane.orgAC.AT>
Subject: Re: Any way to tie MQ thread id to the OS thread id?

I don't believe there is any consumable way to currently request this information from the queue manager.

It would be unusual ( and not recommended) for a user application to be using fastpath bindings, and when any other binding most of the MQ work is handled on a thread in a queue manager process (and hence the application thread CPU utilization is of dubious value). Similarly, in the case of a shared hConn the hConn can be used on multiple threads, and in the case of a client connection there's an even bigger disjoint between what happens in the application process, and what happens in the queue manager processes on the server.



From: Tim Zielke <tim.zielke-PR+tvw7B/***@public.gmane.org<mailto:tim.zielke-PR+tvw7B/***@public.gmane.org>>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org<mailto:MQSERIES-JX7+OpRa80Ties2YCUG/***@public.gmane.orgniwien.ac.at>
Date: 07/08/2013 14:56
Subject: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org<mailto:MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>>

________________________________




Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded application that has many threads connected to the queue manager, be able to see the native or operating system TID or thread id that is connected for the process. This would be helpful when you want to see what threads are connected, and then look at other process information (i.e. CPU time) for each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to be some type of internal sequential number that the queue manager is using that is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between 29773 - 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00 java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00 java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e. amqrdbgm) that would already do this? I am thinking at least the WebSphere MQ Development team might have a need to do something like this (tie the MQ internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this kind of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon



________________________________


List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>



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

________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>



________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>



________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>


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
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

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
Tim Zielke
2013-08-29 13:44:47 UTC
Permalink
I have recently had two instances working with java developers where this information would have been helpful for diagnostic purposes. I have created an RFE for this enhancement below. Basically, I would like to see the native thread id in the DIS CONN on distributed MQ.


RFE - http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=38593


To vote, locate the "RFE Actions" section on the right hand side of the screen and click the vote link. You can only vote once, so we need everyone to vote to get IBM's attention.



Tim Zielke

CICS/MQ Systems Programmer

Aon


From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Andrew Hickson
Sent: Thursday, August 08, 2013 8:13 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Any way to tie MQ thread id to the OS thread id?

I don't believe there is any consumable way to currently request this information from the queue manager.

It would be unusual ( and not recommended) for a user application to be using fastpath bindings, and when any other binding most of the MQ work is handled on a thread in a queue manager process (and hence the application thread CPU utilization is of dubious value). Similarly, in the case of a shared hConn the hConn can be used on multiple threads, and in the case of a client connection there's an even bigger disjoint between what happens in the application process, and what happens in the queue manager processes on the server.



From: Tim Zielke <tim.zielke-PR+tvw7B/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 07/08/2013 14:56
Subject: Any way to tie MQ thread id to the OS thread id?
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>
________________________________



Hello,

On distributed MQ (specifically Linux x86 and Solaris SPARC), I would find it helpful to be able to do a "DIS CONN(*) ALL" and for a multi-threaded application that has many threads connected to the queue manager, be able to see the native or operating system TID or thread id that is connected for the process. This would be helpful when you want to see what threads are connected, and then look at other process information (i.e. CPU time) for each thread with a "ps -eLf" command.

When I do a "DIS CONN(*) ALL", the TID that is being displayed appears to be some type of internal sequential number that the queue manager is using that is different than the native thread id for the process.

For example, I see this on Linux x86:

AMQ8276: Display Connection details.
CONN(B89BF75101A30020)
EXTCONN(414D51434C524745444130312E4D5154)
TYPE(CONN)
PID(29773) TID(2)
APPLDESC( ) APPLTAG(java)

when the light weight process ids (i.e. threads) for 29773 are between 29773 - 29883:

***@lrgeda01$ ps -eLF | grep 29773
UID PID PPID LWP C NLWP STIME TTY TIME CMD
app1 29773 1 29773 0 21 215207 66460 0 08:27 pts/1 00:00:00 java
.
.
app1 29773 1 29883 0 21 215207 66460 1 08:39 pts/1 00:00:00 java


I had a few questions regarding this.

1. Is anyone aware of any documented or undocumented commands (i.e. amqrdbgm) that would already do this? I am thinking at least the WebSphere MQ Development team might have a need to do something like this (tie the MQ internal tid number to the OS tid number).

2. If the answer to #1 is no, would anyone else be interested in this kind of information? I will raise an RFE if there is some interest.

Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon



________________________________

List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>


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
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

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
Loading...