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.
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