Re: libgtop2
At Wed, 11 May 2005 01:41:31 +0200,
Manuel Menal <mmenal@hurdfr.org> wrote:
> - I can't find a way to get statistics about CPU usage
> (user/sys/kernel times, etc.),
> i.e. what you get in /proc/stat with Linux.
Check out libps, which is part of the Hurd.
> - I did not find a clean way to get the last running PID. That would mean
> getting a task id from Mach (since our scheduler is in Mach), and
> converting it
> to a proc_stat to get its pid, but I don't think Mach has interfaces
> for the first step.
Right, I don't think Mach gives this info. But if you had a task id,
there is a function to convert task ids into pids in the proc
interface (just FYI). I don't actually see what you'd want to have
this info for anyway.
> - There are no interfaces for IP accounting. It's usually done at the
> driver level, so
> you'd need to add an interface to Mach for that - that should be
> simple since the
> code that fills the /proc entry under Linux is already there.
I don't know what IP accounting is.
> - We can't get the "idle time" along with the uptime like in
> /proc/uptime, but
> I'm not sure it matters anyway.
Ok.
> libgtop2 interfaces are pretty Linux-specific, so there are a few things
> that don't
> apply to GNU/Hurd. I hope we'll have a working libgtop2 by the end of
> the week,
> but I can't say for sure.
Sweet.
Thanks,
Marcus
Reply to:
- References:
- libgtop2
- From: Manuel Menal <mmenal@hurdfr.org>