lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2010/2/17 hleuwer <herbert.leuwer@t-online.de>:
> Am 16.02.2010 12:43, schrieb Yuri Kozlov:
>>
>> Hello.
>>
>> Linux 32-bit, luasnmp 1.0.5
>>
>> yuray@yuray:~$ lua -l snmp -i
>> Lua 5.1.3  Copyright (C) 1994-2008 Lua.org, PUC-Rio
>>>
>>> =snmp.newvar("1.3.6.1.2.1.31.1.1.1.10.51", 33)
>>
>> IF-MIB::ifHCOutOctets.51 = Counter64: 33
>>>
>>> =snmp.newvar("1.3.6.1.2.1.31.1.1.1.10.51", 34)
>>
>> IF-MIB::ifHCOutOctets.51 = Counter64: 4294967296
>>>
>>
>> Very strange result. :(
>> How to fix this?
>>
> This is a bug in src/nm_util.c during the conversion of the value into
> net-snmp internal Counter64 representation - patch attached.

Works better, but:

max value
> return snmp.newvar("1.3.6.1.2.1.31.1.1.1.10.51", 18446744073709551615)
IF-MIB::ifHCOutOctets.51 = Counter64: 0

and
> return snmp.newvar("1.3.6.1.2.1.31.1.1.1.10.51", 1844674407370955161)
IF-MIB::ifHCOutOctets.51 = Counter64: 1844674407370955264

is not equal. For counter type this is unacceptable.

-- 
Regards,
Yuri Kozlov