From owner-freebsd-threads@FreeBSD.ORG Thu Feb 12 11:16:45 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F68316A51F; Thu, 12 Feb 2004 11:16:45 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C86743D39; Thu, 12 Feb 2004 11:16:45 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i1CJGafo007758; Thu, 12 Feb 2004 14:16:36 -0500 (EST) Date: Thu, 12 Feb 2004 14:16:36 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Craig Rodrigues In-Reply-To: <20040212171101.GA72641@crodrigues.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: scottl@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: Should ps -p list threads? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2004 19:16:45 -0000 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