3

What is the length of Cisco SNMP sysUpTime counter? 32 bits?

  • Is there some doubt that the cisco implementation would comply with the RFC? – Jeff Meden Jun 11 '15 at 15:59
5

Did a quick test and it looks like the data is a type 'Timeticks' which is a 32 bit integer. From the RFC:

The TimeTicks type represents a non-negative integer which represents
the time, modulo 2^32 (4294967296 decimal), in hundredths of a second
between two epochs.  When objects are defined which use this ASN.1
type, the description of the object identifies both of the reference
epochs.

https://tools.ietf.org/html/rfc2578#section-7.1.8

[user@host ~]$ snmpwalk -v 2c -c $COMMUNITY $DEVICE sysUpTime
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1342832478) 155 days, 10:05:24.78
6

sysUpTime is a 32-bit counter and will roll over after 496 days.

snmpEngineTime (.1.3.6.1.6.3.10.2.1.3) which returns the uptime in seconds and should not roll over for 135 years.

snmpwalk -v2c -c xx 10.xx.xxx.xxx .1.3.6.1.6.3.10.2.1.3
SNMP-FRAMEWORK-MIB::snmpEngineTime.0 = INTEGER: 1701562 seconds

snmpwalk -v2c -c xx 10.xx.xxx.xxx sysUpTime
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (170158257) 19 days, 16:39:42.57
4

Cisco v1 MIBs import the definition of TimeTicks from RFC1155-SMI. This mib is part of standard snmp utils (i.e. not included in the Cisco mib tarballs). Within RFC1155-SMI, TimeTicks is defined as:

   TimeTicks ::=
       [APPLICATION 3]
           IMPLICIT INTEGER (0..4294967295)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.