Press "Enter" to skip to content

Command for showing unused ports over time on Cisco switches

Last updated on December 25, 2018

        I was looking at a previous question about this where a command was given to look for all ports that had not been used in 6 weeks.  I ran the command but it doesn't give the port names just the line in the output that has the last input.  I'm not a regular expression person so is there someone who can change this to show the port names as well.
Command:
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

Output:
  Last input never, output 7w5d, output hang never
  Last input never, output 7w5d, output hang never
  Last input never, output 17w1d, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output 21w6d, output hang never
  Last input never, output 21w3d, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output 7w1d, output hang never
  Last input never, output 7w5d, output hang never
  Last input never, output 8w4d, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never
  Last input never, output never, output hang never

Be First to Comment

Leave a Reply

%d bloggers like this: