PMON Voltage/Current Sensor Monitoring Enhancement#1394
Conversation
|
@bmridul why not use the existing |
Hi @prgeor, Please note that the solution proposed is not mutually exclusive to Sensord/Lmsensors. The solution proposed here can be used alongside or without Sensord. There are 2 main reasons we are proposing this.
However, the issue is that there are a number of devices which report voltage/current measurements that are not supported by hwmon. An example is device LTC2497 which can report voltage measurements. The open source driver available for this device supports a different linux infrastructure – Industrial I/O The driver code is here : https://github.com/torvalds/linux/blob/master/drivers/iio/adc/ltc2497.c This device will not be monitored by hwmon unless we patch its standard kernel driver which is not something we would want to do. Sensormon can cover this gap and provide one CLI/rpcoess to view/monitor all the voltage and current sensors.
|
@bmridul I am still not quite convinced the use of sensormon, since devices using IIO is mostly used in consumer products like laptop, mobile phones. The operating range of the chip is best known to the chip manufacturer and hence its better to depend upon the chip based alarm rather than platform integrator arriving at the customized threshold to raise alarms. As you rightly pointed out, hwmon already includes almost all sensors barring few exceptions, so I would prefer if you make effort to include these few exception devices included in hwmon support. Nevertheless, please capture the reasons in the HLD for sensormon. |
@prgeor , Thanks for your comments. I will update the HLD with more details. Few responses
The uber point is that the sensord may not provide complete coverage. If Linux Sensord is good enough for a platform, it can choose not to use this infra. We can discuss further in community meeting. |
|
As discussed during the community call today -- please explore integration with SONiC PDDF (https://github.com/sonic-net/SONiC/blob/master/doc/platform/brcm_pdk_pddf.md) so that platform vendors can easily integrate support for voltage/current sensors using their PDDF JSON files. |
Junchao-Mellanox
left a comment
There was a problem hiding this comment.
A few general comments:
- How is the daemon connect to system health service?
- How is the daemon connect to snmp?
- How to build the sensor hierarchy relation? For example, should PSU voltage sensor object under PSU object or under chassis object?
- There is already logic in PSUD to handle PSU voltage threshold, do you plan to remove it?
- How to handle hot swappable sensors? For example, PSU sensor, module sensor?
I looked briefly into the PDDF documentation and some code. It seems the PDDF support for voltage and current sensors can be added in a similar way as as other platform components are supported. E,g, The code below is implementing the platform support for thermal sensors. Voltage and current sensors support can be similarly added. |
Added support for voltage and current sensor monitoring CLIs as mentioned in the feature HLD for PMON Voltage/Current Sensor Monitoring Enhancement. sonic-net/SONiC#1394 * Addressed review comments * Fix review comment * UT file * Fixed dependency for running unit test on platform common changes * Fixed standalone unit test failure * Addressed review comment
Sensormond daemon is introduced. It collects the voltage and current sensor information from the platform and populates in the StateDB. The sensor data is available to view using CLIs. Sensormond raises syslogs when the sensors report measurement outside the thresholds. sonic-net/SONiC#1394
|
It would be good to show the out of out of range sensor readings in system health o/p. Currently out of range temperature sensors are also not shown in system health. We should add those as well. I have added PR for system health integration. |
SNMP support will need to be added to represent the voltage/current sensors in Entity MIB. We will need to address this with changes in rfc2737 implmentation. |
Enable Sensormon daemon in PMON container. Pls see HLD : sonic-net/SONiC#1394
|
HLD is merged but code PRs are still open, move to backlog |
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com>
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com> Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com> Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com> Signed-off-by: Nishanth Sampath Kumar <nissampa@cisco.com>
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com> Signed-off-by: Johanna Jegan <johanna@nexthop.ai>
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com> Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com> Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR Sonic-mgmt tests for CLI introduced as part of Sensormon. HLD - sonic-net/SONiC#1394 Summary: Added tests for Sensormon supported CLIs for show platform voltage show platform current <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [x ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [ ] 202505 - [ ] 202511 ### Approach #### What is the motivation for this PR? Added first set of sonic mgmt tests for Sensormon feature. #### How did you do it? Ran the tests on the DUT. #### Supported testbed topology if it's a new test case? Any. Should be applicable to all ### Documentation HLD link provided above. <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? --> Signed-off-by: Mridul Bajpai <mridul@cisco.com> Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
HLD for Voltage and Current sensor monitoring.
Related PRs: