sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

[masic] 'show interfaces counters' reminds to use '-d all' option to check for internal links

Open wenyiz2021 opened this issue 2 years ago • 1 comments

'show interfaces counters' on multi-asic platforms by default show external links' info only. There are cases when internal links have CRC errors but w/o '-d all' option of 'show int counters', internal links were missed checking.

This commit is to print reminder to check internal links, when any show int counters cmd is given, e.g. with or without any option, on multi-asic only. Note that this will be printed at end of the cli output. Note that single-asic behavior will NOT be changed

Signed-off-by: Wenyi Zhang [email protected]

What I did

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

$ show int counters -a
      IFACE    STATE    RX_OK    RX_BPS    RX_PPS    RX_UTIL    RX_ERR    RX_DRP    RX_OVR    TX_OK    TX_BPS    Tx_PPS    TX_UTIL    TX_ERR    TX_DRP    TX_OVR
-----------  -------  -------  --------  --------  ---------  --------  --------  --------  -------  --------  --------  ---------  --------  --------  --------
  Ethernet0        U    29076       N/A       N/A        N/A         0         0         0    14502       N/A       N/A        N/A         0         0         0
  Ethernet4        U    14551       N/A       N/A        N/A         0         1         0    28566       N/A       N/A        N/A         0         0         0
$ show int counters -a -p 30
The rates are calculated within 30 seconds period
      IFACE    STATE    RX_OK     RX_BPS    RX_PPS    RX_UTIL    RX_ERR    RX_DRP    RX_OVR    TX_OK     TX_BPS    Tx_PPS    TX_UTIL    TX_ERR    TX_DRP    TX_OVR
-----------  -------  -------  ---------  --------  ---------  --------  --------  --------  -------  ---------  --------  ---------  --------  --------  --------
  Ethernet0        U        2   7.66 B/s    0.07/s      0.00%         0         0         0        2  11.65 B/s    0.07/s      0.00%         0         0         0
  Ethernet4        U        2   7.66 B/s    0.07/s      0.00%         0         0         0        2  11.65 B/s    0.07/s      0.00%         0         0         0

New command output (if the output of a command-line utility has changed)

on multi-asic:

:~$ show int counters -a
...
Ethernet248        U   25,551  55.66 B/s      0.00%         0         8         0   25,390  60.95 B/s      0.00%         0         0         0
Ethernet252        U   25,553  53.72 B/s      0.00%         0         7         0   25,392  59.43 B/s      0.00%         0         0         0


Reminder: Please execute 'show interface counters -d all' to include internal links

...
:~$ show int counters -a -p 30
...
Ethernet248        U   25,551  55.66 B/s      0.00%         0         8         0   25,390  60.95 B/s      0.00%         0         0         0
Ethernet252        U   25,553  53.72 B/s      0.00%         0         7         0   25,392  59.43 B/s      0.00%         0         0         0


Reminder: Please execute 'show interface counters -d all' to include internal links


on single-asic with change:

admin@str2-7050cx3-acs-01:~$ show int counters
...
Ethernet128        X        0   0.00 B/s      0.00%         0         0         0        0   0.00 B/s      0.00%         0         0         0
Ethernet132        X        0   0.00 B/s      0.00%         0         0         0        0   0.00 B/s      0.00%         0         0         0
admin@str2-7050cx3-acs-01:~$ 

wenyiz2021 avatar Oct 31 '22 22:10 wenyiz2021

waiting for hwproxy team to validate result before changing unit tests

wenyiz2021 avatar Nov 01 '22 18:11 wenyiz2021

per @rlhui 's comment, request for branch in and above 201911

wenyiz2021 avatar Jan 31 '23 18:01 wenyiz2021

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

qiluo-msft avatar Feb 02 '23 23:02 qiluo-msft

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

cherry pick PR submitted: https://github.com/sonic-net/sonic-utilities/pull/2648 @qiluo-msft, thanks

wenyiz2021 avatar Feb 03 '23 00:02 wenyiz2021