Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[show priority-group drop counters] Remove backup with cached PG drop…
… counters after 'config reload' (sonic-net#1679) - What I did Explanation how show/clear counters works: Suppose we got from SDK some count of dropped packets for priority group (№3) per interface (Ehernet4). (for example Ethernet4 PG-3 123 packets) Stats can be shown via show priority-group drop counters Then we run sonic-clear priority-group drop counters. This command will save data "Ethernet4 PG-3 123 packets" to backup. It saved in /tmp/dropstat-{user_id} folder When we run show priority-group drop counters again, script will take data from SDK and data saved from backup. In backup it will find 123. In SDK it may still be number 123 for Ethernet4 (like in backup) or bigger (for example 126.) Our sonic-clear priority-group drop counters command does not change anything in SDK. It just show difference beetwen SDK data and last saved data. So if in SDK data is 123, show priority-group drop counters will show 0 (123 minus 123) - data is cleared If in SDK data is bigger than saved 124, or higher show priority-group drop counters will show 1 (124 minus 123) FIX After config reload all counters drop counters data retrieved from SDK become cleared. All counters become zeros. In this case show priority-group drop counters will show -123 ( 0 (from SDK) minus 123 (saved backup)) So we don't need backup after config reload - How I did it remove /tmp/dropstat-{user_id} folders with counters backup Signed-off-by: Andriy Yurkiv <[email protected]>
- Loading branch information