Getting running time of child

Dan Nelson dnelson at allantgroup.com
Thu Nov 19 16:53:38 UTC 2009


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 at allantgroup.com


More information about the freebsd-hackers mailing list