[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libgtop2



     - 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.

Don't recall of hand, but you could look at see what GNU uptime does
to get that info.

     - 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.

What do you mean by "the last running PID"?

   - 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.

Can't help you here.

   - We can't get the "idle time" along with the uptime like in
     /proc/uptime, but I'm not sure it matters anyway.

Once again, see GNU uptime.  For the uptime you will need to use
something like fetch_boot_time (see the Hurd source code for that
function, somewhere in w.c).



Reply to: