From owner-freebsd-threads@FreeBSD.ORG Wed Feb 11 20:05:24 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 3FDB516A4CE for ; Wed, 11 Feb 2004 20:05:24 -0800 (PST) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A98543D1D for ; Wed, 11 Feb 2004 20:05:24 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.31.45.197]) by comcast.net (sccrmhc12) with ESMTP id <2004021204052301200ste8ae>; Thu, 12 Feb 2004 04:05:23 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])i1C45Yhd061846 for ; Wed, 11 Feb 2004 23:05:34 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)i1C45Xax061845 for freebsd-threads@freebsd.org; Wed, 11 Feb 2004 23:05:33 -0500 (EST) (envelope-from rodrigc) Date: Wed, 11 Feb 2004 23:05:33 -0500 From: Craig Rodrigues To: freebsd-threads@freebsd.org Message-ID: <20040212040533.GA61839@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: 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:05:24 -0000 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