From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 19 20:15:36 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E38F7106568D for ; Thu, 19 Nov 2009 20:15:36 +0000 (UTC) (envelope-from koffieyahoo@gmail.com) Received: from mail-gx0-f218.google.com (mail-gx0-f218.google.com [209.85.217.218]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4258FC16 for ; Thu, 19 Nov 2009 20:15:36 +0000 (UTC) Received: by gxk10 with SMTP id 10so196876gxk.3 for ; Thu, 19 Nov 2009 12:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=wpzRleIdu5xp6SOd5tftl+yMQKF+tkdQbWVgveoqLlM=; b=URLZ8kjcG4fJfo0rDqI27TvqclE9NWHNM2ZeTbShSU3fVLazBo3sym+VA3Nn3pEa2Z LX73wmbAv5K/Ic67LNh/m2sjQpWgoTzh+/4TV0LUcoxKQlLmYL6akglz2QwI54s8dxeJ w2UvU6WeiPpkoytSU3EjVhuvzGZFEVZVNVO1c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=D7sXRI+h/qcUhTCP5iNyGc3rLw/ZpVMMUt0dbMG6sqCWSRYMKiQi1Vi2dvQWCpwh6h rDPjf+JnloaBDQDNO7V65yGNIb7M5UXlmgIcUlUcRg5x0mQ7w5GsDwKFG+nuNoj67KXz SUfsLjfJgn4D3Kl7gKuS+t1tnoB5BrghtTaZQ= MIME-Version: 1.0 Received: by 10.150.127.6 with SMTP id z6mr918438ybc.145.1258661735211; Thu, 19 Nov 2009 12:15:35 -0800 (PST) In-Reply-To: <20091119163437.GE89004@dan.emsphone.com> References: <9cb658f10911190214j5a6bc17fq200a82ea0b4acaa8@mail.gmail.com> <86ocmy63ww.fsf@ds4.des.no> <9cb658f10911190652j555e4484u2427d2bed87871f8@mail.gmail.com> <4B056039.4040802@acm.poly.edu> <9cb658f10911190715p404da03er9446b5dc5c31cb78@mail.gmail.com> <20091119163437.GE89004@dan.emsphone.com> Date: Thu, 19 Nov 2009 21:15:35 +0100 Message-ID: <9cb658f10911191215w783c6406j5aca01ba92e6ad4d@mail.gmail.com> From: Koffie Yahoo To: Dan Nelson , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Getting running time of child X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 20:15:37 -0000 That's it! Thanks! Problem solved :-) Jay On Thu, Nov 19, 2009 at 5:34 PM, Dan Nelson wrote= : > In the last episode (Nov 19), Koffie Yahoo said: >> > It's not as portable as getrusage(2), but you could probably get the >> > information you want using libkvm's kvm_getprocs(3) function. The >> > information available is defined in the kinfo_proc structure in >> > /usr/include/sys/user.h. >> >> Unfortunately, as far as I can see the kinfo_proc structure only contain= s >> the sum of user time and system time and not the two values separately, >> or have I missed something? > > Take a look at the the ki_rusage struct inside kinfo_proc. > > -- > =A0 =A0 =A0 =A0Dan Nelson > =A0 =A0 =A0 =A0dnelson@allantgroup.com >