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.
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.
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