cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2825
Views
10
Helpful
2
Replies

ifLastChange and Interface details

pete.small
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

David Stanford
Cisco Employee
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)

View solution in original post

2 Replies 2

David Stanford
Cisco Employee
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)

pete.small
Level 1
Level 1

thanks very much for the info.