02-21-2019 12:50 PM
Hello all, been trying to do a report on port usage and I tried to use the sho int | inc line protocol | inc Last input never, output never. My goal was just to see what ports have never been used so I can export to an excel spreadsheet. However when I ran this I was getting ports that were connected along with the ones that were not. I even tried to do sho int | inc line protocol is down |Last input and it seemed to give me some of the ports correctly but it would skip some like giving me F6/0/4 stating it was down with line protocol down with its last input, out along with f6/0/5 but would skip 6's line status but give me its Last Input status. Trying to figure out what variable I am missing in the my query.
02-21-2019 01:20 PM
For this I use: show int | include (down|output never) it will give you the ports that have not seen traffic since the last reload of the switch.
Optionally you can use show int stats | include Processor|Ethernet anything with 0s has not seen traffic.
Hopefully that helps you get the info you need.
02-21-2019 01:40 PM
I use generally perl script with snmp and ssh combination get this report.
but if you looking simple cmmand this will give you the results :
show int | i proto.*notconnect|proto.*administratively down|Last in.* [6-9]w|Last in.* [0-9][0-9]w|[0-9]y|disabled|Last input never, output never, output hang never
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide