Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FEC correctable and uncorrectable port stats #2027

Merged
merged 7 commits into from
Aug 4, 2022
Merged

Conversation

prgeor
Copy link
Contributor

@prgeor prgeor commented Jan 20, 2022

ADO: 24531597

Signed-off-by: Prince George prgeor@microsoft.com

Added command line option to see FEC correctable, uncorrectable errors and symbol errors(aggregate of all lanes)

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

admin@sonic:~$ show interfaces counters --help
Usage: show interfaces counters [OPTIONS] COMMAND [ARGS]...

  Show interface counters

Options:
  -a, --printall
  -p, --period TEXT
  -i, --interface TEXT
  -d, --display [all]   Show internal interfaces  [default: all]
  -n, --namespace []    Namespace name or all
  --verbose             Enable verbose output
  -?, -h, --help        Show this message and exit.

Commands:
  detailed   Show interface counters detailed
  errors     Show interface counters errors
  fec-stats  Show interface counters fec-stats            <<<<
  rates      Show interface counters rates
  rif        Show interface counters
admin@sonic:~$ 
root@sonic:~# show interfaces counters fec-stats 
Last cached time was 2022-07-29 19:34:08.919717
      IFACE    STATE    FEC_CORR    FEC_UNCORR    FEC_SYMBOL_ERR
-----------  -------  ----------  ------------  ----------------
  Ethernet0        U     136,403            34                40
  Ethernet8        D           0             0                 0
 Ethernet16        U           0             0                 0
 Ethernet24        D           0             0                 0
 Ethernet32        D           0             0                 0
 Ethernet40        D           0             0                 0
 Ethernet48        D           0             0                 0
 Ethernet56        D           0             0                 0
 Ethernet64        D           0             0                 0
 Ethernet72        D           0             0                 0
 Ethernet80        D           0             0                 0
 Ethernet88        D           0             0                 0
 Ethernet96        D           0             0                 0
Ethernet104        D           0             0                 0
Ethernet112        D           0             0                 0
Ethernet120        D           0             0                 0
Ethernet128        D           0             0                 0
Ethernet136        D           0             0                 0
Ethernet144        D           0             0                 0
Ethernet152        D           0             0                 0
Ethernet160        D           0             0                 0
Ethernet168        D           0             0                 0
Ethernet176        D           0             0                 0
Ethernet184        D           0             0                 0
Ethernet192        D           0             0                 0
Ethernet200        D           0             0                 0
Ethernet208        D           0             0                 0
Ethernet216        D           0             0                 0
Ethernet224        D           0             0                 0
Ethernet232        D           0             0                 0
Ethernet240        D           0             0                 0
Ethernet248        D           0             0                 0
Ethernet256        D         N/A           N/A               N/A
Ethernet260        D         N/A           N/A               N/A
root@sonic:~#
root@sonic:~# show interfaces counters fec-stats -p 15
The rates are calculated within 15 seconds period
      IFACE    STATE    FEC_CORR    FEC_UNCORR    FEC_SYMBOL_ERR
-----------  -------  ----------  ------------  ----------------
  Ethernet0        U       6,000             0                 5
  Ethernet8        D           0             0                 0
 Ethernet16        U           0             0                 0
 Ethernet24        D           0             0                 0
 Ethernet32        D           0             0                 0
 Ethernet40        D           0             0                 0
 Ethernet48        D           0             0                 0
 Ethernet56        D           0             0                 0
 Ethernet64        D           0             0                 0
 Ethernet72        D           0             0                 0
 Ethernet80        D           0             0                 0
 Ethernet88        D           0             0                 0
 Ethernet96        D           0             0                 0
Ethernet104        D           0             0                 0
Ethernet112        D           0             0                 0
Ethernet120        D           0             0                 0
Ethernet128        D           0             0                 0
Ethernet136        D           0             0                 0
Ethernet144        D           0             0                 0
Ethernet152        D           0             0                 0
Ethernet160        D           0             0                 0
Ethernet168        D           0             0                 0
Ethernet176        D           0             0                 0
Ethernet184        D           0             0                 0
Ethernet192        D           0             0                 0
Ethernet200        D           0             0                 0
Ethernet208        D           0             0                 0
Ethernet216        D           0             0                 0
Ethernet224        D           0             0                 0
Ethernet232        D           0             0                 0
Ethernet240        D           0             0                 0
Ethernet248        D           0             0                 0
Ethernet256        D         N/A           N/A               N/A
Ethernet260        D         N/A           N/A               N/A
root@sonic:~# 

@prgeor
Copy link
Contributor Author

prgeor commented Jan 30, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan
Copy link
Contributor

lguohan commented Feb 2, 2022

please add -v option to print out those column, not sure we should print them out by default.

@prgeor
Copy link
Contributor Author

prgeor commented Mar 1, 2022

please add -v option to print out those column, not sure we should print them out by default.

will add new option "fec-errors"

Signed-off-by: Prince George <prgeor@microsoft.com>
Signed-off-by: Prince George <prgeor@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Jul 30, 2022

This pull request introduces 1 alert when merging 397df8b into 6de18a1 - view on LGTM.com

new alerts:

  • 1 for Wrong number of arguments in a call

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 3, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@lgtm-com
Copy link

lgtm-com bot commented Aug 3, 2022

This pull request introduces 1 alert when merging 419f739 into c6794b5 - view on LGTM.com

new alerts:

  • 1 for Wrong number of arguments in a call

lguohan
lguohan previously approved these changes Aug 3, 2022
@prgeor prgeor merged commit 7919077 into sonic-net:master Aug 4, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Aug 9, 2022
Update sonic-utilities submodule pointer to include the following:
* Fix GCU bug when backend service modifying config ([sonic-net#2295](sonic-net/sonic-utilities#2295))
* Fix issues for sonic_installer upgrade-docker and sonic_installer rollback-docker ([sonic-net#2278](sonic-net/sonic-utilities#2278))
* [crm] add checking for CRM interval range ([sonic-net#2293](sonic-net/sonic-utilities#2293))
* Fix the issue that sonic_platform is not installed on vs image ([sonic-net#2300](sonic-net/sonic-utilities#2300))
* Add FEC correctable and uncorrectable port stats ([sonic-net#2027](sonic-net/sonic-utilities#2027))
* Add CLI to configure YANG config validation ([sonic-net#2147](sonic-net/sonic-utilities#2147))
* Add override testcase to verify removal ([sonic-net#2288](sonic-net/sonic-utilities#2288))
* Fix version in db_migrator  for  ([sonic-net#2289](sonic-net/sonic-utilities#2289))
* [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB ([sonic-net#2223](sonic-net/sonic-utilities#2223))
* Transfer organization from Azure to sonic-net ([sonic-net#2284](sonic-net/sonic-utilities#2284))
* [watermarkstat] Fix CLI script for unconfigured PG counters ([sonic-net#2239](sonic-net/sonic-utilities#2239))
* Improve the way to check port type of RJ45 port ([sonic-net#2249](sonic-net/sonic-utilities#2249))

Signed-off-by: dprital <drorp@nvidia.com>
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Nov 21, 2022
* Add FEC correctable and uncorrectable port stats

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failures

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failure

* Added separate command for fec stats

* Fix test failure

* Fix LGTM warning

* Improve code coveraged
lukasstockner pushed a commit to genesiscloud/sonic-utilities that referenced this pull request Mar 14, 2023
* Add FEC correctable and uncorrectable port stats

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failures

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failure

* Added separate command for fec stats

* Fix test failure

* Fix LGTM warning

* Improve code coveraged
lukasstockner pushed a commit to genesiscloud/sonic-utilities that referenced this pull request Mar 31, 2023
* Add FEC correctable and uncorrectable port stats

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failures

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failure

* Added separate command for fec stats

* Fix test failure

* Fix LGTM warning

* Improve code coveraged
lukasstockner pushed a commit to genesiscloud/sonic-utilities that referenced this pull request Apr 2, 2023
* Add FEC correctable and uncorrectable port stats

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failures

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failure

* Added separate command for fec stats

* Fix test failure

* Fix LGTM warning

* Improve code coveraged
@prgeor
Copy link
Contributor Author

prgeor commented Jul 13, 2023

@yxieca can you help cherry pick this to 202205?

@prgeor
Copy link
Contributor Author

prgeor commented Jul 13, 2023

@StormLiangMS can you help cherry pick this to 202305?

yxieca pushed a commit that referenced this pull request Jul 13, 2023
* Add FEC correctable and uncorrectable port stats

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failures

Signed-off-by: Prince George <prgeor@microsoft.com>

* fix pytest failure

* Added separate command for fec stats

* Fix test failure

* Fix LGTM warning

* Improve code coveraged
@StormLiangMS
Copy link
Contributor

@prgeor cherry pick to 202305 got conflicts, could you resubmit PR to 202305?

@prgeor
Copy link
Contributor Author

prgeor commented Jul 19, 2023

@StormLiangMS the code changes are already in 202305

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

Successfully merging this pull request may close these issues.

4 participants