Sadly, the memory reporting in the memory module leaves something to be
desired.  There are some amusing comments about this in
libmetrics/freebsd/metrics.c file (among others).

I've been futzing with a completely untested patch for "properly" calculate
and report a "mem_used" metric.  You can see it here, if you're curious:
https://github.com/hawson/monitor-core/tree/mem_used

I've done some digging around in the procps code (which includes 'free' and
'top').  The way "top" reports "memory used" is roughly:
  mem_used = mem_total - buffers - cache - free - slab_reclaimable -
slab_unreclaimable

I believe that the actual values used can be seen in /proc/meminfo:
  MemTotal, MemFree, Buffers, Cached, SReclaimable, SUnreclaim

The "mem_used" value reported by the WebUI is likely calculated as:
  Total - free - cache - shared - buffers
...assuming I'm reading the RPN in mem_report.php correctly.  Note that the
"shared" and "buffers" value are included only if there are corresponding
RRDs for those fields.  The other three are assumed to be present.

On Tue, May 17, 2016 at 9:15 PM, Sara M <s....@live.com> wrote:

> Hi all,
> I'm using ganglia and hsflow to monitor my VMs running Ubuntu. The problem
> is that I want to read memory_use in R from rrd files, but the only files I
> see for memory metric are total, shared, cash and swap. Extracting csv file
> from ganglia web page gets me memory_use metric. How I can calculate that?
> it's not just a sum up of the cash, swap, buffer and is a bit different.
>
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data
> untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> _______________________________________________
> Ganglia-general mailing list
> Ganglia-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ganglia-general
>
>


-- 
Jesse Becker
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to