Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.042 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'compute': 0.09; 'am,': 0.12; 'received:209.85.214.174': 0.13; '4:35': 0.16; 'cc:name:python list': 0.16; 'cc:addr:python-list': 0.16; 'looked': 0.16; 'wrote:': 0.18; 'cheers,': 0.20; 'trying': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'feb': 0.22; 'load': 0.26; 'looks': 0.27; 'url:code': 0.28; "i'm": 0.28; 'message-id:@mail.gmail.com': 0.29; 'cc:addr:python.org': 0.29; 'pm,': 0.29; '(so': 0.30; 'chris': 0.30; 'tue,': 0.32; 'list': 0.32; 'there': 0.33; 'external': 0.35; 'received:209.85.214': 0.36; 'cc:2**1': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.38; 'received:209': 0.39; 'cannot': 0.39; 'easy': 0.60; 'header:Received:6': 0.61; 'total': 0.61; 'url:p': 0.62; 'grab': 0.66; 'children.': 0.74; '10:33': 0.84 Received-SPF: pass (google.com: domain of arnodel@gmail.com designates 10.182.1.40 as permitted sender) client-ip=10.182.1.40; Authentication-Results: mr.google.com; spf=pass (google.com: domain of arnodel@gmail.com designates 10.182.1.40 as permitted sender) smtp.mail=arnodel@gmail.com; dkim=pass header.i=arnodel@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=EjTh1IjR4Ei8u57bNLJT9qvI3jKeOA+rWSqaZ9w4FMQ=; b=lkCIXpaPd1pNPUu33bvazpcr3gm6cDqK4+7PDRJbp9+x/I79n91DgGeNM69m1DsIHb 1sAu9fOnIWBk5PEHrKxElPz6eBbXP9rJd0W1yO4MSESh5h+KfkyfJwxDng3dbSwkpnM0 cD6k7ychKIKCdJxu8+OzJCTskKapkoPyqUC4M= MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 28 Feb 2012 21:47:00 +0000 Subject: Re: Listing children processes From: Arnaud Delobelle To: Mihai Badoiu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Python list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330465622 news.xs4all.nl 6842 [2001:888:2000:d::a6]:44135 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:21005 On 28 February 2012 21:39, Mihai Badoiu wrote: > On Tue, Feb 28, 2012 at 4:35 PM, Chris Rebert wrote: >> >> On Tue, Feb 28, 2012 at 10:33 AM, Mihai Badoiu wrote= : >> > I'm trying to compute the total CPU load of an external process and it= 's >> > children.=C2=A0 (so I cannot use resource.getrusage)=C2=A0 For the loa= d of the >> > process >> > I can just grab it from /proc/X/stat.=C2=A0 How do I get the CPU load = of the >> > children processes?=C2=A0 Is there an easy way to get a list of the ch= ildren >> > processes? >> >> http://code.google.com/p/psutil/ >> >> Cheers, >> Chris > Looked at that before.=C2=A0 psutil doesn't do children. > > --mihai Please don't top-post! Also, psutil.Process.get_children() looks to me like it "does" children. --=20 Arnaud