Re: [Further-devel] CPU status plugin

From: Evan Martin (
Date: Sun Jun 17 2001 - 10:41:48 PDT

On Sat, Jun 16, 2001 at 09:26:20PM +0100, Ed Lea wrote:
> I finally got the chance to finish hacking a sort of CPU status plugin
> for further this afternoon (me and Chris have been talking about it for
> weeks). It's not great, but it seems to do the trick
> without effecting the actual values its reporting on too much. It's a
> simple linux hack that reads from /proc/stat every second and sees the
> difference, reporting user and system cpu loads as percentages.
> I just wanted to write a plugin with a sort of bar-graph in it. I've put
> a screen shot here: and the
> code

Wow, rad!

> As far as I know it's pretty stable and workable, the colours and things
> may want some tweaking, but its sort of there. I may work on a BSD port
> once I get my new hub so I can plug my FreeBSD box in somewhere.

My comments/changes: (Things I didn't change are marked as such.)
- I'm not sure how valuable two digits of precision are... or even one,
  for that matter, but one is what top uses. (No change.)
- I switched the further event model back to not using glib, so I made
  some minor changes there.
- I added a copyright at the top, attributing it to you. Yay for
  distributed copyright! Further will never be sold!
- I'm not sure that opening the stats file once per second is really
  efficient... I don't know how much of a load it puts on the system.
  Maybe open the file when the plugin loads? (No change.)
- How can we make this not break on non-Linux platforms? Is there some
  sort of #define we can use? (No change.)
- I really need to make the configuration language... so far, I've
  managed to avoid using any color other than fullwhite, because that
  color can work against a variety of backgrounds... (No change.)

Committed to CVS. Thanks again.

Evan Martin -

_______________________________________________ Further-devel mailing list

This archive was generated by hypermail 2.1.2 : Sun Nov 11 2001 - 14:16:15 PST