Skip to content

[show] fix show muxcable metrics <port> for sorted output#1731

Merged
vdahiya12 merged 4 commits intosonic-net:masterfrom
vdahiya12:metrics-change
Jul 28, 2021
Merged

[show] fix show muxcable metrics <port> for sorted output#1731
vdahiya12 merged 4 commits intosonic-net:masterfrom
vdahiya12:metrics-change

Conversation

@vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Jul 28, 2021

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com

This PR fixes the display for show muxcable metrics by sorting the output based on the time of the event.
This is required for better display.
For example

admin@str2-7050cx3-acs-12:~$ show mux metrics Ethernet0
PORT EVENT TIME
--------- --------------------------- ---------------------------
Ethernet0 xcvrd_switch_standby_start 2021-Jul-21 02:03:28.784027
Ethernet0 orch_switch_standby_end 2021-Jul-21 02:03:28.788150
Ethernet0 linkmgrd_switch_standby_end 2021-Jul-21 02:03:28.790288

What I did

changed the output for muxcable metrics command for sorted time order

How I did it

made the changes inside the show/muxcable.py by sorting the output

How to verify it

unit-tests

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)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
tahmed-dev
tahmed-dev previously approved these changes Jul 28, 2021
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 merged commit c2ac2d2 into sonic-net:master Jul 28, 2021
@vdahiya12 vdahiya12 deleted the metrics-change branch July 28, 2021 17:47
qiluo-msft pushed a commit that referenced this pull request Jul 29, 2021
This PR fixes the display for show muxcable metrics by sorting the output based on the time of the event.
This is required for better display.
For example

admin@str2-7050cx3-acs-12:~$ show mux metrics Ethernet0
PORT EVENT TIME
--------- --------------------------- ---------------------------
Ethernet0 xcvrd_switch_standby_start 2021-Jul-21 02:03:28.784027
Ethernet0 orch_switch_standby_end 2021-Jul-21 02:03:28.788150
Ethernet0 linkmgrd_switch_standby_end 2021-Jul-21 02:03:28.790288

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
This PR updates the following commits

a9606fb [show] fix show muxcable metrics <port> for sorted output (sonic-net#1731)
7355016 [minigraph][port_config] Use imported config.main and add conditional patch (sonic-net#1728)
cc1d6e4 [configlet] Python3 compatible syntax for extracting a key from the dict (sonic-net#1721)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
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.

3 participants