09-06-2015 03:51 AM - edited 03-08-2019 01:39 AM
hi dears
i have a nexus switch 5548UP and a fexfabric 2248.
i want to recognize which one of fex fabric2248 interfaces has CRC other than zero (i want name of interfaces ) .
with this command (for example : sh int | inc "CRC 1") i couldn't get an appropriate result .
would you please guide me to find a handy command for this purpose
thanks in advance
09-06-2015 06:21 AM
Hi,
You can have an OR (|) within an expression, and also have more than a single pipe (|) on a command line so something along the lines of the following:
show interface | include "^Ethernet|CRC" | exclude "0 CRC"
This is still not perfect as it includes all interface names, not only those for the FEX, and includes them irrespective of whether there are CRC or not. For example:
c5k-1# show interface | include "^Ethernet|CRC" | exclude "0 CRC" Ethernet1/1 is up Ethernet1/2 is up [...] Ethernet101/1/31 is down (SFP not inserted) Ethernet101/1/32 is down (SFP not inserted)
If you really only want to see the interface name for FEX interfaces then you can change the regular expression to only include a range of interface numbers e.g., "^Ethernet1[0-9][0-9]" would only show Ethernet100 to Ethernet199 i.e., all interfaces that are part of a FEX. The problem is that this still includes the CRC line for any non FEX interfaces.
Not ideal, but slightly better :-)
Regards
09-06-2015 06:21 AM
hi steve
thanks for your response
i used it but it's output was a list of my all interfaces such as Ethernets,port channels and fex ports .
is there any condition command that shows me the list of interfaces with CRC unequal zero ?
thanks
09-06-2015 11:34 PM
Hi,
The reason the above command string only showed a list of your interfaces is that there were no interfaces with any CRC errors. That is the function of the exclude "0 CRC" part of the command. If an interface had an error it would have appeared as follows:
[..] Ethernet101/1/1 is up 0 runts 0 giants 23 CRC 0 no buffer Ethernet101/1/2 is up Ethernet101/1/3 is up [..]
There are other options such as show interface counters errors to which there are keywords of fex e.g., show interface counters errors fex 100, but this aso gives a list of all interfaces including those with zero errors. You would still need to pipe to output to an include or exclude to remove unwanted output.
As far as I'm aware, in NX-OS, there is no command option to only give you non zero error counters.
Regards
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide