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

I am trying to find out what ports we can disconnect. There are a lot of ports showing "not connected" with no activity but we have hundreds of switches and my boss is too afraid to pull cords unless were 100% sure its not in use. If anyone knows a great way I would love to hear it. I have been using sh int count | in 0 + 0 + 0 but I think that is just current packets in and out?

  • You should clear the counters, then check back after a certain period of time (a week, two weeks, month?) to see if the interfaces have been used.
    – Ron Maupin
    Aug 31, 2016 at 19:58
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 15, 2017 at 1:06

3 Answers 3


We have monitoring in place via an snmp based nms from which we can run reports on what hasn't/has been used over a time period. If a port hasn't been used in over 3 months, then we reclaim it for someone else to use.

Your commands as shown in your post actually works ok on a 3750.

I guess not removing the cabling but disabling the unused ports may be an option in the interim. Then only re-enable as per client request.


show interface history

To display histograms of interface utilization, use the showinterfacehistory command in privileged EXEC mode.

show interface [ type number ] history [ all | 60sec | 60min | 72hour ] [ both | input | output ]

enter image description here


Currently I'm using a PHP Script which polls the status of all ports + some extra infos like mac connected, etc. from all our cisco switches via snmp and saves this data into a mysql database.

With some extra info from some arp tables you can get a great overview which port was in use by a certain end-device at a certain date / time and when a port was up the last time.

Maybe you could think of a similar solution for your company.

The solution mentioned in the comment above is also a simple way to do the job if you need a quick solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.