Should ps -p list threads?
Daniel Eischen
eischen at vigrid.com
Wed Feb 11 20:17:44 PST 2004
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).
--
Dan Eischen
More information about the freebsd-threads
mailing list