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



I've been working on porting libgtop2 to GNU/Hurd today. I've got it about half done, perhaps more (I've got the feeling there's not much we can support in the remaining
files ;-). The port is not as complete as the Linux version, though:

- 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.
 - 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. - 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.
- We can't get the "idle time" along with the uptime like in /proc/uptime, but
   I'm not sure it matters anyway.

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.


Manuel Menal

Reply to: