Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Clear Counters

Clear Counters

Clear Counters

Hai All

   Iam new to the forum can any one explain me

the command

Clear counters

its exactly for wat purpose plz explain me


RE: Clear Counters

any suggestions

RE: Clear Counters

   This clears all the counters you see when you do a like a show interface command on a IOS box .  When do a show interface command it will tell you when the last time the counters were cleared .   This clears interface errors,crc's packet counters etc...

RE: Clear Counters

You can clear the counters on al linterfces at once with the command, or you can specify a particular interface and clear the counters on just that interface.

Here are the examples:

Router#clear counters
Clear "show interface" counters on all interfaces [confirm]

Router#clear counters s0/0
Clear "show interface" counters on this interface [confirm]

RE: Clear Counters

When you issue a "show interface <interface>" it will display the statistics for the interface selected:

GigabitEthernet1/0 is up, line protocol is up
  Hardware is GigMac 3 Port GigabitEthernet, address is 000b.bf2e.9100 (bia 000b.bf2e.9100)
  Internet address is VVV.XXX.YYY.ZZZ
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, rely 255/255, load 13/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex mode, link type is force-up, media type is SX
  output flow-control is unsupported, input flow-control is off
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:00, output 00:00:00, output hang never
  Last clearing of "show interface" counters 14w2d
  Queueing strategy: random early detection (WRED)
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 24283000 bits/sec, 9653 packets/sec
  5 minute output rate 53901000 bits/sec, 10016 packets/sec
     42635042229 packets input, 15110789127436 bytes, 0 no buffer
     Received 155 broadcasts, 0 runts, 1123639 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 3586458 multicast, 0 pause input
     41129255803 packets output, 26839029196142 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 babbles, 0 late collision, 0 deferred
     1 lost carrier, 0 no carrier, 0 pause output
     0 output buffer failures, 0 output buffers swapped out

As you can see, it has several counters which increment when the corresponding traffic matches. When you are troubleshooting, it is useful to have a reference value for this counters. That's when the "clear counters <interface>" command comes handy, because it resets all counters so it is easier for you to determine which counters are incrementing.

RE: Clear Counters

thanks for u replies and as i saw in the output i can see

1123639 giant packets so this will be also cleared right

 once again thanks for u r replies


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close