Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2004 14:16:36 -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.10402121408350.5277-100000@pcnet5.pcnet.com>
In-Reply-To: <20040212171101.GA72641@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Feb 2004, Craig Rodrigues wrote:

> On Thu, Feb 12, 2004 at 11:16:57AM -0500, Daniel Eischen wrote:
> > But 'ps' without -H seems to display KSEs where it shouldn't.
> 
> I looked in the source code of ps,
> specifically in src/bin/ps/ps.c

[ ... ]
> 
> So, I am not sure if this is a bug in kvm_getprocs() or in ps.c,
> but the result is that if you type ps or ps -H, they
> both display KSEs.  Probably just typing ps should not display
> them.
> 
> Any idea what the problem is?

We currently lack a sysctl interface to get finer-grained
process info.  I think KERN_PROC_THREADS (or whatever) should
be added as a flag to the sysctl, so that you can 'or' it
in to 'op' of kvm_getprocs().  You would need some kernel
changes to support it too.  I can look at it when I get
a chance.

-- 
Dan Eischen



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