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

Add show and clear commands for headroom pool watermark #1144

Merged
merged 4 commits into from
Dec 9, 2020

Conversation

neethajohn
Copy link
Contributor

@neethajohn neethajohn commented Sep 30, 2020

Depends on sonic-net/sonic-swss#1453

- What I did
Added support to query and clear headroom pool watermark counters
Added unit test for the headroom pool watermark counters

- How I did it

  • Modified watermarkstat script to query/clear headroom pool watermark counters
  • Added show and clear commands

- How to verify it

  • Send traffic such that it treks into the headroom pool and check for the headroom pool usage using the show command below
  • Set polling interval to 30s and issue clear commands mentioned below and verify that counters are cleared

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

admin@sonic:~$ show headroom-pool watermark 
Headroom pool maximum occupancy:
                 Pool    Bytes
---------------------  -------
ingress_lossless_pool    12480

admin@sonic:~$ show headroom-pool persistent-watermark 
Headroom pool maximum occupancy:
                 Pool    Bytes
---------------------  -------
ingress_lossless_pool    12480

Clear commands

admin@sonic:~$ sudo sonic-clear headroom-pool watermark 
admin@sonic:~$ sudo sonic-clear headroom-pool persistent-watermark 

@lguohan
Copy link
Contributor

lguohan commented Oct 9, 2020

please add unit tests for new features.

@neethajohn neethajohn merged commit 57a0b41 into sonic-net:master Dec 9, 2020
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
Depends on sonic-net/sonic-swss#1453

- What I did
Added support to query and clear headroom pool watermark counters
Added unit test for the headroom pool watermark counters

- How I did it
Modified watermarkstat script to query/clear headroom pool watermark counters
Added show and clear commands

- How to verify it
Send traffic such that it treks into the headroom pool and check for the headroom pool usage using the show command below
Set polling interval to 30s and issue clear commands mentioned below and verify that counters are cleared

- New command output (if the output of a command-line utility has changed)
Show commands
admin@sonic:~$ show headroom-pool watermark 
Headroom pool maximum occupancy:
                 Pool    Bytes
---------------------  -------
ingress_lossless_pool    12480

admin@sonic:~$ show headroom-pool persistent-watermark 
Headroom pool maximum occupancy:
                 Pool    Bytes
---------------------  -------
ingress_lossless_pool    12480

Clear commands
admin@sonic:~$ sudo sonic-clear headroom-pool watermark 
admin@sonic:~$ sudo sonic-clear headroom-pool persistent-watermark 

Signed-off-by: Neetha John <[email protected]>
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.

3 participants