forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[show] add support for muxcable metrics (sonic-net#1615)
* [show] add support for muxcable metrics What I did Added support for show muxcable metrics. This essentially records what events came to different modules per se for toggling the mux from one state to another. for example admin@sonic$ show muxcable metrics Ethernet0 --json { "linkmgrd_switch_active_start": "2021-May-13 10:00:21.420898", "linkmgrd_switch_standby_end": "2021-May-13 10:01:15.696728", "linkmgrd_switch_unknown_end": "2021-May-13 10:00:26.123319", "xcvrd_switch_standby_end": "2021-May-13 10:01:15.696051", "xcvrd_switch_standby_start": "2021-May-13 10:01:15.690835" } or admin@sonic:$ show muxcable metrics Ethernet0 PORT EVENT TIME --------- ---------------------------- --------------------------- Ethernet0 linkmgrd_switch_active_start 2021-May-13 10:00:21.420898 Ethernet0 linkmgrd_switch_standby_end 2021-May-13 10:01:15.696728 Ethernet0 linkmgrd_switch_unknown_end 2021-May-13 10:00:26.123319 Ethernet0 xcvrd_switch_standby_end 2021-May-13 10:01:15.696051 Ethernet0 xcvrd_switch_standby_start 2021-May-13 10:01:15.690835 How I did it added changes in show/muxcable.py by reading and publishing the state DB contents for the corresponding table Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
- Loading branch information
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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