08-21-2007 11:06 AM - edited 03-05-2019 06:01 PM
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
08-21-2007 06:02 PM
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.
08-22-2007 07:53 AM
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.
08-22-2007 01:23 PM
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
08-23-2007 06:53 AM
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.
08-23-2007 09:36 AM
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
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: