ganglia/monitor-core

Gmond displays wrong memory usage for processes

Closed this issue · 4 comments

Gmond shows wrong memory usage for processes that is monitored by procstat and is using a large amount of ram.

Example:

Procstat is aware of the correct ram usage:
procstat_tp_mem: 31522447360 B [The total memory utilization]

Gmond shows wrong data:
<METRIC NAME="procstat_tp_mem" VAL="1458561024" TYPE="uint32" UNITS="B" TN="24" TMAX="60" DMAX="0" SLOPE="both">

I suspect this comes from the correct value does not fit into an uint32.

I'd appreciate some help with this. Any more information I can provide to help out?

Your guess seems to be valid. I suppose those outputs does not come from the exact same metric ?

>>> 31522447360 % (1<<32)
1457676288

So you will need to change the value type to float (and format to %.0f), for values that are too big.

The outputs are from the same metric, but not from exactly the same time.

How can one convert procstat.py to use float instead? Sorry, I'm not a developer...

I meant the exact sample (the numbers didn't match), but that would explain it.
Opened a Pull Request for the code, need to change the type for all values...