sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

Fix multi-asic behaviour for watermarkstat

Open bktsim-arista opened this issue 1 year ago • 2 comments

What I did

Added multi-asic support to watermarkstat, fixing watermark/persistent-watermark related commands. Previously, the following commands were not behaving correctly on multi-asic devices, as the '-n' namespace option was not available, and correct namespaces were not traversed on multi-asic devices.

  • show buffer_pool watermark/persistent-watermark
  • show headroom-pool watermark/persistent-watermark
  • show priority-group persistent-watermark/watermark
  • show queue persistent-watermark/watermark

This change fixes multi-asic behaviour of CLI commands that rely on watermarkstat as listed above.

This is a part of the set of changes being pushed for https://github.com/sonic-net/sonic-buildimage/issues/15148

How I did it

Added namespace option -n and used multi_asic library to implement multi_asic behaviour. Added relevant unit tests to ensure functionality.

How to verify it

Run unit tests, or the commands as listed above.

bktsim-arista avatar Nov 30 '23 18:11 bktsim-arista

@bktsim-arista Can you please upate https://github.com/sonic-net/sonic-buildimage/issues/15148 on which PR is handling which command for easy tracking ?

vmittal-msft avatar May 16 '24 19:05 vmittal-msft

@alpeshspatel : please help review

abdosi avatar Aug 07 '24 17:08 abdosi