Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear Counters

Status
Not open for further replies.
Feb 21, 2005
25
SA
Hai All

Iam new to the forum can any one explain me

the command

Clear counters

its exactly for wat purpose plz explain me

thanks
carlos
 
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...
 
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]
Router#
 
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.
 
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

carlos

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top