From owner-freebsd-threads@FreeBSD.ORG Wed Feb 11 20:17:44 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 5E48B16A4CE for ; Wed, 11 Feb 2004 20:17:44 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0490B43D1D for ; Wed, 11 Feb 2004 20:17:44 -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 i1C4Hcfo004689; Wed, 11 Feb 2004 23:17:38 -0500 (EST) Date: Wed, 11 Feb 2004 23:17:38 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Craig Rodrigues In-Reply-To: <20040212040533.GA61839@crodrigues.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 04:17:44 -0000 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