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

[show][config] add muxcable command line support for retrieve / reset ICMP packet loss data (#2046) #2094

Merged
merged 2 commits into from
Mar 11, 2022

Conversation

zjswhhh
Copy link
Contributor

@zjswhhh zjswhhh commented Mar 4, 2022

What I did

Merging this in 202012 branch because there was a merge conflict in original PR while cherry-picking.

Original PR: [show][config] add muxcable command line support for retrieve / reset ICMP packet loss data (#2046)

Added support to retrieve and reset ICMP packet loss data in state db for muxcable.

sign-off: Jing Zhang zhangjing@microsoft.com

How I did it

How to verify it

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)

… ICMP packet loss data (sonic-net#2046)

Stemming from sonic-net/sonic-linkmgrd#14
sign-off: Jing Zhang zhangjing@microsoft.com

Added support to retrieve and reset ICMP packet loss data in state db for muxcable.

Changes made in show/muxcable.py and config/muxcable.py

- Added unit tests.
- Tested the command lines on testbeds.
- Ran dualtor_io/test_link_failure.py.

``` show muxcable pckloss <port_name>```
```
admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96
PORT        COUNT                 VALUE
----------  ------------------  -------
Ethernet96  pck_loss_count        10439
Ethernet96  pck_expected_count    11406
PORT        EVENT                      TIME
----------  -------------------------  ---------------------------
Ethernet96  link_prober_unknown_start  2022-Jan-27 19:47:17.819699
Ethernet96  link_prober_unknown_end    2022-Jan-27 22:28:36.736928
```
```config muxcable pckloss reset <port_name>```
```
admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset Ethernet96
admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96
PORT        COUNT                 VALUE
----------  ------------------  -------
Ethernet96  pck_expected_count        0
Ethernet96  pck_loss_count            0
PORT        EVENT                      TIME
----------  -------------------------  ---------------------------
Ethernet96  link_prober_unknown_start  2022-Jan-27 19:47:17.819699
Ethernet96  link_prober_unknown_end    2022-Jan-27 22:28:36.736928
```
```config muxcable pckloss reset all```
```
admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset all
admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet68
PORT        COUNT                 VALUE
----------  ------------------  -------
Ethernet68  pck_loss_count            0
Ethernet68  pck_expected_count        3
PORT        EVENT                      TIME
----------  -------------------------  ---------------------------
Ethernet68  link_prober_unknown_start  2022-Jan-27 19:47:17.702760
Ethernet68  link_prober_unknown_end    2022-Jan-27 22:28:36.756113

```
@zjswhhh zjswhhh requested a review from qiluo-msft March 4, 2022 22:50
@vdahiya12
Copy link
Contributor

/azp run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh
Copy link
Contributor Author

zjswhhh commented Mar 10, 2022

/azp run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh
Copy link
Contributor Author

zjswhhh commented Mar 11, 2022

Hi @qiluo-msft @vdahiya12 can I have your approval on this PR?

@zjswhhh zjswhhh requested a review from vdahiya12 March 11, 2022 02:24
@vdahiya12 vdahiya12 requested review from vdahiya12 and removed request for vdahiya12 March 11, 2022 02:30
@zjswhhh zjswhhh merged commit 3fed440 into sonic-net:202012 Mar 11, 2022
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Mar 16, 2022
Advance sonic-utilities submodule to include the following changes

98de850 [muxcable][show] enhance show mux status to show last switchover time sonic-net/sonic-utilities#2067
3da82d1 [show][muxcable] fix the sudo access error for show muxcable metrics sonic-net/sonic-utilities#2083
7acbadb [build] stop vstest in the Azure pipeline sonic-net/sonic-utilities#2098
3fed440 [show][config] add muxcable command line support for retrieve / reset ICMP packet loss data sonic-net/sonic-utilities#2094
aa21e3a [202012] [counterpoll] Display the correct default poll interval for watermark counters sonic-net/sonic-utilities#2091

Signed-off-by: Neetha John <nejo@microsoft.com>
@zjswhhh zjswhhh deleted the 202012 branch February 1, 2023 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants