After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 126461 - System monitor applet - Memory is constantly at 100%
System monitor applet - Memory is constantly at 100%
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: multiload
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-11-07 20:13 UTC by charlie.siegel
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description charlie.siegel 2003-11-07 20:13:01 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.
Comment 1 Kevin Vandersloot 2003-11-08 14:38:14 UTC
What version of libgtop are you using? Has it always shown 100% for
the applet?
Comment 2 charlie.siegel 2003-11-08 16:58:58 UTC
I'm using version 2.0.7.  It just started recently.  It appears this
pacakge was updated by dropline Nov 5.
Comment 3 Oliver Lemke 2003-11-13 07:09:33 UTC
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.
Comment 4 Kevin Vandersloot 2003-11-13 13:35:40 UTC
Does the memory show correctly for gnome-system-monitor (ie the stand
alone application)?
Comment 5 charlie.siegel 2003-11-13 15:26:44 UTC
Yes, the memory does show correctly in the stand alone version of
gnome-system-monitor.
Comment 6 Kevin Vandersloot 2003-11-20 00:12:08 UTC
Can one of you post a 'cat /proc/meminfo' here?
Comment 7 Kevin Vandersloot 2003-11-20 00:20:09 UTC
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.
Comment 8 Oliver Lemke 2003-11-23 13:37:49 UTC
-=> 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
Comment 9 Oliver Lemke 2003-11-23 15:05:30 UTC
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.
Comment 10 Oliver Lemke 2003-11-23 15:47:23 UTC
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);
Comment 11 Kevin Vandersloot 2003-11-24 14:28:25 UTC
Closing then. Thanks!