08-25-2009 08:56 AM - edited 03-06-2019 07:25 AM
All,
Is there a way to see the last time a switchport was active/connected? I have a 48 port switch with all ports connected to the patch panel but only about 20 ports are active. I would like to see when the last time a port was active so I know if it is safe to use the port for another purpose. Not sure if there are any logs to view to see this. Thanks for any help.
Ken
Solved! Go to Solution.
08-25-2009 09:19 AM
There are a couple of ways that I know of:
sh int g0/1 summary
sh int g0/1 | inc 5 minute|Last input
The last one will show you when the last frame was received on the port:
Last input never, output 00:00:01, output hang never
5 minute input rate 615000 bits/sec, 53 packets/sec
5 minute output rate 79000 bits/sec, 94 packets/sec
HTH,
John
08-25-2009 09:19 AM
There are a couple of ways that I know of:
sh int g0/1 summary
sh int g0/1 | inc 5 minute|Last input
The last one will show you when the last frame was received on the port:
Last input never, output 00:00:01, output hang never
5 minute input rate 615000 bits/sec, 53 packets/sec
5 minute output rate 79000 bits/sec, 94 packets/sec
HTH,
John
08-25-2009 09:24 AM
Thanks John. This is what I needed. Do you know if you can view a range of interfaces this way?
08-25-2009 09:28 AM
Hmm, only way that I know how would be to show all interfaces and then filter the same results but include interface names like:
sh int | inc 5 minute|Last input|line protocol
That should show you all interfaces, but as far as using a range, I don't think it can be done with a show command like "show int range etc."
HTH,
John
08-25-2009 09:37 AM
Is there a MIB to easily pull this info via SNMP?
09-05-2009 08:10 AM
Be aware, though, that in some switches a bug (in hardware, as far as I know)makes this unuable, because the show command always says last input never, even though you can see a lot of data passing through.
So in other words, it's unfortunately not always a help for you do do like that.
Another safer way to do it is to clear the counters and then look again at a later time to see if they have incremented or still are at zero.
HTH
09-06-2009 02:47 PM
If you have a 4500-based chassis or 4900 switch, you can use the sh interface link:
Gi1/13 13 weeks, 23 hours, 41 minutes 42 secs 23:03:52 Sat Jun 6 2009
Hope this helps.
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