Skip to content

[202205][counters] Keep counters cache in a single directory#2280

Merged
yxieca merged 1 commit intosonic-net:202205from
stepanblyschak:counters_cache_202205
Jul 29, 2022
Merged

[202205][counters] Keep counters cache in a single directory#2280
yxieca merged 1 commit intosonic-net:202205from
stepanblyschak:counters_cache_202205

Conversation

@stepanblyschak
Copy link
Contributor

@stepanblyschak stepanblyschak commented Jul 29, 2022

Signed-off-by: Stepan Blyschak stepanb@nvidia.com

Backport of #2232

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

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

- What I did
To fix sonic-net/sonic-buildimage#9817. Cache all counters in the same place. Created a UserCache helper class to access the cache directory.

- How I did it
Implemented UserCache class. Changed all stats commands to use new class. Adopted fast-reboot script.

- How to verify it
Run on the switch and verify counters stats command and clear commands work correctly. After config reload or cold/fast reboot counters cache is removed.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@yxieca yxieca merged commit 218b175 into sonic-net:202205 Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants