05-12-2021 07:43 AM
I am looking for a command to list all unused ports for a long period of time. I have tried different combinations but not not getting complete info, none of them listing the interface
sh int | i GigabitEthernet* | Port*.down
Port down for 244 day(s) 1 hour(s) 16 minute(s) 47 second(s)
sh int | i int | Port*.down
Port down for 244 day(s) 1 hour(s) 2 minute(s) 1 second(s)
Solved! Go to Solution.
06-07-2021 10:00 AM
Are you looking for this to output in a single line per port? If now, why would something like show int | I down not work? Outputs lines with the word Down in it. So if the port is up, you wouldn't see the interface or the uptime. But you would see all down ports and their duration.
show interfaces | i down
GigabitEthernet1/1/2 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/3 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/4 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/5 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/6 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/7 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/8 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/9 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/10 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/12 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
10GigabitEthernet1/3/1 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
10GigabitEthernet1/3/2 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigEthernetmgmt1 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 53 second(s)
05-24-2021 09:13 AM
bump!
06-07-2021 10:00 AM
Are you looking for this to output in a single line per port? If now, why would something like show int | I down not work? Outputs lines with the word Down in it. So if the port is up, you wouldn't see the interface or the uptime. But you would see all down ports and their duration.
show interfaces | i down
GigabitEthernet1/1/2 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/3 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/4 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/5 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/6 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/7 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/8 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/9 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/10 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigabitEthernet1/1/12 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
10GigabitEthernet1/3/1 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
10GigabitEthernet1/3/2 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 21 second(s)
GigEthernetmgmt1 is down, line protocol is down
Port down for 13 day(s) 19 hour(s) 37 minute(s) 53 second(s)
06-09-2021 09:54 AM
@brian_powers Thank you! This is exactly what I was looking for.