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