diff --git a/dockers/docker-orchagent/enable_counters.py b/dockers/docker-orchagent/enable_counters.py index f7e6abb031b9..32b9a6211c73 100755 --- a/dockers/docker-orchagent/enable_counters.py +++ b/dockers/docker-orchagent/enable_counters.py @@ -4,9 +4,12 @@ import time def enable_counter_group(db, name): - info = {} - info['FLEX_COUNTER_STATUS'] = 'enable' - db.mod_entry("FLEX_COUNTER_TABLE", name, info) + entry_info = db.get_entry("FLEX_COUNTER_TABLE", name) + + if not entry_info: + info = {} + info['FLEX_COUNTER_STATUS'] = 'enable' + db.mod_entry("FLEX_COUNTER_TABLE", name, info) def enable_counters(): db = swsssdk.ConfigDBConnector() @@ -15,6 +18,7 @@ def enable_counters(): enable_counter_group(db, 'QUEUE') enable_counter_group(db, 'PFCWD') enable_counter_group(db, 'PG_WATERMARK') + enable_counter_group(db, 'PG_DROP') enable_counter_group(db, 'QUEUE_WATERMARK') enable_counter_group(db, 'BUFFER_POOL_WATERMARK') enable_counter_group(db, 'PORT_BUFFER_DROP')