GNOME Bugzilla – Bug 126461
System monitor applet - Memory is constantly at 100%
Last modified: 2004-12-22 21:47:04 UTC
For some reason the system monitor applet is showing that my memory consumption is constantly 100%. If I run top or free, it shows that I've only used maybe 50% of memory. Also the normal system monitor shows a more accurate represntation of my memory usage as well. There seems to be some bug in the memory part of this applet. The CPU, Network, and Swap portions of the applet all work correctly.
What version of libgtop are you using? Has it always shown 100% for the applet?
I'm using version 2.0.7. It just started recently. It appears this pacakge was updated by dropline Nov 5.
I can confirm this bug. I'm using gnome-applets 2.4.1 and libgtop 2.0.7 on Mandrake cooker. Before, the applet worked correctly, now I see 100% mem usage on all systems updated to newer libgtop/gnome-applets.
Does the memory show correctly for gnome-system-monitor (ie the stand alone application)?
Yes, the memory does show correctly in the stand alone version of gnome-system-monitor.
Can one of you post a 'cat /proc/meminfo' here?
Also I put a change into cvs that will show up in 2.5.2. If anyone can test that, it would help a lot. Thanks.
-=> cat /proc/meminfo total: used: free: shared: buffers: cached: Mem: 650399744 640524288 9875456 0 15249408 423006208 Swap: 536698880 0 536698880 MemTotal: 635156 kB MemFree: 9644 kB MemShared: 0 kB Buffers: 14892 kB Cached: 413092 kB SwapCached: 0 kB Active: 173688 kB Inactive: 254828 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 635156 kB LowFree: 9644 kB SwapTotal: 524120 kB SwapFree: 524120 kB Committed_AS: 291096 kB
Because I can't update to gnome 2.5.x at the moment, I have taken the changes you made to linux-proc.c and patched them into the current (2.4.1) mdk gnome-applets package. And, what should I say, it works. The user/cached/buffered memory appear correctly in their different shades of green. Perfect. Thanks.
BTW, after looking at your code I can confirm that the crucial change that makes it work is the following line: - user = rint (Maximum * (float)tmp_user / mem.total); + user = rint (Maximum * (float)mem.user / (float)mem.total); You can safely remove the explicit cast of the denominator to float because it is already done for one of the factors in the nominator. user = rint (Maximum * (float)mem.user / mem.total);
Closing then. Thanks!