GNOME Bugzilla – Bug 112194
multiload adds cached mem to user mem instead of buffer mem
Last modified: 2004-12-22 21:47:04 UTC
The multiload applet calculates the memory like this: user = mem.used - mem.buffer - mem.shared; user = rint (Maximum * (float)user / mem.total); shared = rint (Maximum * (float)mem.shared / mem.total); buffer = rint (Maximum * (float)mem.buffer / mem.total); free = rint (Maximum * (float)mem.free / mem.total); mem.cached, which is a very significant portion of my memory here, that was lands in user, which always leads to the false assumption, my memory was 80% - 90% used, where it's really 40% (the -/+ buffers/cache line in free output). I suggest the following computation: user = mem.used - mem.buffer - mem.shared - mem.cached; user = rint (Maximum * (float)user / mem.total); shared = rint (Maximum * (float)mem.shared / mem.total); buffer = rint (Maximum * (float)(mem.buffer + mem.cached) / mem.total); free = rint (Maximum * (float)mem.free / mem.total); Attached is a patch.
Created attachment 16245 [details] [review] patch
Hmm, man free says [...]The shared memory column should be ignored; it is obsolete.[...] Does that also apply to libgtop?
Woops this has been fixed in cvs (with a seperate cached graph now).
Shouldn't shared be removed, given the comment in the free manual page?
Yah, if so then please open another bug.