cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6476
Views
5
Helpful
5
Replies

How long has port not been used

asmith1972
Level 1
Level 1

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 5

Edison Ortiz
Hall of Fame
Hall of Fame

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.

blsmith
Level 1
Level 1

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.

dave.keith
Level 1
Level 1

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

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.

hobbe
Level 7
Level 7

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

Review Cisco Networking products for a $25 gift card