Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2009 10:34:40 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Koffie Yahoo <koffieyahoo@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Getting running time of child
Message-ID:  <20091119163437.GE89004@dan.emsphone.com>
In-Reply-To: <9cb658f10911190715p404da03er9446b5dc5c31cb78@mail.gmail.com>
References:  <9cb658f10911190214j5a6bc17fq200a82ea0b4acaa8@mail.gmail.com> <86ocmy63ww.fsf@ds4.des.no> <9cb658f10911190652j555e4484u2427d2bed87871f8@mail.gmail.com> <4B056039.4040802@acm.poly.edu> <9cb658f10911190715p404da03er9446b5dc5c31cb78@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 contains
> 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.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091119163437.GE89004>