Skip to content

Conversation

@dhanasekar-arista
Copy link

@dhanasekar-arista dhanasekar-arista commented Nov 24, 2025

What I did

Added counterpoll port-attr CLI commands to enable/disable/configure PORT_ATTR flex counter monitoring.

How I did it

  • Added port_attr command group in counterpoll/main.py
  • Implemented three subcommands:
    • enable: Sets FLEX_COUNTER_STATUS=enable in CONFIG_DB
    • disable: Sets FLEX_COUNTER_STATUS=disable in CONFIG_DB
    • interval <100-30000>: Sets POLL_INTERVAL in milliseconds (validated range)
  • Integrated PORT_ATTR status into counterpoll show output

How to verify it

# Enable PORT_ATTR monitoring
counterpoll port-attr enable

# Set polling interval to 5 seconds
counterpoll port-attr interval 5000

# Verify configuration
counterpoll show

# Disable monitoring
counterpoll port-attr disable

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

Type                        Interval (in ms)    Status
--------------------------  ------------------  --------
QUEUE_STAT                  10000               enable
PORT_STAT                   1000                enable
PORT_BUFFER_DROP            60000               enable
RIF_STAT                    1000                enable
QUEUE_WATERMARK_STAT        10000               enable
PG_WATERMARK_STAT           10000               enable

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

Type                        Interval (in ms)    Status
--------------------------  ------------------  --------
QUEUE_STAT                  10000               enable
PORT_STAT                   1000                enable
PORT_BUFFER_DROP            60000               enable
PORT_ATTR            10000               enable
RIF_STAT                    1000                enable
QUEUE_WATERMARK_STAT        10000               enable
PG_WATERMARK_STAT           10000               enable

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: dhanasekar-arista <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dhanasekar-arista dhanasekar-arista changed the title Add counterpoll port-serdes-attr CLI support Add counterpoll port-attr CLI support Nov 25, 2025
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