Should ps -p list threads?

Craig Rodrigues rodrigc at crodrigues.org
Wed Feb 11 20:05:24 PST 2004


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?

-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc at crodrigues.org


More information about the freebsd-threads mailing list