[action] [PR:3721] [show][interface] Add changes for show interface errors command#3749
Merged
mssonicbld merged 1 commit intosonic-net:202411from Feb 3, 2025
Merged
Conversation
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "closes #xxxx",
"fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
issue when the PR is merged.
If you are adding/modifying/removing any command or utility script, please also
make sure to add/modify/remove any unit tests from the tests
directory as appropriate.
If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
subcommand, or you are adding a new subcommand, please make sure you also
update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
your changes.
Please provide the following information:
-->
####
MSFT ADO 30169175
#### What I did
This pull request introduces a new subcommand to the show interfaces command, allowing users to view error statistics for network interfaces. The new errors subcommand displays a table of potential interface errors, including error types, counts, and the last timestamp (in UTC) when the error occurred. If an error has not been encountered, the count defaults to 0, and the timestamp is displayed as Never. This change helps users easily identify any issues with their network interfaces and track error occurrences.
#### How I did it
To implement the errors subcommand, added a new command handler to the show/interfaces/__init__.py file. The handler retrieves the error data for a specified interface from the PORT_OPERR_TABLE in the database. The error types are predefined in a list, and for each type, the count and timestamp are pulled from the table. The results are then formatted into a table using the tabulate library, sorted alphabetically by error type.
#### How to verify it
UT and running the changes on a testbed
#### 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)
```
admin@sonic$ show int errors Ethernet76
Port Errors Count Last timestamp(UTC)
---------------------------- ------- ---------------------
code group error 0 Never
crc rate 0 Never
data unit crc error 0 Never
data unit misalignment error 0 Never
data unit size 0 Never
fec alignment loss 0 Never
fec sync loss 0 Never
high ber error 0 Never
high ser error 0 Never
mac local fault 0 Never
mac remote fault 7908 2025-01-17 19:34:13
no rx reachability 0 Never
oper error status 0 Never
signal local error 0 Never
```
Collaborator
Author
|
Original PR: #3721 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#110) ```<br>* f74f5b60 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-08) [Sonic Automation] * 04b60e2 - (origin/202411) Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#112) ```<br>* 8ece3030 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-10) [Sonic Automation] * 04b60e2 - (origin/202411) Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#113) ```<br>* 99a0a1ec - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-11) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#114) ```<br>* 755dbeac - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-12) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#115) ```<br>* fef2da88 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-13) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#116) ```<br>* 0d1f3ac2 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-14) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#119) ```<br>* 9c98fdfd - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-15) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#120) ```<br>* cd0bfdd9 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-16) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#121) ```<br>* b9b6b954 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-17) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#123) ```<br>* 8b1a33a2 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-18) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#124) ```<br>* 2d8be95a - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-19) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#125) ```<br>* bcb62531 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-20) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#127) ```<br>* 92e8cbdf - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-21) [Sonic Automation] * 8ceba38 - (origin/202411) [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#129) ```<br>* b8005f45 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-22) [Sonic Automation] * 5cc1012 - (origin/202411) [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#130) ```<br>* b188342f - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-23) [Sonic Automation] * 5cc1012 - (origin/202411) [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#131) ```<br>* c2212e18 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-24) [Sonic Automation] * 5cc1012 - (origin/202411) [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#132) ```<br>* e2d7d823 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-25) [Sonic Automation] * 5cc1012 - (origin/202411) [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#133) ```<br>* d3c0f199 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-26) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#134) ```<br>* 4ed8d537 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-27) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#135) ```<br>* b7fbd2f9 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-28) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#136) ```<br>* 18421ce7 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-28) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#137) ```<br>* e7e4b43e - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-28) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#138) ```<br>* 56575f75 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-01) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#139) ```<br>* 52ecaa98 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-02) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#140) ```<br>* 3aca3f41 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-03) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#141) ```<br>* 9cd1472c - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-04) [Sonic Automation] * c01a4f5 - (origin/202411) Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#142) ```<br>* 042c5555 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-05) [Sonic Automation] * c01a4f5 - (origin/202411) Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#143) ```<br>* c3f000e1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-06) [Sonic Automation] * 7f316e7 - (origin/202411) revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#144) ```<br>* 9e5d5844 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-07) [Sonic Automation] * 7f316e7 - (origin/202411) revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#146) ```<br>* 11ad3ff8 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-08) [Sonic Automation] * 357f95d - (origin/202411) enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#147) ```<br>* f8a5fd39 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-09) [Sonic Automation] * 357f95d - (origin/202411) enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#148) ```<br>* 39c170e9 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-10) [Sonic Automation] * 357f95d - (origin/202411) enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#149) ```<br>* 8af724a1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-11) [Sonic Automation] * 7a3f4ad - (origin/202411) Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#150) ```<br>* fb5b4862 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-12) [Sonic Automation] * 7a3f4ad - (origin/202411) Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#151) ```<br>* 93d21bc1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-13) [Sonic Automation] * 04bc01d - (origin/202411) [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#152) ```<br>* e45cc495 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-14) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#154) ```<br>* 94af3eab - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-15) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#155) ```<br>* 4e7f14b1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-16) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
```<br>* dcf6214 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-17) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
MSFT ADO 30169175
What I did
This pull request introduces a new subcommand to the show interfaces command, allowing users to view error statistics for network interfaces. The new errors subcommand displays a table of potential interface errors, including error types, counts, and the last timestamp (in UTC) when the error occurred. If an error has not been encountered, the count defaults to 0, and the timestamp is displayed as Never. This change helps users easily identify any issues with their network interfaces and track error occurrences.
How I did it
To implement the errors subcommand, added a new command handler to the show/interfaces/init.py file. The handler retrieves the error data for a specified interface from the PORT_OPERR_TABLE in the database. The error types are predefined in a list, and for each type, the count and timestamp are pulled from the table. The results are then formatted into a table using the tabulate library, sorted alphabetically by error type.
How to verify it
UT and running the changes on a testbed
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)