12-10-2009 10:36 AM
I've noticed that the timetick value for system uptime (OID 1.3.6.1.2.1.1.3.0) is a 32-bit value so once the system has been up for 1 year, 132 days, 2 hours, 27 minutes and 52.96 seconds the value will roll to 0 again. This is a problem because if I want to calculate the time an interface has been in its current state (which is stored in another OID 1.3.6.1.2.1.2.2.1.9 as the current sysUptime when the interface entered its current ifOperStatus) then the number becomes negative when the sysUpTime value rolls to 0. For example, suppose a switch port ifOperStatus goes to 'up' 45 seconds after the switch initializes. The ifLastChange value would be somewhere around 4500. 45 seconds later, the timetick value in 1.3.6.1.2.1.1.3.0 (sysUptime) would be 9000 and if I subtracted 4500 from 9000 I'd get 4500 which would represent the fact that the port has been 'up' for 45 seconds. If the switch remains up for a really long time (longer than 1 year, 132 days....) and that sysUptime value rolls to zero then 0 - 4500 becomes -4500 when I try to calculate sysUptime - ifLastChange. HOWEVER, I've noticed that the "show version" command will report the accurate system uptime regardless of the number of seconds the switch has been up. So my question is this: is there another OID I can look at that will tell me how many times the sysUptime value has rolled back to 0? The switch must be aware of it somehow because the uptime reported by 'show version' does report the correct time. Or, is there a different OID that tracks system uptime that's greater than a 32-bit value?
Solved! Go to Solution.
12-10-2009 12:08 PM
Yes, you have the snmpEngineTime / .1.3.6.1.6.3.10.2.1.3 option on IOS 12.0(3)T or later, as explained in this post:
12-10-2009 12:08 PM
Yes, you have the snmpEngineTime / .1.3.6.1.6.3.10.2.1.3 option on IOS 12.0(3)T or later, as explained in this post:
12-10-2009 01:09 PM
Thanks!
08-06-2022 07:04 AM
It appears this OID snmpEngineTime tracks the uptime of the failover cluster and not the individual device. Is there any way to track the uptime or reboot event of a device?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide