-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Two issues found while running portstat/show interface counters
a) Issue 1 : port_speed in not accounted when get Port rx/tx utilization when running portstat without -a option.
show interface counters invoke portstat without -a option.
By default utilization always map to 40G port speed
b) Issue 2: If we do sonic-clear counters during init while sonic is coming up (Counter DB still not ready/available) then show interface counters will always report all counters as N/A . Only way to recover this is to give sonic-clear counters again but that means we loose stats till that time.
This issue is generic and comes for queue counters also. And will come for intfstat and pfcstat also.
Eg:
admin@str-s6000-on-2:~$ sonic-clear counters
Cleared counters
admin@str-s6000-on-2:~$ show interface counters
Last cached time was 2020-10-16 21:50:34.591645
IFACE STATE RX_OK RX_BPS RX_UTIL RX_ERR RX_DRP RX_OVR TX_OK TX_BPS TX_UTIL TX_ERR TX_DRP TX_OVR
Ethernet0 U N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Ethernet4 U N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Ethernet8 U N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Ethernet12 U N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Ethernet16 U N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A