Is there a way to get get a report of switchports not used in a specific period of time? (a reclaim switchport report)?
I have a report I created for just this and other reasons.
The pre-reqs are the nodes are configured for NCM backup and are successfully backing up.
Code is:
SELECT NodeCaption AS [Device Name], AgentIP AS [Device IP], COUNT( CASE WHEN n.Interfaces.OperStatus = 'Up' THEN 1 ELSE NULL END ) AS [Oper Up], COUNT( CASE WHEN n.Interfaces.OperStatus = 'Down' THEN 1 ELSE NULL END ) AS [Oper Down], COUNT( n.Interfaces.AdminStatus ) AS [Total] FROM NCM.Nodes nWHERE n.Interfaces.PhysicalInterface = 'Y' AND ( NodeCaption LIKE '%-DS%' OR NodeCaption LIKE '%VSS%' OR NodeCaption LIKE '%HQ-CR%'GROUP BY NodeCaption, AgentIPORDER BY NodeCaption
You may be able to remove the following lines as we require this for a particular client:
AND ( NodeCaption LIKE '%-DS%' OR NodeCaption LIKE '%VSS%' OR NodeCaption LIKE '%HQ-CR%'
And it looks like this:
You can run this daily, weekly, monthly as needs fit and then manipulate the results in Excel to show changes between current and last run.
To obtain reports on unused switch ports within a specific period of time, you usually need to configure and monitor the switch and collect relevant data for analysis. Here are a few possible steps and considerations:
Log in to the switch:Log in to the switch using the command line interface (CLI) or graphical user interface (GUI). The specific method depends on the switch model and configuration.
Configure port monitoring:Depending on the switch model and configuration, you may need to configure SNMP (Simple Network Management Protocol) or other monitoring tools to collect port usage data.
Data collection:Within a specific period of time, collect status information of all ports through SNMP or other monitoring tools, including which ports are active and which ports are idle.
analyze data:Import the collected data into a data analysis tool, or write a script to filter out ports that have not been used within a specific time period.
Generate report:Based on the results of the analysis, generate a report listing unused ports and their related information within a specific period of time;If anything is unclear you can check out the blog here for more information...