synchronize gnome applets update interval?
murray.alex at gmail.com
Wed Mar 28 10:59:13 UTC 2012
On Wed 28 Mar 2012 15:17:14 CST, Németh Márton wrote:
> Hi Aley, Carlos, Martin, Todd, Benoît and Davyd,
> I'm using your gnome applets to monitor the following things on my laptop:
> - CPU temperature (sensors-applet, http://sensors-applet.sourceforge.net/ )
> - CPU usage (multiload-applet-2)
> - CPU frequency (cpufreq-applet)
> My primary goal is to keep the CPU fan quiet as far as possible. This can
> be achieved if the CPU temperature is kept low which depends on the CPU
> usage and on CPU frequency.
> Then I run powertop 1.13 ( http://www.lesswatts.org/projects/powertop/ )
> to see what processes are causing wakeups. I realized that the applets I
> run in order to have an overview on the CPU usage causes additional CPU wakeups.
> So I modified the refresh interval of sensors-applet to 5.0s.
> The cpufreq-applet does not have any possibility to reduce the update interval.
> I also modified the default update interval of multiload-applet-2 to 5000ms.
> As you can see I can set up two of the applets to wake up the CPU once in
> 5 seconds, but these two alone will wake up the CPU worst case every 2.5 seconds.
> I don't know if there is any possibility to synchronize the gnome applets
> so that they wakes up one after the other causing only one wakeup every 5 seconds.
> Here is the list of software versions I used:
> $ lsb_release -a
> LSB Version:
> Distributor ID: Debian
> Description: Debian GNU/Linux 6.0.4 (squeeze)
> Release: 6.0.4
> Codename: squeeze
> $ dpkg -l gnome-power-manager gnome-applets sensors-applet
> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name Version Description
> ii gnome-applets 2.30.0-3 Various applets for the GNOME panel - binary files
> ii gnome-power-manager 2.32.0-2 power management tool for the GNOME desktop
> ii sensors-applet 2.2.5-4 Display readings from hardware sensors in your Gnome panel
> Márton Németh
Thankfully you needn't worry too much about unsynchronised wakeups
since the glib developers already thought of this and there exists the
function g_timeout_add_seconds()  which causes the wakeups to occur
in whole second amounts AT whole second intervals - so multiple wakeups
are synchronised for exactly the reason you want.
sensors-applet already uses this  as does cpufreq  however it
looks like multiload doesn't  - but a simple patch to change this to
the seconds variant shouldn't be too hard and should then allow all 3
to be in sync (as far as I can tell).
More information about the pkg-gnome-maintainers