SNMP: get the date and time when the router was reinitialized

Unanswered Question
Jun 27th, 2008

Hello, does exist any way to know through SNMP the date and time when the router was reinitialized last time or the time passed since the router was reinitialized las time?

Thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Martin Ermel Fri, 06/27/2008 - 04:45

poll one of the following OID to get the uptime of a device:

you can poll sysUpTime (.1.3.6.1.2.1.1.3.0) to get the uptime of a device in timeticks but it is a 32-bit counter (which will roll-over after 496 days)

but you can also poll snmpEngineTime (.1.3.6.1.6.3.10.2.1.3.0) to get the uptime in seconds (according to Cisco it will not wrapp around in 135 years (which I assume should be enough...)

jmoratillapeon Fri, 06/27/2008 - 05:22

I have seen:

sysUpTime: The time (in hundredths of a second) since the network management portion of the system was last re-initialized.

snmpEngineTime:The number of seconds since the value of the snmpEngineBoots object last changed. When incrementing this object's value would cause it to exceed its maximum, snmpEngineBoots is incremented as if a

re-initialization had occurred, and this

object's value consequently reverts to zero.

Apart from the range, 496 days and 135 years for sysUpTime and snmpEngineTime respectively, both OIDs save the same value?Both OIDs means the same?

Martin Ermel Fri, 06/27/2008 - 06:10

No,it is not exactly the same. This is how I understand the differences:

sysUpTime referes to the network management portion of the device, which is reinitialzied with every reboot of the system (and the value is in timeticks)

snmpEngineTime refers to the SNMP engine of a device (which could be seen as a submodule of the network management portion of a device) that could undergo a independent restart even when the device is not reloaded. The restart of the snmp engine occures if the snmpEngineID of a device is changed. Once configured, the snmpEngineID should be constant accross reboots of the device.

2 values are involved:

snmpEngineBoots: counts the (re-)initialization of the SNMP engine (since the snmpEngineID was last configured)

snmpEngineTime: counts the seconds since the last change of snmpEngineBoots

So snmpEngineBoots changes when

- snmpEngineID is changed (I assume the value should be set back to zero)

- the device is rebooted (the value should be incremented by one)

- perhaps any other process (internal process/failure) could cause a restart of the SNMP engine (increment by one)

In real life I would say snmpEngineTime will be reset when

- you configure SNMPv3 (snmpEngineID must be configured)

- you change the snmpEngineID

- the device is reloaded

If you respect these situations, I would say it is the same (and thats what I found on the devices here when checking manually)

jmoratillapeon Sun, 06/29/2008 - 21:57

Thanks. I want to know the time passed since the router has been last reinitialized (or reboot) so I will use sysUpTime.

Actions

This Discussion