cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
800
Views
2
Helpful
4
Replies

Last Activity Time Stamp on a switchport with the status down

Hello Everyone,

We are looking into creating an automated report with all the ports that show status down on a Cisco switch and the time stamp when was the port last active. 

We were thinking to use Ansible to extract the output from the "show interface" : Last input, output and write it into an Excel spreadsheet.

GigabitEthernet1/0/33 is down, line protocol is down 
Last input 00:51:46, output 00:50:43, output hang never

We were wondering if anybody knows any other command that would show us the time stamp other than the logs. We also have the switches in Cisco Prime and DNA, but we couldn't find any report that would give us the wanted result.

If anybody has tried this before, let us know, we are looking forward to seeing other options as well. Thank you!

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

You can use Python to get details of interface status (compare with switch uptime and generate report)

i generally run below 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 show example :

GigabitEthernet4/0/43 is down, line protocol is down (notconnect)
Last input 14w2d, output 14w2d, output hang never

DNAC you can generate report : (Run a Network Devices Report)

https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center-platform/2-3-4/user_guide/b_dnac_platform_ug_2_3_4/b_dnac_platform_ug_2_3_4_chapter_0110.html#Cisco_Task_in_List_GUI.dita_518f9b2f-cdde-42e7-b...

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

You can use Python to get details of interface status (compare with switch uptime and generate report)

i generally run below 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 show example :

GigabitEthernet4/0/43 is down, line protocol is down (notconnect)
Last input 14w2d, output 14w2d, output hang never

DNAC you can generate report : (Run a Network Devices Report)

https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center-platform/2-3-4/user_guide/b_dnac_platform_ug_2_3_4/b_dnac_platform_ug_2_3_4_chapter_0110.html#Cisco_Task_in_List_GUI.dita_518f9b2f-cdde-42e7-b...

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thanks BB! We are going to try that.

Leo Laohoo
Hall of Fame
Hall of Fame

@DLSDOLTOperations wrote:
GigabitEthernet1/0/33 is down, line protocol is down 
Last input 00:51:46, output 00:50:43, output hang never

There are some IOS/IOS-XE versions which will render this output useless because of bugs. 

We use AKiPS daily to map out unused ports.  It is reliable and takes less than five seconds to map out a full stack of switch.

Thank you Leo! We are looking into methods that are independent of any other external tool, we are already monitoring the switches in DNAC and Prime but the reports found there weren't necessarily what we needed.

Review Cisco Networking for a $25 gift card