Skip to content

Commit 47c243e

Browse files
authored
[show][muxcable] fix the sudo access error for show muxcable metrics (sonic-net#2083)
This change is required for such behavior with the command below, which works okay if you try with sudo How to verify it with the change, no need for sudo, tested on an arista 7050cx3 lab device vdahiya@sonic:~$ show mux metrics Ethernet0 PORT EVENT TIME --------- ---------------------------- --------------------------- Ethernet0 linkmgrd_switch_active_start 2022-Feb-28 18:49:59.350302 Ethernet0 xcvrd_switch_active_start 2022-Feb-28 18:49:59.354076 Ethernet0 xcvrd_switch_active_end 2022-Feb-28 18:49:59.357925 Ethernet0 linkmgrd_switch_active_end 2022-Feb-28 18:49:59.35919 Signed-off-by: vaibhav-dahiya <[email protected]>
1 parent f872516 commit 47c243e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

show/muxcable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ def metrics(db, port, json_output):
10681068
for namespace in namespaces:
10691069
asic_id = multi_asic.get_asic_index_from_namespace(namespace)
10701070
# replace these with correct macros
1071-
per_npu_statedb[asic_id] = swsscommon.SonicV2Connector(use_unix_socket_path=True, namespace=namespace)
1071+
per_npu_statedb[asic_id] = swsscommon.SonicV2Connector(use_unix_socket_path=False, namespace=namespace)
10721072
per_npu_statedb[asic_id].connect(per_npu_statedb[asic_id].STATE_DB)
10731073

10741074
metrics_table_keys[asic_id] = per_npu_statedb[asic_id].keys(

0 commit comments

Comments
 (0)