11-12-2012 12:52 PM - edited 03-07-2019 10:00 AM
Hello All,
Awhile back I did post a question about this topic but I have not been able to find the answer while searching for it. I am hoping that someone can post a way to do a variation of the "show interface | inc ???" which can provide a quick report of when which port last showed input and output traffic.
Thanks,
Adil
Solved! Go to Solution.
11-12-2012 03:25 PM
You could try:
Sh int | inc Fast|Last input
If you have gig ports, change fast to Gig.
Sh int | inc Gig|Last input
This would show you all ports. You could narrow it down by specifying the port you want:
Sh int fa0/1 | inc Last input
Hth,
John
Sent from Cisco Technical Support iPhone App
11-12-2012 03:25 PM
You could try:
Sh int | inc Fast|Last input
If you have gig ports, change fast to Gig.
Sh int | inc Gig|Last input
This would show you all ports. You could narrow it down by specifying the port you want:
Sh int fa0/1 | inc Last input
Hth,
John
Sent from Cisco Technical Support iPhone App
11-13-2012 05:20 AM
John,
That command worked perfectly. See example below..
TN-3750stack-7#show int | inc Fast|Last input
Last input 00:00:00, output 00:00:00, output hang never
FastEthernet1/0/1 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 0015.2bf4.d903 (bia 0015.2bf4.d903)
Last input never, output 00:00:01, output hang never
FastEthernet1/0/2 is down, line protocol is down (notconnect)
Hardware is Fast Ethernet, address is 0015.2bf4.d904 (bia 0015.2bf4.d904)
Last input never, output never, output hang never
Thanks,
Adil
04-07-2014 02:19 PM
You can also use show interfaces link
if you want to see those that have been down longer than a week, then
show interfaces link | i week
Regards,
Francisco
02-16-2016 02:06 AM
Hello Adil,
try this command .
show interface | include (FastEthernet|Last input)
if you use Gigabite change the fastethernet to gig. be aware cases sensative .
05-18-2016 03:55 AM
I like this
tclsh
set interfacesUNUSED [regexp -all -line -inline "^\[FGTPV]+\[A-Za-z0-9\/\-\]+|No traffic" [exec "show int account"]]
set index 0
while {$index < [llength $interfacesUNUSED]} {
set str1 [lindex $interfacesUNUSED [expr $index]]
set str2 [lindex $interfacesUNUSED [expr $index + 1]]
if {[string equal $str2 "No traffic"]} {puts -nonewline [exec "show interfaces $str1 status | e Port.*Name.*Status"]; puts -nonewline " "; puts -nonewline [exec "show int account | include $str1 "]}
set index [expr $index + 1]
}
Anyway be aware that regarding switch ports I have had some experience about the fact that the port was up and traffic counters were incrementing but at the same time "show interface" was showing "Last input never, output never, output hang never" and "show interface accounting" was showing "No traffic sent or received on this interface"
And remember to take care of both the "Last clearing of show interface counters" and the switch uptime.
03-21-2019 02:05 PM
this works perfect. is there a command for this in other switch platforms? ie 3750/3850/6500/9300/3560, etc
it seems to only be on 4500s(maybe 6500s, not certain)
i know i can do sh int | last input. but a lot of times input/output counters are not accurate. link down counters were VERY acurate
11-23-2020 05:30 PM
tnx
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide