Skip to content

Conversation

manish1-arista
Copy link

This Feature has been tracked in sonic-net/SONiC#2001

What I did

Add support for clearing aggregate VOQ counters

How I did it

  • Caching the current counters when sonic-clear queuecounters is executed.
  • Calculating and displaying the difference in counter values when the show command is run.
  • Providing clear CLI messaging to indicate the behavior when run from supervisor(clear aggregate VOQ counters only).

How to verify it

Unit for clear aggregate VOQ counters is added verifying the data is cached and counters are cleared properly.

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

Previously the command result in error as support for clearing aggregate VOQ counters is not there.

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

INFO: On Supervisor, only Aggregate VOQ counters will be cleared
Clear and update saved counters for cmp219-4|asic0|Cpu0
Clear and update saved counters for cmp219-4|asic0|Ethernet0
Clear and update saved counters for cmp219-4|asic0|Ethernet8
Clear and update saved counters for cmp219-4|asic0|Ethernet16
Clear and update saved counters for cmp219-4|asic0|Ethernet24
Clear and update saved counters for cmp219-4|asic0|Ethernet32
Clear and update saved counters for cmp219-4|asic0|Ethernet40
Clear and update saved counters for cmp219-4|asic0|Ethernet48
Clear and update saved counters for cmp219-4|asic0|Ethernet56
Clear and update saved counters for cmp219-4|asic0|Ethernet64
Clear and update saved counters for cmp219-4|asic0|Ethernet72
Clear and update saved counters for cmp219-4|asic0|Ethernet80
Clear and update saved counters for cmp219-4|asic0|Ethernet88
Clear and update saved counters for cmp219-4|asic0|Ethernet96
Clear and update saved counters for cmp219-4|asic0|Ethernet104
Clear and update saved counters for cmp219-4|asic0|Ethernet112
Clear and update saved counters for cmp219-4|asic0|Ethernet120
Clear and update saved counters for cmp219-4|asic0|Ethernet128
Clear and update saved counters for cmp219-4|asic0|Ethernet136
Clear and update saved counters for cmp219-4|asic0|Ethernet-IB0
Clear and update saved counters for cmp219-4|asic0|Ethernet-Rec0
Clear and update saved counters for cmp219-4|asic1|Cpu0
Clear and update saved counters for cmp219-4|asic1|Ethernet144
Clear and update saved counters for cmp219-4|asic1|Ethernet152
Clear and update saved counters for cmp219-4|asic1|Ethernet160
Clear and update saved counters for cmp219-4|asic1|Ethernet168
Clear and update saved counters for cmp219-4|asic1|Ethernet176
Clear and update saved counters for cmp219-4|asic1|Ethernet184
Clear and update saved counters for cmp219-4|asic1|Ethernet192
Clear and update saved counters for cmp219-4|asic1|Ethernet200
Clear and update saved counters for cmp219-4|asic1|Ethernet208
Clear and update saved counters for cmp219-4|asic1|Ethernet216
Clear and update saved counters for cmp219-4|asic1|Ethernet224
Clear and update saved counters for cmp219-4|asic1|Ethernet232
Clear and update saved counters for cmp219-4|asic1|Ethernet240
Clear and update saved counters for cmp219-4|asic1|Ethernet248
Clear and update saved counters for cmp219-4|asic1|Ethernet256
Clear and update saved counters for cmp219-4|asic1|Ethernet264
Clear and update saved counters for cmp219-4|asic1|Ethernet272
Clear and update saved counters for cmp219-4|asic1|Ethernet280
Clear and update saved counters for cmp219-4|asic1|Ethernet-IB1
Clear and update saved counters for cmp219-4|asic1|Ethernet-Rec1

Copy link

linux-foundation-easycla bot commented Aug 26, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: manish1-arista / name: manish1 (71cbadc)

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vivekverma-arista
Copy link
Contributor

@vmittal-msft please review

cc @kenneth-arista @pandurangan-arista

…t#2001)

* Caching the current counters when sonic-clear queuecounters is executed.
* Calculating and displaying the difference in counter values when the show command is run.
* Providing clear CLI messaging to indicate the behavior when run from supervisor(clear aggregate VOQ counters only).
* Unit test for clear aggregate VOQ counters is added verifying the data is cached and counters are cleared properly.

Signed-off-by: manish <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants