Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2004 12:40:23 +0800
From:      David Xu <davidxu@freebsd.org>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Should ps -p list threads?
Message-ID:  <402B03B7.1000104@freebsd.org>
In-Reply-To: <Pine.GSO.4.10.10402112316110.4374-100000@pcnet5.pcnet.com>
References:  <Pine.GSO.4.10.10402112316110.4374-100000@pcnet5.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote:

>On Wed, 11 Feb 2004, Craig Rodrigues wrote:
>
>  
>
>>Hi,
>>
>>top -H can be used to list the different threads
>>for a process.
>>
>>Can something similar be done with ps?
>>
>>If I just type ps, it lists multiple entries
>>for each thread:
>># ps
>>  PID  TT  STAT      TIME COMMAND
>>61213  p6  SL+    0:00.03 ./a.out
>>61213  p6  SL+    0:00.03 ./a.out
>>61213  p6  SL+    0:00.03 ./a.out
>>But if I specify the process ID, only one entry is displayed:
>>
>># ps -p 61213
>>  PID  TT  STAT      TIME COMMAND
>>61213  p6  S+     0:00.03 ./a.out
>>
>>
>>Should there be a way for ps to be able to display
>>threads for a specific pid?
>>    
>>
>
>Yes, I think so, but ps with no options should not list threads
>by default.  It should take an option to _enable_ listing
>threads (KSE's really).
>  
>
I think it is already there, type:
ps -H






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?402B03B7.1000104>