Bug 145901 - SuperKaramba Memory Sensor Incorrect
Summary: SuperKaramba Memory Sensor Incorrect
Status: RESOLVED UNMAINTAINED
Alias: None
Product: superkaramba
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Ryan Nickell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 15:55 UTC by Olivier Vitrat
Modified: 2018-09-04 15:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Vitrat 2007-05-24 15:55:26 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Debian stable Packages

Reported in Debian BTS at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=306583

I noticed that SuperKaramba reports memory usage differently to the free and
vmstat commands when you select the format="%umb" option (described as "Used
memory in megabytes (cache and buffers excluded)." on the SuperKaramba
sensors page [1]).

The memory usage appears to be considerably lower than that reported by the
free command. For example, at the moment free outputs the following:

             total       used       free     shared    buffers     cached
Mem:        386948     383360       3588          0      26488     105076
-/+ buffers/cache:     251796     135152
Swap:       562232     355856     206376

whereas my SuperKaramba theme reports the used memory excluding cache and
buffers to be 210Mb (instead of 251796/1024=246Mb).

I had a look at the source code in the Debian package. The memory usage is
found by parsing the /proc/meminfo file. The MemSensor::getCached() function
calculates the amount of cache as the total "Cached" and "SwapCached" memory
and the free memory is calculated using this value. This means that the
reported free memory is lower than that reported by "free" by the amount of
SwapCached memory. I'm pretty sure that this is wrong as SwapCached relates to
the swap partition rather than the physical memory.

[1] http://netdragon.sourceforge.net/ssensors.html
Comment 1 Alejandro Diaz Caro 2007-09-21 03:38:57 UTC
I can confirm this bug.
I use Kubuntu 7.04 with KDE 3.5.7 and Superkaramba from the ubuntu repositories which it is the version 0.41.
Right now, Superkaramba is informing 373M at memory sensor with format %umb, and this is the output of free -m:

             total       used       free     shared    buffers     cached
Mem:          1004        994          9          0         80        368
-/+ buffers/cache:        545        458
Swap:          956        322        634
Comment 2 Andrew Crouthamel 2018-09-04 15:52:39 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug.