ifLastChange and Interface details

Answered Question
Oct 30th, 2007
User Badges:

I have written my own script that snmp queries the interfaces for the ifLastChange details. Our customer is querying the results as when they login to the switch and do a show interface, they get output that is different. I have attached the details. The ifLastChange is in Blue, and the interface output is in red. Can someone please suggest to me what the difference is so that I can explain to our customer.



Correct Answer by David Stanford about 9 years 7 months ago

Here are some useful details:


ifLastChange


This is the value of sysUpTime (usually matches show ver unless counter wraps past 496 days) at the time the interface entered its current operational state. This will not change unless the interface operational state is changed or the device is rebooted.


You have to do a little math to find out the exact amount of time the port has been in its

current state.


Here's an example of how you would calculate this info:



example)

If show ver or sysUpTome has a value of 2 months, 17 days, 4 hrs, 23 mins it is really is 2 months, 17 days 04:23:00.


Then if you look at a port it shows Last Changed is 0:2:10.


That means the condition of this port has not changed since the device SysUpTime was 0

days, 0 hrs, 2 minutes, 10 seconds.


You subtract the Last Changed value (0:02:10) from the current SysUpTime value (2 months,

17 days 04:23:00) to get the exact amount of time the port has been in this state.


This port has been in this operational state for 2 months, 17 days, 4 hrs, 20 minutes and

50 seconds.


(23:00 minutes - 2 minutes 10 seconds = 20 minutes 50 seconds)



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (3 ratings)
Loading.
Correct Answer
David Stanford Tue, 10/30/2007 - 10:09
User Badges:
  • Cisco Employee,

Here are some useful details:


ifLastChange


This is the value of sysUpTime (usually matches show ver unless counter wraps past 496 days) at the time the interface entered its current operational state. This will not change unless the interface operational state is changed or the device is rebooted.


You have to do a little math to find out the exact amount of time the port has been in its

current state.


Here's an example of how you would calculate this info:



example)

If show ver or sysUpTome has a value of 2 months, 17 days, 4 hrs, 23 mins it is really is 2 months, 17 days 04:23:00.


Then if you look at a port it shows Last Changed is 0:2:10.


That means the condition of this port has not changed since the device SysUpTime was 0

days, 0 hrs, 2 minutes, 10 seconds.


You subtract the Last Changed value (0:02:10) from the current SysUpTime value (2 months,

17 days 04:23:00) to get the exact amount of time the port has been in this state.


This port has been in this operational state for 2 months, 17 days, 4 hrs, 20 minutes and

50 seconds.


(23:00 minutes - 2 minutes 10 seconds = 20 minutes 50 seconds)



Actions

This Discussion