Should ps -p list threads?
David Xu
davidxu at freebsd.org
Wed Feb 11 20:40:18 PST 2004
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
More information about the freebsd-threads
mailing list