cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
320551
Views
75
Helpful
10
Replies

how to clear the interfaces counter in cisco switches

I need to monitor the number of packet drops per day, when I was using command " show int | inc line | drops " showing overall drops of the interface.

But I've already cleared this packet drop issue. So I need help to clear all the previous drop values. So please advise to help me.

2 Accepted Solutions

Accepted Solutions

Leo Laohoo
Hall of Fame
Hall of Fame

To clear ALL interface counters:  clear count [Enter]

To clear one specific interface counter:  clear count <PORT> [Enter]

View solution in original post

Hi Khaleel,

There is nothing harm to your devices running the following commands.

clear counters >> This will clear counters values for all the interfaces.

Clear counter int g1/0 -- this will clear only for one particular interface.

 (this will clear the values which are on the interfaces:-

Input/output drops counters value

CRC/Input/outut errors.)

 

No need to worry to run these command on the production network. It just clear the counters of the interfaces and does nothing harm to the traffic flowing.

 

example:-

#show int g5/1 | in up|drops
GigabitEthernet5/1 is up, line protocol is up (connected)
  Full-duplex, 1000Mb/s, media type is SX
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 608766710 >> Drops are seen.

I did clear counters and now you can see the tod value is o.

#clear counters gigabitEthernet 5/1
Clear "show interface" counters on this interface [confirm]

#show int g5/1 | in up|drops
GigabitEthernet5/1 is up, line protocol is up (connected)
  Full-duplex, 1000Mb/s, media type is SX
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0 >> it is 0 now.

 

 

No issues with my traffic.

 

HTH

Regards

Inayath

*Please dont forget to rate if this info is helpfull.

 

View solution in original post

10 Replies 10

Leo Laohoo
Hall of Fame
Hall of Fame

To clear ALL interface counters:  clear count [Enter]

To clear one specific interface counter:  clear count <PORT> [Enter]

If I could use the command "clear counter" is there any other problems  to occur.

Hi Khaleel,

There is nothing harm to your devices running the following commands.

clear counters >> This will clear counters values for all the interfaces.

Clear counter int g1/0 -- this will clear only for one particular interface.

 (this will clear the values which are on the interfaces:-

Input/output drops counters value

CRC/Input/outut errors.)

 

No need to worry to run these command on the production network. It just clear the counters of the interfaces and does nothing harm to the traffic flowing.

 

example:-

#show int g5/1 | in up|drops
GigabitEthernet5/1 is up, line protocol is up (connected)
  Full-duplex, 1000Mb/s, media type is SX
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 608766710 >> Drops are seen.

I did clear counters and now you can see the tod value is o.

#clear counters gigabitEthernet 5/1
Clear "show interface" counters on this interface [confirm]

#show int g5/1 | in up|drops
GigabitEthernet5/1 is up, line protocol is up (connected)
  Full-duplex, 1000Mb/s, media type is SX
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0 >> it is 0 now.

 

 

No issues with my traffic.

 

HTH

Regards

Inayath

*Please dont forget to rate if this info is helpfull.

 

Hi Inayath,

 

Your replay is more useful to myself

herewith I've attached the implementation log for your reference.

thanking you

 

Regards,

 

Khaleelur Rahman

 

Looks clean now :-)

 

Thank you sir , much appreciated

I have applied this it works, just kindly confirm by doing this resolves the issue by which it occurs or it can occur again

kindly let me know if this occurs by fiber cable or SFP or any other issue can cause this. 

mohamed hosseny
Level 1
Level 1

check the below commend

 

Switch#show interfaces Gi1/10 | in CRC

jiarluo
Cisco Employee
Cisco Employee

Hi team,

Is there any documentation to support the claim that this command will not affect traffic?

The command to clear the counters will not affect traffic.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card