cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Switchport Reclaim Unused Down Report

1233
Views
7
Helpful
2
Comments

I've taken a first stab at creating an Cisco Prime LAN Management Solution-like switchport unused down report using APIC-EM as the main data provider.  This report produces a list of switchports that are administratively up but operationally down for a specific number of days (default is 30).  This makes use of the APIC-EM REST interface to obtain a list of devices and their credentials.  It works with the GA version of the controller.

This is a Python script that requires the following Python modules:

sqlite3 (SQLite is the database used to cache port last-up times)

paramiko (SSH client)

requests (REST library)

json

urllib

This script can be found in my SVN repo at [marcuscom] Log of /switchports-reports/sw-reports.py .  Looking for feedback as I continue to evolve the work.

Comments
Community Member

Please let me know what is the benefit ,as the cables are already patched up to this ports either used or not used the number of ports connection will remain same

Hall of Fame Cisco Employee

This report could be used for a number of purposes.  One is to understand that if I have ports patched in offices that are unused, I may be able to repatch them to places where they are needed.  For example, in my office I have two ports that are "hot."  I may not be using both of them, so using this report, an administrator could see that one is unused and move the patch to another office where it is needed.

I may also have a whole switch that is unused, and I can power it down to save energy.

I might also want to move unused ports into a quarantined VLAN or shut them down if they have gone unused for an extended period of time in order to avoid a potential security attack on the network.

This widget could not be displayed.