cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2262
Views
5
Helpful
6
Replies

detect CRC counters in IOS

Thomas.Meyer
Level 1
Level 1

I'm trying to setup a IOS command that will only output

lines when there are non zery CRC counters.

Step 1 ... list CRC counters

Switch#show interfaces | include CRC
 
Step 2 ... filter out all zery counters

Switch#show interfaces | include CRC | exclude ", 0 CRC,"

Such a "double pipe" works on NXOS, but it does not seem to be supported in IOS.

Can you offer help for this detection stmt?

Thanks, Thomas

2 Accepted Solutions

Accepted Solutions

Vinod Arya
Cisco Employee
Cisco Employee

It works on the newer version of IOS. I have 6500 running 12.33.SXI7 and multiple pipe works on it.

For old IOS's, you can try to deply a TCL script which can enable support for multiple Pipe. Script is available here :

https://supportforums.cisco.com/document/75956/multiple-pipe-support

For any support on this script, you have to contact the owner on the same thread. 

As another option, you can try to poll your device with SNMP and fetch CRC errors on interfaces, using OID locIfInCRC.

-Thanks

Vinod

-Thanks Vinod **Rating Encourages contributors, and its really free. **

View solution in original post

lgilrued
Cisco Employee
Cisco Employee

Hello, Thomas.

As a workaround we can use regex.

C4507-sup7#
C4507-sup7#!show interfaces with regex including all matches with "CRC"  
C4507-sup7#
C4507-sup7#show interfaces | include CRC
<output omitted>
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     204145 input errors, 190170 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
<output omitted>
C4507-sup7#
C4507-sup7#!show interfaces with regex including all matches with "input errors, 0 CRC"
C4507-sup7#!but excluding all "0 CRC" after the "input errors, "
C4507-sup7#
C4507-sup7#show interfaces | include input errors, [^0 CRC]
     204145 input errors, 190170 CRC, 0 frame, 0 overrun, 0 ignored
C4507-sup7#
C4507-sup7#
 
It is not pretty from a programming point of view but it serves our purposes.
 
I hope this is useful!
 
Luis Gil

View solution in original post

6 Replies 6

Vinod Arya
Cisco Employee
Cisco Employee

It works on the newer version of IOS. I have 6500 running 12.33.SXI7 and multiple pipe works on it.

For old IOS's, you can try to deply a TCL script which can enable support for multiple Pipe. Script is available here :

https://supportforums.cisco.com/document/75956/multiple-pipe-support

For any support on this script, you have to contact the owner on the same thread. 

As another option, you can try to poll your device with SNMP and fetch CRC errors on interfaces, using OID locIfInCRC.

-Thanks

Vinod

-Thanks Vinod **Rating Encourages contributors, and its really free. **

Thanks Vinod, very well!

we recently installed a new C2960XR, and this has 15.0(2)EX5, but does not appear to support multiple pipes. So, perhaps this features is more a question of which IOS edition but recency of version?

 

Thanks and regards, Thomas

furthermore, my IOS appears not to know the command "show event manager version", nor the "event manager" configuration commands, which are required for installing cl_multi_pipe.tcl. :-(

 

I checked the Image version and seems this IOS code doesnt supports EEM. You can check the feature navigator to see if any version supported on this Platform will be able to run EEM. You can access Cisco Feature Navigator here :

http://tools.cisco.com/ITDIT/CFN/jsp/index.jsp

-Thanks

Vinod

-Thanks Vinod **Rating Encourages contributors, and its really free. **

lgilrued
Cisco Employee
Cisco Employee

Hello, Thomas.

As a workaround we can use regex.

C4507-sup7#
C4507-sup7#!show interfaces with regex including all matches with "CRC"  
C4507-sup7#
C4507-sup7#show interfaces | include CRC
<output omitted>
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     204145 input errors, 190170 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
<output omitted>
C4507-sup7#
C4507-sup7#!show interfaces with regex including all matches with "input errors, 0 CRC"
C4507-sup7#!but excluding all "0 CRC" after the "input errors, "
C4507-sup7#
C4507-sup7#show interfaces | include input errors, [^0 CRC]
     204145 input errors, 190170 CRC, 0 frame, 0 overrun, 0 ignored
C4507-sup7#
C4507-sup7#
 
It is not pretty from a programming point of view but it serves our purposes.
 
I hope this is useful!
 
Luis Gil

Thomas.Meyer
Level 1
Level 1

Luis,

thanks for sharing this idea.

I think your example is a little bit misleading, because, in the brackets, you have a set of characters. You could equally have written "show interfaces | include input errors, [^RC0 ]"

So, I think the following variant should be both readable and functional: it will not list any CRC numbers that start with a 0 (effectively all non-zero values)

sw01#show interfaces | include input errors, [^0][0-9]* CRC
     2 input errors, 1 CRC, 1 frame, 0 overrun, 0 ignored
sw01#

or

sw01#show interfaces | include input errors, [1-9][0-9]* CRC
     2 input errors, 1 CRC, 1 frame, 0 overrun, 0 ignored
sw01#

Thanks, Thomas

Review Cisco Networking for a $25 gift card