[counters] interface and pfc counters are shown negative after config… #3445
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… reload
- What I did
During syncd docker init, initialize the interface and pfc counters to 0.
- How I did it
By clearing the counters values in /tmp/portstat*/* amd /tmp/pfcstat*/* files.
- How to verify it
For Interface counters-
Send traffic for a couple of minutes on few ports
Check the counters values using show interface counters,
Clear the counters "sow interface counters -c"
Perform config reload
Check the counters values using show interface counters, values are negative.
For PFC counters-
Create congestion on a port by sending traffic from 2 ports to 1 port on no-drop priorities
Check the counters values using show pfc counters
Clear the counters using "show pfc counters -c"
Perform config reload
Check the counters values using show pfc counters, values are negative.
- Description for the changelog
Initializes ps and pfcstat counters during docker initialization.
- A picture of a cute animal (not mandatory but encouraged)