Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2004 23:17:38 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Should ps -p list threads?
Message-ID:  <Pine.GSO.4.10.10402112316110.4374-100000@pcnet5.pcnet.com>
In-Reply-To: <20040212040533.GA61839@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10402112316110.4374-100000>