* status of threads in multithreaded programs
@ 1999-08-02 4:00 Kristoff Picard
1999-08-02 4:00 ` Jeff Denham
0 siblings, 1 reply; 2+ messages in thread
From: Kristoff Picard @ 1999-08-02 4:00 UTC (permalink / raw)
Hello world,
I'm looking for an OS command that allows me to determine
the status of all threads of a running process.
I found the "-m" flag of the ps command, however I need
a little bit more information. On SUN Solaris, there
is the "pstack" command, that give me a stack trace
for each thread of a process. Here is an example:
# /usr/proc/bin/pstack 340
340: rpc.ttdbserverd
lwp#1 ----------
ef576858 poll (efffde30, 3, ffffffff)
ef63fcc4 _svc_run (0, ffffe000, ef673dc4, ef67e328, ef67e8d8, 3) + 70
000246f4 main (72678, 72668, 7a2f8, 72670, 72674, 72660) + 694
0001e2a4 _start (0, 0, 0, 0, 0, 0) + 5c
lwp#2 ----------
ef578bbc signotifywait ()
ef6bc8ac _dynamiclwps (0, ef6d5ddc, ef6d5dc4, ef6d587c, 0, 20) + 24
ef6bf1d8 thr_yield (0, 0, 0, 0, 0, 0) + 8c
Any idea?
Thanks in advance
Kristoff
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: status of threads in multithreaded programs
1999-08-02 4:00 status of threads in multithreaded programs Kristoff Picard
@ 1999-08-02 4:00 ` Jeff Denham
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Denham @ 1999-08-02 4:00 UTC (permalink / raw)
Kristoff Picard wrote:
> Hello world,
> I'm looking for an OS command that allows me to determine
> the status of all threads of a running process.
> I found the "-m" flag of the ps command, however I need
> a little bit more information. On SUN Solaris, there
> is the "pstack" command, that give me a stack trace
> for each thread of a process. Here is an example:
>
> # /usr/proc/bin/pstack 340
> 340: rpc.ttdbserverd
> lwp#1 ----------
> ef576858 poll (efffde30, 3, ffffffff)
> ef63fcc4 _svc_run (0, ffffe000, ef673dc4, ef67e328, ef67e8d8, 3) + 70
> 000246f4 main (72678, 72668, 7a2f8, 72670, 72674, 72660) + 694
> 0001e2a4 _start (0, 0, 0, 0, 0, 0) + 5c
> lwp#2 ----------
> ef578bbc signotifywait ()
> ef6bc8ac _dynamiclwps (0, ef6d5ddc, ef6d5dc4, ef6d587c, 0, 20) + 24
> ef6bf1d8 thr_yield (0, 0, 0, 0, 0, 0) + 8c
>
> Any idea?
The only supported why to do this that I know of is to attach with
a debugger and request stack traces on all the threads.
There's nothing similar to pstack (If I'd know about it before
I left Digital, I would have implemented it!!). (You threads
guys implement something I don't know about?)
Be aware, however, that on Solaris that pstack is showing you
only the stack traces of LWPs (kernel threads), not user
threads. (Although, I'm seem to recall a Solaris 7 release note
saying that user threads were now shown as well, but I haven't
verified that.)
-- Jeff
__________________________________________________
Jeff Denham (jdenham@allaire.com)
Allaire Corp: Resource-management software
for building and managing fast, reliable web sites
See us at http://www.allaire.com and http://www.brighttiger.com
125 Nagog Park
Acton, MA 01720
Phone: (978) 263-5455 x177
Fax: (978) 263-5547
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-08-02 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-08-02 4:00 status of threads in multithreaded programs Kristoff Picard
1999-08-02 4:00 ` Jeff Denham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox