Message from discussion
Listing children processes
Received: by 10.68.221.4 with SMTP id qa4mr16822572pbc.7.1330465649846;
Tue, 28 Feb 2012 13:47:29 -0800 (PST)
Path: h9ni20412pbe.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.astraweb.com!border5.a.newsrouter.astraweb.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path: <arno...@gmail.com>
X-Original-To: python-l...@python.org
Delivered-To: python-l...@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 arno...@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 arno...@gmail.com
designates 10.182.1.40 as permitted sender)
smtp.mail=arno...@gmail.com;
dkim=pass header.i=arno...@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: <CAGGWHE66DJCE25T-BtqTeboo81fG=zip+fUO=nam6700d67...@mail.gmail.com>
References: <CAGGWHE6ckudKzbBmg=+MyjuDRFE7VLbxL682G+ajcyOBReF...@mail.gmail.com>
<CAMZYqRSPe18XnoVzW8a1X3R8d9-8uMPG4ymQz44m=f4wnsY...@mail.gmail.com>
<CAGGWHE66DJCE25T-BtqTeboo81fG=zip+fUO=nam6700d67...@mail.gmail.com>
Date: Tue, 28 Feb 2012 21:47:00 +0000
Subject: Re: Listing children processes
From: Arnaud Delobelle <arno...@gmail.com>
To: Mihai Badoiu <mbad...@gmail.com>
Cc: Python list <python-l...@python.org>
X-BeenThere: python-l...@python.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/options/python-list>,
<mailto:python-list-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-list>
List-Post: <mailto:python-l...@python.org>
List-Help: <mailto:python-list-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-requ...@python.org?subject=subscribe>
Newsgroups: comp.lang.python
Message-ID: <mailman.262.1330465622.3037.python-l...@python.org>
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: ab...@xs4all.nl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On 28 February 2012 21:39, Mihai Badoiu <mbad...@gmail.com> wrote:
> On Tue, Feb 28, 2012 at 4:35 PM, Chris Rebert <c...@rebertia.com> wrote:
>>
>> On Tue, Feb 28, 2012 at 10:33 AM, Mihai Badoiu <mbad...@gmail.com> 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