Cisco - List Unused Switchports
Hello,
A quick command for Cisco users. This will list the switchports that have not been used in the last 6 weeks. Handy if you are looking for unused ports when the switch is full!
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
Example output below. The ports in red are ports that are not connected but have been used in the last 6 weeks. Please be careful!
[color="#FF0000"]GigabitEthernet4/0/38 is down, line protocol is down (notconnect) GigabitEthernet4/0/39 is down, line protocol is down (notconnect)[/color] GigabitEthernet4/0/40 is down, line protocol is down (notconnect) Last input never, output 1y19w, output hang never GigabitEthernet4/0/41 is down, line protocol is down (notconnect) Last input never, output 31w4d, output hang never GigabitEthernet4/0/42 is down, line protocol is down (notconnect) Last input never, output 1y41w, output hang never GigabitEthernet4/0/43 is down, line protocol is down (notconnect) Last input never, output 1y51w, output hang never GigabitEthernet4/0/44 is down, line protocol is down (notconnect) Last input never, output never, output hang never
To view a list of all ports and when they were last used this is the command you want:
show int | i proto|Last in
Edited by FN-GM

0 Comments
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now