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

[show priority-group drop counters] Add user info output when user want to check PG counters and polling are disabled #1678

Merged
merged 2 commits into from
Aug 11, 2021

Conversation

ayurkiv-nvda
Copy link
Contributor

@ayurkiv-nvda ayurkiv-nvda commented Jun 16, 2021

Signed-off-by: Andriy Yurkiv ayurkiv@nvidia.com

What I did

Added additional output info for user when trying to show priority group counters and pg drop counters are disabled

How I did it

modify pg-drop script, add additional print during executing "show priority-group drop counters" if PG polling disabled

How to verify it

counterpoll pg-drop disable
show priority-group drop counters

Expect:
Warning: PG counters are disabled. Current stats may be outdated. Use 'counterpoll pg-drop enable' to enable'

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

admin@r-tigon-04:/usr/local/bin$ show priority-group drop counters
Ingress PG dropped packets:
       Port    PG0    PG1    PG2    PG3    PG4    PG5    PG6    PG7
-----------  -----  -----  -----  -----  -----  -----  -----  -----
  Ethernet0      0      0      0      0      0      0      0      0
  Ethernet2      0      0      0      0      0      0      0      0
  Ethernet8      0      0      0      0      0      0      0      0
 Ethernet10      0      0      0      0      0      0      0      0
 Ethernet16      0      0      0      0      0      0      0      0

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

admin@r-tigon-04:/usr/local/bin$ show priority-group drop counters
Warning: PG counters are disabled. Use 'counterpoll pg-drop enable' to enable polling

…nt to check PG counters and polling are disabled

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

@neethajohn would like to consult with you on the suggested change. it is a good and informative but should we consider not to show the table in that case and just the note instead? what is the purpose of showing some values when the counter is disabled? in many cases it will not be 0 if was enabled and then disabled so the main question why we need it.

@liat-grozovik
Copy link
Collaborator

@neethajohn kindly reminder, appreciate your feedback on the above question

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik marked this pull request as ready for review June 25, 2021 11:32
@jleveque
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jleveque
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@neethajohn
Copy link
Contributor

@neethajohn would like to consult with you on the suggested change. it is a good and informative but should we consider not to show the table in that case and just the note instead? what is the purpose of showing some values when the counter is disabled? in many cases it will not be 0 if was enabled and then disabled so the main question why we need it.

I agree with you that showing the table makes no sense when its disabled. Looks like in the current change, we still show the counters along with the warning message. I am fine either way - leaving it there or removing it as long as the warning is there.

neethajohn
neethajohn previously approved these changes Jul 1, 2021
Copy link
Collaborator

@liat-grozovik liat-grozovik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suggest to remove the table when it is disabled.

@ayurkiv-nvda
Copy link
Contributor Author

i suggest to remove the table when it is disabled.

Accepted.
Fix is really easy but creating additional unit test still in progress - faced with some difficulties.
I will add fix and appropriate UT soon

@ayurkiv-nvda
Copy link
Contributor Author

ayurkiv-nvda commented Jul 15, 2021

i suggest to remove the table when it is disabled.

Done
UT also added

@liat-grozovik
Copy link
Collaborator

@neethajohn kindly reminder to review and approve. this issue is relevant for active release branches.

Copy link
Contributor

@neethajohn neethajohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the 'output' in the PR description to reflect this new change of not displaying counters

@ayurkiv-nvda
Copy link
Contributor Author

Please update the 'output' in the PR description to reflect this new change of not displaying counters

Done

@liat-grozovik
Copy link
Collaborator

@qiluo-msft and @abdosi please check if this fix is required for 202012 and 201911

@neethajohn neethajohn merged commit 4175cb9 into sonic-net:master Aug 11, 2021
qiluo-msft pushed a commit that referenced this pull request Aug 12, 2021
…nt to check PG counters and polling are disabled (#1678)

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

What I did
Added additional output info for user when trying to show priority group counters and pg drop counters are disabled

How I did it
modify pg-drop script, add additional print during executing "show priority-group drop counters" if PG polling disabled

How to verify it
counterpoll pg-drop disable
show priority-group drop counters

Expect:
Warning: PG counters are disabled. Current stats may be outdated. Use 'counterpoll pg-drop enable' to enable'

Previous command output (if the output of a command-line utility has changed)
admin@r-tigon-04:/usr/local/bin$ show priority-group drop counters
Ingress PG dropped packets:
       Port    PG0    PG1    PG2    PG3    PG4    PG5    PG6    PG7
-----------  -----  -----  -----  -----  -----  -----  -----  -----
  Ethernet0      0      0      0      0      0      0      0      0
  Ethernet2      0      0      0      0      0      0      0      0
  Ethernet8      0      0      0      0      0      0      0      0
 Ethernet10      0      0      0      0      0      0      0      0
 Ethernet16      0      0      0      0      0      0      0      0

New command output (if the output of a command-line utility has changed)
admin@r-tigon-04:/usr/local/bin$ show priority-group drop counters
Warning: PG counters are disabled. Use 'counterpoll pg-drop enable' to enable polling
judyjoseph pushed a commit that referenced this pull request Aug 20, 2021
…nt to check PG counters and polling are disabled (#1678)

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

What I did
Added additional output info for user when trying to show priority group counters and pg drop counters are disabled

How I did it
modify pg-drop script, add additional print during executing "show priority-group drop counters" if PG polling disabled

How to verify it
counterpoll pg-drop disable
show priority-group drop counters

Expect:
Warning: PG counters are disabled. Current stats may be outdated. Use 'counterpoll pg-drop enable' to enable'

Previous command output (if the output of a command-line utility has changed)
admin@r-tigon-04:/usr/local/bin$ show priority-group drop counters
Ingress PG dropped packets:
       Port    PG0    PG1    PG2    PG3    PG4    PG5    PG6    PG7
-----------  -----  -----  -----  -----  -----  -----  -----  -----
  Ethernet0      0      0      0      0      0      0      0      0
  Ethernet2      0      0      0      0      0      0      0      0
  Ethernet8      0      0      0      0      0      0      0      0
 Ethernet10      0      0      0      0      0      0      0      0
 Ethernet16      0      0      0      0      0      0      0      0

New command output (if the output of a command-line utility has changed)
admin@r-tigon-04:/usr/local/bin$ show priority-group drop counters
Warning: PG counters are disabled. Use 'counterpoll pg-drop enable' to enable polling
vaibhavhd added a commit to sonic-net/sonic-buildimage that referenced this pull request Aug 26, 2021
Update sonic-utilities submodule to latest in 202012 branch:

[show priority-group drop counters] Add user info output when user want to check PG counters and polling are disabled sonic-net/sonic-utilities#1678
[route_check] Filter out VNET routes sonic-net/sonic-utilities#1612
[Show] Update the subcommands of Kdump. sonic-net/sonic-utilities#1682
Add mock support for swsscommon classes sonic-net/sonic-utilities#1780
[acl_loader]: add iptype match to the rules for dataplane acl sonic-net/sonic-utilities@205aff8
[202012][fast-reboot] Remove FLEX_COUNTER_TABLE from config_db.json before fast-reboot sonic-net/sonic-utilities#1774
@ayurkiv-nvda ayurkiv-nvda deleted the pg_drop_disabled_azure branch May 30, 2023 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants