01-08-2013
04:39 PM
- last edited on
04-13-2022
04:00 AM
by
Translator
Hi guys,
What is the meaning of object 'iflastchange'? I thought it was the link flap timer. Apparently it's not. Can anyone give a detail answer? I don't really understand the difinition given by cisco document.
ifLastChange OBJECT-TYPE
SYNTAX TimeTicks
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The value of sysUpTime at the time the interface entered
its current operational state. If the current state was
entered prior to the last re-initialization of the local
network management subsystem, then this object contains a
zero value.
Thanks,
Bo
Solved! Go to Solution.
01-09-2013
10:39 AM
- last edited on
04-13-2022
04:12 AM
by
Translator
Hi Bo,
Milan's absolutely right; I just want to give you some additional information to make use of it:
To find out when the last status change of an interface occured, you also need to query sysUptime.0 (1.3.6.1.2.1.1.3.0) .
Calculate sysUptime.0 minus ifLastChange.x and divide the result by 100
(Tiimeticks are denoted in hundredths of a second).
This value gives you the time in seconds since the last status change.
Just for the sake of completeness:
If the uptime is higher than 497 days, sysUptime.0 has to be set to 0 and then starts counting up again. That's because it's a 32-bit value. If you want to make a script or something like that, you have to keep that in mind.
Best regards,
Rolf
01-10-2013
12:54 AM
- last edited on
04-13-2022
04:02 AM
by
Translator
Hi Rolf,
you just explained a discrepancy I found on one of my routers:
# snmpwalk -Os -c xxx -v 1 a.b.c.d 1.3.6.1.2.1.1.3.0
sysUpTimeInstance = Timeticks: (2244808702) 259 days, 19:34:47.02
# snmpwalk -Os -c xxx -v 1 a.b.c.d 1.3.6.1.2.1.2.2.1.9
ifLastChange.1 = Timeticks: (874) 0:00:08.74
ifLastChange.2 = Timeticks: (2661565865) 308 days, 1:14:18.65
a.b.c.d#sh ver
....
a.b.c.d uptime is 2 years, 3 weeks, 5 days, 22 hours, 1 minute
Thanks,
Milan
01-09-2013 07:04 AM
Hi,
IMHO, it's a timestamp of the interface last status change.
So if your router uptime is 30 days and the interface went Up two days ago, the ifLastChange value should be 28 days.
HTH,
Milan
01-09-2013
10:39 AM
- last edited on
04-13-2022
04:12 AM
by
Translator
Hi Bo,
Milan's absolutely right; I just want to give you some additional information to make use of it:
To find out when the last status change of an interface occured, you also need to query sysUptime.0 (1.3.6.1.2.1.1.3.0) .
Calculate sysUptime.0 minus ifLastChange.x and divide the result by 100
(Tiimeticks are denoted in hundredths of a second).
This value gives you the time in seconds since the last status change.
Just for the sake of completeness:
If the uptime is higher than 497 days, sysUptime.0 has to be set to 0 and then starts counting up again. That's because it's a 32-bit value. If you want to make a script or something like that, you have to keep that in mind.
Best regards,
Rolf
01-10-2013
12:54 AM
- last edited on
04-13-2022
04:02 AM
by
Translator
Hi Rolf,
you just explained a discrepancy I found on one of my routers:
# snmpwalk -Os -c xxx -v 1 a.b.c.d 1.3.6.1.2.1.1.3.0
sysUpTimeInstance = Timeticks: (2244808702) 259 days, 19:34:47.02
# snmpwalk -Os -c xxx -v 1 a.b.c.d 1.3.6.1.2.1.2.2.1.9
ifLastChange.1 = Timeticks: (874) 0:00:08.74
ifLastChange.2 = Timeticks: (2661565865) 308 days, 1:14:18.65
a.b.c.d#sh ver
....
a.b.c.d uptime is 2 years, 3 weeks, 5 days, 22 hours, 1 minute
Thanks,
Milan
01-10-2013 06:45 AM
Hi Milan,
I'm glad when I could help to unravel that.
Probably the developers of the System-MIB simply didn't expect that devices could run more then 1 1/4 years without a reboot
Best regards
Rolf
01-10-2013 10:26 AM
Excellent explanation.
Thanks,
Bo
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