-
Notifications
You must be signed in to change notification settings - Fork 1.1k
The PSU CLI and SNMP support
Rev | Date | Author | Change Description |
---|---|---|---|
0.1 | Andrii Savka | Initial version |
This document provides general information about the PSU CLI and SNMP support feature.
This document describes the high level design of the PSU CLI and SNMP support feature.
Definitions/Abbreviation | Description |
---|---|
SNMP | Simple Network Management Protocol |
PSU | Power supply unit |
API | Application Programmable Interface |
CLI | Command-line utility |
Following diagram describes a top level overview of the SONiC PSU architecture:
The agent handles the SNMP requests and takes the PSU status from PSU API.
The command-line utilities for SONiC
Microsoft will develop a simple plugin-style API in the vein of sfputil.py and led_control.py. Initial functionality will consist of a function that takes a zero-based integer parameter which specifies the ID of the PSU and returns a boolean value indicating the status of the PSU:
- true if the PSU is functioning correctly
- false if not.
In this function, any platform-specific appropriate voltage/amperage/temperature calculations should be carried out to determine whether the PSU is operating properly or not.
Each vendor needs to implement the PSU module for API which should provide the status whether specified PSU has correct functioning.
Mellanox will implement a simple Python command-line utility which implements the plugin and can output the status of each PSU/all PSUs. The CLI will use PSU API to get PSU status. The CLI should has following behavior:
Input parameters | CLI expected result |
---|---|
No Input parameters | Provide the status of all PSUs which are available in the platform |
PSU ID | Provide the status for specific PSU |
Mellanox will add the PSU support to SNMP agent for retrieving PSU statuses. Querying below OID should return the status of PSU/PSUs in the platform. The response has following integer values:
- “1” for proper operational status
- “0” for faulty
The following OID should be supported:
OID | Description of the SNMP instance |
---|---|
1.3.6.1.4.1.9.9.117.1.1.2 | cefcFRUPowerStatusTable |
1.3.6.1.4.1.9.9.117.1.1.2.1 | cefcFRUPowerStatusEntry |
1.3.6.1.4.1.9.9.117.1.1.2.1.2 | return the statuses of all PSUs which are available in the platform |
1.3.6.1.4.1.9.9.117.1.1.2.1.2.psu_index | return the status of PSU specified by psu_index |
The support for the new PSU OID should be added.
The following components should be implemented:
- The PSU plugin-style API for SONiC that takes a zero-based PSU ID and returns a boolean value indicating the status of the PSU.
- The Python command-line utility that provides the PSU(s) status.
- Each vendor needs to implement the PSU module for API which should provide the status whether specified PSU has correct functioning.
- Where should the vendor API plugin be placed ? I would like to suggest following place: "sonic-buildimage/device/[vendor]/[platform]/plugins/"
- Should we add the PSU cli to "show" command as it's done for eeprom? For example, "show platform psustatus" command displays the status of each PSU.
- Can we extend the "sensor" test to cover the psuutil and rename the test to be more general, for example "platform" test ?
-
For Users
-
For Developers
-
Subgroups/Working Groups
-
Presentations
-
Join Us