Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2004 23:05:33 -0500
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        freebsd-threads@freebsd.org
Subject:   Should ps -p list threads?
Message-ID:  <20040212040533.GA61839@crodrigues.org>

next in thread | raw e-mail | index | archive | help
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@crodrigues.org



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