Skip to content

Show error message when FEC histogram is not available#4308

Open
eder-arista wants to merge 1 commit intosonic-net:masterfrom
eder-arista:master-show-fec-hist
Open

Show error message when FEC histogram is not available#4308
eder-arista wants to merge 1 commit intosonic-net:masterfrom
eder-arista:master-show-fec-hist

Conversation

@eder-arista
Copy link

When the SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S[0-15] counter is not available on COUNTERS_DB, the command show interfaces counters fec-histogram prints all bins with value equals zero without any error message. This change fixes this behavior.

What I did

Modified the output of show interfaces counters fec-histogram command when the histogram bins data are not found in the COUNTERS_DB (this is likely to be a bug on modular switches which is under investigation on a separate topic).

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

$ show interfaces counters fec-histogram Ethernet104 -n asic0
Symbol Errors Per Codeword      Codewords
----------------------------  -----------
BIN0                                    0
BIN1                                    0
BIN2                                    0
BIN3                                    0
BIN4                                    0
BIN5                                    0
BIN6                                    0
BIN7                                    0
BIN8                                    0
BIN9                                    0
BIN10                                   0
BIN11                                   0
BIN12                                   0
BIN13                                   0
BIN14                                   0
BIN15                                   0

New command output (if the output of a command-line utility has changed)

$ show interfaces counters fec-histogram Ethernet104 -n asic0
Symbol Errors Per Codeword    Codewords
----------------------------  -----------
BIN0                          UNDEFINED
BIN1                          UNDEFINED
BIN2                          UNDEFINED
BIN3                          UNDEFINED
BIN4                          UNDEFINED
BIN5                          UNDEFINED
BIN6                          UNDEFINED
BIN7                          UNDEFINED
BIN8                          UNDEFINED
BIN9                          UNDEFINED
BIN10                         UNDEFINED
BIN11                         UNDEFINED
BIN12                         UNDEFINED
BIN13                         UNDEFINED
BIN14                         UNDEFINED
BIN15                         UNDEFINED
FEC histogram data for port Ethernet104 not found

When the SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S[0-15] counter is not
available on COUNTERS_DB, the command `show interfaces fec-histogram` prints
all bins with value equals zero without any error message. This change fixes
this behavior.

Signed-off-by: eder <eder@arista.com>
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 26, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: eder-arista / name: eder (26edbb4)

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants