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

How long has port not been used

We have numerous Cisco switches and we want to find out which ports in these haven?t been used for say 2 weeks.

Does anyone know of a way to get this information?

Thanks

5 REPLIES
Hall of Fame Super Bronze

Re: How long has port not been used

The best I can suggest is clearing all counters today and come back in two weeks. If no activity has been reported in the ports, then you can assume they've been inactive for that long.

You can also check when was the last time the counters were cleared by typing 'show interface' and go from there. For instance, if the last time the counters were cleared was a month ago and the port shows 0 input/output packets, that port can be 'admin shutdown' if that's what you are after.

New Member

Re: How long has port not been used

I have always done a show interface and checked the line that states "last input, last output" - this should tell you when it last was used.

New Member

Re: How long has port not been used

It is quite straightforwand using SNMP. First, check the sysuptime. Then check the ifOperStatus to see what ports are down. Then check the ifLastChange to see what the uptime was when these ports went down. Of course the time that the ports have been down is the difference between the sysUpTime and the ifLastChange.

Dave

Cisco Employee

Re: How long has port not been used

Just keep in mind when doing this that sysUpTime can wrap at 497 days. So keep this in mind when doing any calculations for ifLastChange.

Gold

Re: How long has port not been used

If you have snmp you can watch the iflastchange wich will tell you what you want.

If not then try the show logging command

If you are in luck you will find some up and downs there.

show controllers will give you any ports that have never been used.

Same with show interfaces it will also give you non used interfaces.

then you can reset counters and check what you get there.

good luck

3480
Views
5
Helpful
5
Replies