How to list all sensors through redfish?

Gunnar Mills gmills at linux.vnet.ibm.com
Wed Oct 14 03:30:34 AEDT 2020


On 10/12/2020 8:17 PM, Lei Yu wrote:
> On Sat, Oct 10, 2020 at 9:06 PM Li, Yong B <yong.b.li at intel.com> wrote:
>>
>> Hi All,
>>
>> Based on the current bmcweb implementation:
>>
>> https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/sensors.hpp#L61
>>
>> The below URL only list these power/current/utilization sensors:
>>
>> redfish/v1/Chassis/$chassis/Sensors
>>
>> Just want to know why not list all running sensors? Is it required by redfish spec?

We asked this question in the Redfish forum thread below and Redfish 
said "for sensors that are not covered elsewhere in the model - meaning 
don't duplicate Power and Thermal".

>>
>>
>> Is there any way to  list all sensors through redfish interface? Like the “ipmitool sensor list” command?
>>

Not in one command. You will have to call the Thermal, Power, and 
Sensors schemas like the webui does: 
https://github.com/openbmc/webui-vue/blob/e9a59c75670461a80156554a4dfa04bab5eaf42c/src/store/modules/Health/SensorsStore.js#L22

In 2020.4, this changes and all sensors will be in one location. :)

> 
> I just saw some discussion in the IRC by GunnarM quoted as:
> 
>> /sensors is sensors that aren't in Power/Thermal https://redfishforum.com/thread/190/sensorcollection-contain-all-sensors-chassis
>> For 2020.4 this changes, all sensors will be under /sensors with only a link to the Power/Thermal/Fan/Powersupply schemas
> 
> But from the Redfish spec it does not say /sensors should exclude the
> ones in Power/Thermal, instead /sensors is "the link to the collection
> of sensors located in the equipment and sub-components"
Yeah the spec should have clarified. Probably isn't worth clarifying in 
the spec now because this changes in 2020.4 and that would be the 
release any updated spec is available.

> So I am expecting that it should contain all the sensors in the system.
> In OpenBMC, this could be done by returning all the objects that
> implement the xyz.openbmc_project.Sensor.Value interface.
> 

We implemented this way because of that thread. Feel free to reply on 
that thread.

Thanks,
Gunnar


More information about the openbmc mailing list