Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751757AbWJALeP (ORCPT ); Sun, 1 Oct 2006 07:34:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751772AbWJALeP (ORCPT ); Sun, 1 Oct 2006 07:34:15 -0400 Received: from py-out-1112.google.com ([64.233.166.182]:49011 "EHLO py-out-1112.google.com") by vger.kernel.org with ESMTP id S1751757AbWJALeO (ORCPT ); Sun, 1 Oct 2006 07:34:14 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=gBOZesaYkkQA94jW8PMJm2ke8SqVp6MZv8ZYnstE+GR5duLnGM0gkWWNnBPzcjQTB4W18+7jcX3H4EC33FsaPiyVrdsztfqdHrw1AcbpyzLYehs+rbLsvqP/Zfth8v4F15IBygDYnU6v0FqnxVMa7X32utxN9A0FMhp8E2ev8+E= In-Reply-To: References: <0635847A-C149-412C-92B1-A974230381F8@dts.local> Mime-Version: 1.0 (Apple Message framework v749) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: "Eric W. Biederman" , linux-kernel@vger.kernel.org, William Pitcock Content-Transfer-Encoding: 7bit From: girish Subject: Re: [PATCH] include children count, in Threads: field present in /proc//status (take-3) Date: Sun, 1 Oct 2006 20:34:30 +0900 To: Jan Engelhardt X-Mailer: Apple Mail (2.749) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 31 >> PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD >> RSIZE VSIZE >> 22429 top 16.6% 0:21.12 1 18 20 1.35M 684K >> 1.77M 26.9M >> --------------------------------------------------------------------- >> --- >> -------------------------------------------------------- >> >> Comments/opinions? > > I fail to see which column you mean. > > #TH perhaps? I think, that can be calculated under linux by > > (a) counting the directories in /proc/22429/task using readdir > or I have implemented the child_count script, in this way. I was wondering what is more convenient. > (b) get the nlink of /proc/22429/task and subtract 2, which should > give > the same as (a), and, better than (a), should also be atomic This one, is good. I did not think about this approach. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/