[pysnmp-users] reported sysuptime and self._value
Brought to you by:
elie
|
From: Filippo G. <fgi...@gm...> - 2008-10-27 12:20:48
|
Hi,
first things first: thanks for pysnmp!
I'm trying pysnmp 4.1.10a and while sending out notification it seems that
sysuptime is setted incorrectly:
2008-10-27 11:29:11 localhost [UDP: [127.0.0.1]:47232]: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1225103351) 141 days, 19:03:53.51
while I have just launched the example ntforg.
Digging the code it seems the problem is at
pysnmp/v4/smi/mibs/instances/__SNMPv2-MIB.py in
class SysUpTime(TimeTicks):
def smiRead(self, name, value, idx):
return self.clone(int(time()-self._value)*100)
in fact self._value is never setted if I'm not mistaken thus the reported uptime
is the current unix epoch.
Is this a known bug (self._value is used elsewhere as well) or I'm missing
something?
thanks in advance,
filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:
It's not that I'm afraid to die, I just don't want to be there
when it happens.
-- Woody Allen
|