Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues in portstat/show interface counters #5655

Closed
abdosi opened this issue Oct 17, 2020 · 2 comments
Closed

Issues in portstat/show interface counters #5655

abdosi opened this issue Oct 17, 2020 · 2 comments

Comments

@abdosi
Copy link
Contributor

abdosi commented Oct 17, 2020

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

@abdosi abdosi self-assigned this Oct 17, 2020
abdosi added a commit to abdosi/sonic-utilities that referenced this issue Oct 17, 2020
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Oct 18, 2020

@abdosi if i am not mistaken at least the #2 issue has been handled by Mykola F with the below HLD
it was decided back then not to backport it to 201911. can you please check if the problem in master and 201911 is the same?
https://github.com/Azure/SONiC/blob/ec6d35dd2c28491bfade19cfee990fe612f1e5e9/doc/rates-and-utilization/Rates_and_utilization_HLD.md

the PR which is not yet merged and should fix it is sonic-net/sonic-utilities#817

@liat-grozovik yes, from code walkthrough it fixes ssue#2 for portstat and intfstat
but issue is generic and will come for pfc and queue stat.
I have fixed in generic way in PR sonic-net/sonic-utilities#1180. Also this PR is compliments the sonic-net/sonic-utilities#817 and should not be conflicting.

abdosi added a commit to sonic-net/sonic-utilities that referenced this issue Oct 20, 2020
…unters. (#1180)

* Fix for Issue: sonic-net/sonic-buildimage#5655

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Updated the the fix for pfc/queue counters also.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit to sonic-net/sonic-utilities that referenced this issue Oct 21, 2020
…unters. (#1180)

* Fix for Issue: sonic-net/sonic-buildimage#5655

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Updated the the fix for pfc/queue counters also.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@abdosi
Copy link
Contributor Author

abdosi commented Nov 3, 2020

PR: sonic-net/sonic-utilities#1180 fixes this issue. Closing this.

cc @rlhui

@abdosi abdosi closed this as completed Nov 3, 2020
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
…unters. (#1180)

* Fix for Issue: sonic-net/sonic-buildimage#5655

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>

* Updated the the fix for pfc/queue counters also.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants