[portstat] Add FEC FLR statistics support to port counters #4054
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support to view FEC FLR (Frame Loss Ratio) statistics in
port counter statistics.
This includes
can be verified by viewing fec-stats either by
portstat -f
orshow interfaces counters fec-stats
Feature HLD : port_fec_flr.md
What I did
Added FEC FLR (Frame Loss Ratio) statistics support to port counters display, including both actual and predicted FLR values.
How I did it
Added format_fec_flr() function to format FLR values consistently
Extended header_fec_only to include FEC_FLR and FEC_FLR_PREDICTED columns
Updated RateStats namedtuple to include fec_flr and fec_flr_predicted fields
Modified port statistics collection to retrieve FLR values from CHASSIS_STATE_DB
Updated display formatting to show FLR columns in fec-stats output
How to verify it
Run show interfaces counters fec-stats command and verify the output includes the new FEC_FLR and FEC_FLR_PREDICTED columns with properly formatted values.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)