-
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 | |
0.2 | Andrii Savka | Added presence status to API and CLI |
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. Each vendor needs to implement the PSU module for API which should consist the implementation of each function. The API has following functions:
API | Return value | Description |
---|---|---|
get_num_psus() | integer | the number of PSUs which are available in the platform |
get_psu_status(psu_index) | True if PSU has correct functioning, False if not. | Function takes a zero-based PSU index and provides the status. Any platform-specific appropriate voltage/amperage/temperature calculations should be carried out to determine whether the PSU is operating properly or not. |
get_psu_presence(psu_index) | True if PSU is plugged, False if not. | Function takes a zero-based PSU index and provides the presence info |
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 show the PSU status and presence info. 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 |
The CLI has a following output for :
Module | Status |
---|---|
PSU 1 | OK (status == True, presence == True) |
PSU 2 | NOT OK (status == False, presence == True) |
PSU X | NOT PRESENT (presence == False) |
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