Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

ifLastChange and Interface details

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
Cisco Employee

Re: ifLastChange and Interface details

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)

2 REPLIES
Cisco Employee

Re: ifLastChange and Interface details

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)

New Member

Re: ifLastChange and Interface details

thanks very much for the info.

850
Views
10
Helpful
2
Replies