system-load-plugin-0.1.0

Riccardo Persichetti riccardo.persichetti at tin.it
Wed Jul 2 10:56:26 CEST 2003


Hi Martti,

On Wed, 02 Jul 2003 08:50:51 +0300
Martti Kuparinen <martti.kuparinen at iki.fi> wrote:

> > Why don't you use getloadavg(3)?
well, sometime ago in a talk on #xfce, Benedikt suggested
to use getloadavg, the problem is i'm still using glibc-2.2.x
and getloadavg was only introduced in glibc-2.3.x...

Anyway, thanks for your code, i think i can try to check
whether getloadavg is available (at configure time) and if
so use it, otherwise fall back to /proc/stat...


> Sorry, I didn't look at the code. It looks like you display the load
> in percents and I don't know if it's possible use getloadavg for
> that. In other words, what is 100%? (Problem: you can have load >
> 1.0).
You're right on this one too, i looked at some dockapps and saw that
they were using the same function checking /proc/stat to get the
system load, but maybe they didn't keep in mind that one can have a
load > 1...


> But maybe you could use vmstat's idle and perform 100-idle to get the
> current load? Ask me if you need help with this...

Thanks for your support, I'll let you know as soon as i need some
help, and i'll definitely need some... ;-)


Regards,

  Riccardo

-- 
.-----------------------------.
| riccardo.persichetti at tin.it |
`-----------------------------'



More information about the Xfce4-dev mailing list