Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add YANG Model and Configuration Support for Memory Statistics #20354

Merged

Conversation

Arham-Nasir
Copy link
Contributor

This PR introduces a new YANG model for configuring memory statistics in SONiC, along with necessary updates to the configuration database and test cases. The following changes have been made:

  1. YANG Model:

    • Created a new YANG module sonic-memory-statistics.yang for managing memory statistics configuration parameters, including:
      • enabled: Boolean flag to enable or disable memory statistics collection.
      • sampling_interval: Configurable time interval for sampling memory statistics.
      • retention_period: Configurable retention period for memory statistics data.
  2. Configuration Database:

    • Updated sample_config_db.json to include default values for the memory statistics configuration, ensuring seamless integration with the existing configuration management.
  3. Test Cases:

    • Added comprehensive test cases in memory_statistics.json to validate the configuration parameters, including valid configurations and error scenarios for invalid sampling intervals and retention periods.

These changes aim to enhance the monitoring capabilities of SONiC by providing a structured way to configure memory statistics, thereby improving overall system performance and resource management.

Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
@Arham-Nasir
Copy link
Contributor Author

Hi @qiluo-msft , @prgeor , and @FengPan-Frank ,

Could you please help review the HLD and the linked code PRs for our feature?

Thank you!

@FengPan-Frank
Copy link
Contributor

could you pls change

meanwhile?

@Arham-Nasir Arham-Nasir reopened this Oct 16, 2024
Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
@Arham-Nasir
Copy link
Contributor Author

could you pls change

meanwhile?

@FengPan-Frank , I updated the sonic-buildimage/src/sonic-yang-models/doc/Configuration.md file to include the Memory Statistics section. Thank you for your feedback!

@ridahanif96
Copy link
Contributor

/azpw run Azure.sonic-buildimage

Copy link
Contributor

@FengPan-Frank FengPan-Frank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Arham-Nasir
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Arham-Nasir <arqamnasir719@gmail.com>
@ridahanif96
Copy link
Contributor

@qiluo-msft @xincunli-sonic @zbud-msft . Please help review the feature.

@ridahanif96
Copy link
Contributor

@qiluo-msft @xincunli-sonic pls help review this feature

@qiluo-msft qiluo-msft merged commit e108423 into sonic-net:master Dec 3, 2024
22 checks passed
VladimirKuk pushed a commit to Marvell-switching/sonic-buildimage that referenced this pull request Jan 21, 2025
…-net#20354)

This PR introduces a new YANG model for configuring memory statistics in SONiC, along with necessary updates to the configuration database and test cases. The following changes have been made:

YANG Model:

Created a new YANG module sonic-memory-statistics.yang for managing memory statistics configuration parameters, including:
enabled: Boolean flag to enable or disable memory statistics collection.
sampling_interval: Configurable time interval for sampling memory statistics.
retention_period: Configurable retention period for memory statistics data.
Configuration Database:

Updated sample_config_db.json to include default values for the memory statistics configuration, ensuring seamless integration with the existing configuration management.
Test Cases:

Added comprehensive test cases in memory_statistics.json to validate the configuration parameters, including valid configurations and error scenarios for invalid sampling intervals and retention periods.
These changes aim to enhance the monitoring capabilities of SONiC by providing a structured way to configure memory statistics, thereby improving overall system performance and resource management.
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.

5 participants