Skip to content

Commit

Permalink
Revert "[FC] Put default counters in init_cfg.json (#20555)"
Browse files Browse the repository at this point in the history
This reverts commit dbf1baa.
  • Loading branch information
StormLiangMS authored Nov 21, 2024
1 parent b461ea6 commit ee65e1a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
11 changes: 11 additions & 0 deletions dockers/docker-orchagent/enable_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ def enable_rates():
def enable_counters():
db = swsscommon.ConfigDBConnector()
db.connect()
default_enabled_counters = ['PORT', 'RIF', 'QUEUE', 'PFCWD', 'PG_WATERMARK', 'PG_DROP',
'QUEUE_WATERMARK', 'BUFFER_POOL_WATERMARK', 'PORT_BUFFER_DROP', 'ACL']

# Enable those default counters
for key in default_enabled_counters:
enable_counter_group(db, key)

# Set FLEX_COUNTER_DELAY_STATUS to false for those non-default counters
keys = db.get_keys('FLEX_COUNTER_TABLE')
for key in keys:
if key not in default_enabled_counters:
enable_counter_group(db, key)
enable_rates()


Expand Down
27 changes: 0 additions & 27 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,6 @@
"FLEX_COUNTER_STATUS": "enable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
},
"PORT": {
"FLEX_COUNTER_STATUS": "enable"
},
"RIF": {
"FLEX_COUNTER_STATUS": "enable"
},
"QUEUE": {
"FLEX_COUNTER_STATUS": "enable"
},
"PFCWD": {
"FLEX_COUNTER_STATUS": "enable"
},
"PG_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
},
"PG_DROP": {
"FLEX_COUNTER_STATUS": "enable"
},
"QUEUE_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
},
"BUFFER_POOL_WATERMARK": {
"FLEX_COUNTER_STATUS": "enable"
},
"PORT_BUFFER_DROP": {
"FLEX_COUNTER_STATUS": "enable"
}
},
"BGP_DEVICE_GLOBAL": {
Expand Down

0 comments on commit ee65e1a

Please sign in to comment.