Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Switchport Monitoring

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Switchport Monitoring

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

HTH, John *** Please rate all useful posts ***
6 REPLIES

Re: Switchport Monitoring

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

HTH, John *** Please rate all useful posts ***
New Member

Re: Switchport Monitoring

Thanks John. This is what I needed. Do you know if you can view a range of interfaces this way?

Re: Switchport Monitoring

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

HTH, John *** Please rate all useful posts ***
New Member

Re: Switchport Monitoring

Is there a MIB to easily pull this info via SNMP?

Bronze

Re: Switchport Monitoring

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

Hall of Fame Super Gold

Re: Switchport Monitoring

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.

125
Views
0
Helpful
6
Replies