[erlang-patches] SNMP erlNodeReductions defined too narrow

Tobias Schlager Tobias.Schlager@REDACTED
Mon Jul 15 16:30:09 CEST 2013


Hi Stefan,

I was aware of the fact that this would not finally fix the overflow when I created the patch. I should've made clear in the mail that this does only address, not fix the issue. You're absolutely right, I do also think that the SNMP instrumentation should handle this kind of overflow. Unfortunately, I didn't come up with that idea myself when I wrote the patch.

However, I think extending this and probably some other values to a wider type is actually a good thing because providing a value that typically overflows within a few hours is quite meaningless. I would like to make another patch that actually fixes the problem but I'm not sure what the desired behaviour would be for a counter. Should it always reflect the highest valid value when overflowing or should it start over?

Thank you for the input.

Regards
Tobias

________________________________________
Von: Stefan Zegenhagen [stefan.zegenhagen@REDACTED]
Gesendet: Montag, 15. Juli 2013 13:19
An: Tobias Schlager
Cc: erlang-patches@REDACTED
Betreff: Re: [erlang-patches] SNMP erlNodeReductions defined too narrow

Dear Tobias,

> this patch fixes the problem I posted to the erlang-bugs mailing list earlier today. In short, this fix simply converts the type of erlNodeReductions from Counter32 to Counter64 in the OTP-MIB.mib file. This patch also removes some warnings discovered by smilint (regarding timestamp formats) and it introduces a new test suite for the otp_mibs application (quite similar to the os_mon_mib suite).
>
> git fetch https://github.com/schlagert/otp.git snmp_fix_node_reduction_type
>
> https://github.com/schlagert/otp/compare/erlang:maint...snmp_fix_node_reduction_type
> https://github.com/schlagert/otp/compare/erlang:maint...snmp_fix_node_reduction_type.patch

Unfortunately, (integer) numbers in Erlang never wrap. So even the
Counter64 type will overflow at some point (I've tested that with other
counters in SNMP). It seems to be required to change the instrumentation
function to manually truncate numbers, or change the erlang SNMP stack
to implicitely truncate long integers.


Kind regards,

--
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: stefan.zegenhagen@REDACTED
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.




More information about the erlang-patches mailing list