I have had a recurring LXDE CPU monitor problem: it displays all green
as though the CPU was busy 100% of the time. However, uptime, top etc
indicated everything was fine.
I have now tracked down the root cause in cpu.c (lxpanel-0.5.12.tar.gz)
line 114:
int fscanf_result = fscanf(stat, "cpu %lu %lu %lu %lu", &cpu.u, &cpu.n,
&cpu.s, &cpu.i);
The idle jiffie count has exceeded the unsigned long integer range (my
machine is 32-bit) and instead of wrapping nicely, fscanf() places
ULONG_MAX into the idle counter. That makes LXPanel believe the idle
jiffie count hasn't advanced at all; that is, cpu_delta.i = 0 in:
c->stats_cpu[c->ring_cursor] = cpu_uns / (cpu_uns + cpu_delta.i);
The simple fix is to specify:
typedef unsigned long long CPUTick; /* Value from /proc/stat */
and use %llu in fscanf().
Marko
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list