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.
Here are some useful details:
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
Here's an example of how you would calculate this info:
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
(23:00 minutes - 2 minutes 10 seconds = 20 minutes 50 seconds)