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

[201911] [Flex Counters] add CLI for PG drop packets counters (counterpoll, show/clear counters) #2155

Merged
merged 4 commits into from
Jun 22, 2022

Conversation

ayurkiv-nvda
Copy link
Contributor

@ayurkiv-nvda ayurkiv-nvda commented May 7, 2022

Should be merged after sonic-net/sonic-swss#2263

Appropriate PR in master:#1355, #1461, #1583

What I did

Added new option for "counterpoll" utility
Added new CLI commands to view and clear PG dropped packet statistics.
Added the new CLI commands to the command reference guide.

How I did it

Need to merge PG drop functionality to 201911

How to verify it

admin@arc-switch1041:~$ counterpoll pg-drop enable  --> to enable the new counter
admin@arc-switch1041:~$ counterpoll show  --> check new INGRESS_PG_STAT_DROP counter status

Check counters

admin@arc-switch1041:~$ redis-cli -n 2
127.0.0.1:6379[2]> HGETALL COUNTERS:oid:0x1a000000000062
1) "SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES"
2) "0"
3) "SAI_INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES"
4) "0"
5) "SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS"
6) "0"

show priority-group drop counters

Ingress PG dropped packets:
     Port    PG0    PG1    PG2    PG3    PG4    PG5    PG6    PG7
---------  -----  -----  -----  -----  -----  -----  -----  -----
Ethernet0    800    801    802    803    804    805    806    807
Ethernet4    400    401    402    403    404    405    406    407
Ethernet8    100    101    102    103    104    105    106    107
...

sonic-clear priority-group drop counters
Cleared PG drop counters

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

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

@ayurkiv-nvda ayurkiv-nvda changed the title Add CLI for PG drop counters 'enable/disable' (counterpoll) 'show' and 'clear' command for PG drop [Flex Counters] add CLI for PG drop packets counters (counterpoll, show/clear counters) + UT May 7, 2022
@lgtm-com
Copy link

lgtm-com bot commented May 7, 2022

This pull request introduces 1 alert and fixes 1 when merging 58e7e87 into 913df4e - view on LGTM.com

new alerts:

  • 1 for Unused import

fixed alerts:

  • 1 for Unused import

@liat-grozovik liat-grozovik changed the title [Flex Counters] add CLI for PG drop packets counters (counterpoll, show/clear counters) + UT [201911] [Flex Counters] add CLI for PG drop packets counters (counterpoll, show/clear counters) + UT May 11, 2022
@liat-grozovik liat-grozovik changed the title [201911] [Flex Counters] add CLI for PG drop packets counters (counterpoll, show/clear counters) + UT [201911] [Flex Counters] add CLI for PG drop packets counters (counterpoll, show/clear counters) May 11, 2022
@liat-grozovik
Copy link
Collaborator

@neethajohn following your ask enclose in the backport PR. Appreciate if you can prioritized the review.

@lgtm-com
Copy link

lgtm-com bot commented May 17, 2022

This pull request introduces 1 alert and fixes 1 when merging 31130ef into 913df4e - view on LGTM.com

new alerts:

  • 1 for Unused import

fixed alerts:

  • 1 for Unused import

@ayurkiv-nvda
Copy link
Contributor Author

This pull request introduces 1 alert and fixes 1 when merging 31130ef into 913df4e - view on LGTM.com

new alerts:

  • 1 for Unused import

fixed alerts:

  • 1 for Unused import

Implicit usage of import mock_tables.dbconnector

…config reload', add user info when polling disabled

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented May 25, 2022

This pull request introduces 2 alerts and fixes 1 when merging 84fe4da into 988d8e1 - view on LGTM.com

new alerts:

  • 2 for Unused import

fixed alerts:

  • 1 for Unused import

@ayurkiv-nvda
Copy link
Contributor Author

ayurkiv-nvda commented May 25, 2022

Merged additional fixes : 84fe4da
Merged from master
#1678 , #1679
NOTE: I didn't managed to backport UT for this PR #1679, because I have faced with some infrastructure problem for 201911 sonic-utulities UT: after execution crm_test.py test environment become a bit broken and it is no longer possible to run bash command (rm -rf dropstat-* in out case) So I will add UT only after fixing this bug

@neethajohn could you please review existing backport?

@ayurkiv-nvda
Copy link
Contributor Author

ayurkiv-nvda commented Jun 22, 2022

@neethajohn gentle reminder regarding additional fix for this PR 84fe4da
Can you confirm that it ok?

@neethajohn neethajohn merged commit afceda4 into sonic-net:201911 Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants