Once again I've been asked to make Ganglia usable on Linux hosts with
the Broadcom NIC with the 32-bit byte counters.
E.g., HP "Proliant" 580 G5, a rather popular machine where Ganglia
doesn't work out of the box.

So I'm trying to understand ganglia-3.1.7/libmetrics/linux/metrics.c again.

In update_ifdata(), we parse /proc/net/dev for the current bytes and
packets in and out.
There's a structure "ns" (declared where?) of type net_dev_stats,
representing the previous sample?
I'm not sure exactly what "ns" represents.

There's a sanity check at line 227   "if ( rbi >= ns->rbi )"  for
whether the counter went up or down.  If it went down, we assume the
counter rolled around, and guess the value is negative, and invert it,
line 231. " l_bytes_in += ULONG_MAX - ns->rbi + rbi;"
(I don't understand how that is supposed to work.)
Then, regardless of whether the sample passed or failed the sanity
check, it's saved in the "ns" structure.
Line 233, "ns->rpi = rpi;"

After the parsing is all done, and the crazy value is in "ns", an
optional reasonableness test (REMOVE_BOGUS_SPIKES)
returns early if any of the numbers are extremely large.  Otherwise it
updates the static running counts and then returns.
On our HP 580G5s, defining REMOVE_BOGUS_SPIKES had no effect.  The
network traffic graphs become useless within a minute of starting gmond.

The part I don't understand is when the line 227 check fails, we put the
known-bad data in "ns" anyway.

I'd appreciate it if someone familiar with update_ifdata() could explain
its logic.  /When/ is this routine called?
(I can see modules/network/mod_net.c calls it via bytes_in_func(), but I
haven't figured out when net_metric_handler()
is called.  Maybe that would explain how bogus data in "ns" doesn't matter.)
Is there any way to keep way out-of-scale data out of these graphs?
Thanks for any help.

-Cameron in Los Gatos




-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to