cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4649
Views
0
Helpful
4
Replies

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

jmoratillapeon
Level 1
Level 1

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

4 Replies 4

Martin Ermel
VIP Alumni
VIP Alumni

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...)

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?

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)

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: