* Faking Sensor Readings @ 2019-12-03 12:06 rgrs 2019-12-03 13:49 ` Alexander Amelkin 0 siblings, 1 reply; 12+ messages in thread From: rgrs @ 2019-12-03 12:06 UTC (permalink / raw) To: openbmc [-- Attachment #1: Type: text/plain, Size: 197 bytes --] Hi, How do I fake sensor readings in OpenBMC? We're trying to fake temperature sensors and make sure fans ramp up/down accordingly. Please share any documents related to these tests. Thanks, Raj [-- Attachment #2: Type: text/html, Size: 313 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-03 12:06 Faking Sensor Readings rgrs @ 2019-12-03 13:49 ` Alexander Amelkin 2019-12-03 20:04 ` James Feist 0 siblings, 1 reply; 12+ messages in thread From: Alexander Amelkin @ 2019-12-03 13:49 UTC (permalink / raw) To: openbmc [-- Attachment #1.1: Type: text/plain, Size: 360 bytes --] 03.12.2019 15:06, rgrs wrote: > Hi, > > How do I fake sensor readings in OpenBMC? > We're trying to fake temperature sensors and make sure fans ramp up/down > accordingly. > We ended up patching the kernel driver to fake the readings by request. I'm not aware of any ready interface in OpenBMC for that. With best regards, Alexander Amelkin [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-03 13:49 ` Alexander Amelkin @ 2019-12-03 20:04 ` James Feist 2019-12-04 9:39 ` rgrs 0 siblings, 1 reply; 12+ messages in thread From: James Feist @ 2019-12-03 20:04 UTC (permalink / raw) To: Alexander Amelkin, openbmc; +Cc: Thomaiyar, Richard Marian On 12/3/19 5:49 AM, Alexander Amelkin wrote: > 03.12.2019 15:06, rgrs wrote: >> Hi, >> >> How do I fake sensor readings in OpenBMC? >> We're trying to fake temperature sensors and make sure fans ramp up/down >> accordingly. >> > We ended up patching the kernel driver to fake the readings by request. > > I'm not aware of any ready interface in OpenBMC for that. If you're using d-bus sensors, the sensor property is writable. It is also supported by patching the sensor value in redfish. > > With best regards, > Alexander Amelkin > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-03 20:04 ` James Feist @ 2019-12-04 9:39 ` rgrs 2019-12-04 17:10 ` James Feist 0 siblings, 1 reply; 12+ messages in thread From: rgrs @ 2019-12-04 9:39 UTC (permalink / raw) To: James Feist; +Cc: Alexander Amelkin, openbmc, Thomaiyar, Richard Marian Hi James, I tried busctl set-property, but the values didn't change. Are the steps below correct? (test with both 'field mode' enabled and disabled) root@obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager NAME TYPE SIGNATURE RESULT/VALUE FLAGS .MaxValue property x 0 emits-change writable .MinValue property x 0 emits-change writable .Scale property x -3 emits-change writable .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable .Value property x 18500 emits-change writable root@obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000 root@saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 18500 root@obmc:~# Thanks, Raj ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Wednesday, December 4, 2019 1:34 AM, James Feist <james.feist@linux.intel.com> wrote: > On 12/3/19 5:49 AM, Alexander Amelkin wrote: > > > 03.12.2019 15:06, rgrs wrote: > > > > > Hi, > > > How do I fake sensor readings in OpenBMC? > > > We're trying to fake temperature sensors and make sure fans ramp up/down > > > accordingly. > > > > We ended up patching the kernel driver to fake the readings by request. > > I'm not aware of any ready interface in OpenBMC for that. > > If you're using d-bus sensors, the sensor property is writable. It is > also supported by patching the sensor value in redfish. > > > With best regards, > > Alexander Amelkin </james.feist@linux.intel.com> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-04 9:39 ` rgrs @ 2019-12-04 17:10 ` James Feist 2019-12-06 11:32 ` rgrs 0 siblings, 1 reply; 12+ messages in thread From: James Feist @ 2019-12-04 17:10 UTC (permalink / raw) To: rgrs; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian On 12/4/19 1:39 AM, rgrs wrote: > Hi James, > > I tried busctl set-property, but the values didn't change. > Are the steps below correct? > (test with both 'field mode' enabled and disabled) > > root@obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager > NAME TYPE SIGNATURE RESULT/VALUE FLAGS > .MaxValue property x 0 emits-change writable > .MinValue property x 0 emits-change writable > .Scale property x -3 emits-change writable > .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable This looks like phosphor-hwmon, not dbus-sensors https://github.com/openbmc/dbus-sensors. > .Value property x 18500 emits-change writable > > root@obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000 > > root@saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value > x 18500 > > root@obmc:~# > > Thanks, > Raj > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Wednesday, December 4, 2019 1:34 AM, James Feist <james.feist@linux.intel.com> wrote: > > > On 12/3/19 5:49 AM, Alexander Amelkin wrote: > > > > > 03.12.2019 15:06, rgrs wrote: > > > > > > > Hi, > > > > How do I fake sensor readings in OpenBMC? > > > > We're trying to fake temperature sensors and make sure fans ramp up/down > > > > accordingly. > > > > > > We ended up patching the kernel driver to fake the readings by request. > > > I'm not aware of any ready interface in OpenBMC for that. > > > > If you're using d-bus sensors, the sensor property is writable. It is > > also supported by patching the sensor value in redfish. > > > > > With best regards, > > > Alexander Amelkin > > </james.feist@linux.intel.com> > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-04 17:10 ` James Feist @ 2019-12-06 11:32 ` rgrs 2019-12-09 18:28 ` James Feist 0 siblings, 1 reply; 12+ messages in thread From: rgrs @ 2019-12-06 11:32 UTC (permalink / raw) To: James Feist; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian Hi, I dont see any new service even after adding dbus-sensors. Please can you point to any platform in upstream that I can refer to? Thanks, Raj ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Wednesday, December 4, 2019 10:40 PM, James Feist <james.feist@linux.intel.com> wrote: > On 12/4/19 1:39 AM, rgrs wrote: > > > Hi James, > > I tried busctl set-property, but the values didn't change. > > Are the steps below correct? > > (test with both 'field mode' enabled and disabled) > > root@obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager > > NAME TYPE SIGNATURE RESULT/VALUE FLAGS > > .MaxValue property x 0 emits-change writable > > .MinValue property x 0 emits-change writable > > .Scale property x -3 emits-change writable > > .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable > > This looks like phosphor-hwmon, not dbus-sensors > https://github.com/openbmc/dbus-sensors. > > > .Value property x 18500 emits-change writable > > root@obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000 > > root@saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value > > x 18500 > > root@obmc:~# > > Thanks, > > Raj > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > On Wednesday, December 4, 2019 1:34 AM, James Feist james.feist@linux.intel.com wrote: > > > On 12/3/19 5:49 AM, Alexander Amelkin wrote: > > > > > > > 03.12.2019 15:06, rgrs wrote: > > > > > > > > > Hi, > > > > > How do I fake sensor readings in OpenBMC? > > > > > We're trying to fake temperature sensors and make sure fans ramp up/down > > > > > accordingly. > > > > > > > > We ended up patching the kernel driver to fake the readings by request. > > > > I'm not aware of any ready interface in OpenBMC for that. > > > > > > If you're using d-bus sensors, the sensor property is writable. It is > > > also supported by patching the sensor value in redfish. > > > > > > > With best regards, > > > > Alexander Amelkin > > /james.feist@linux.intel.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-06 11:32 ` rgrs @ 2019-12-09 18:28 ` James Feist 2019-12-11 9:14 ` rgrs 0 siblings, 1 reply; 12+ messages in thread From: James Feist @ 2019-12-09 18:28 UTC (permalink / raw) To: rgrs; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian On 12/6/19 3:32 AM, rgrs wrote: > Hi, > > I dont see any new service even after adding dbus-sensors. > Please can you point to any platform in upstream that I can refer to? https://github.com/openbmc/meta-intel/blob/daa333d956ad9391abcbb85468d9bc9f26ee1190/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb#L43 https://github.com/openbmc/meta-facebook/blob/master/meta-tiogapass/recipes-fbtp/packagegroups/packagegroup-fb-apps.bb If you do a ps do you see any of the sensor daemons running? root@intel-obmc:~# ps | grep -i sensor 332 root 6008 S /usr/bin/adcsensor 333 root 6356 S /usr/bin/cpusensor 334 root 5784 S /usr/bin/exitairtempsensor 335 root 5696 S /usr/bin/fansensor 336 root 5608 S /usr/bin/hwmontempsensor 337 root 5660 S intrusionsensor 339 root 5716 S /usr/bin/ipmbsensor 340 root 5512 S /usr/bin/mcutempsensor 341 root 5868 S /usr/bin/psusensor 588 root 2776 S grep -i sensor root@intel-obmc:~# If so then you'll need to add entity-manager configurations like these: https://github.com/openbmc/entity-manager/blob/7d807754cc9153b04b599804464edd9654d7a81e/configurations/WFT%20Baseboard.json#L2023 Thanks James > > Thanks, > Raj > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Wednesday, December 4, 2019 10:40 PM, James Feist <james.feist@linux.intel.com> wrote: > >> On 12/4/19 1:39 AM, rgrs wrote: >> >>> Hi James, >>> I tried busctl set-property, but the values didn't change. >>> Are the steps below correct? >>> (test with both 'field mode' enabled and disabled) >>> root@obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager >>> NAME TYPE SIGNATURE RESULT/VALUE FLAGS >>> .MaxValue property x 0 emits-change writable >>> .MinValue property x 0 emits-change writable >>> .Scale property x -3 emits-change writable >>> .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable >> >> This looks like phosphor-hwmon, not dbus-sensors >> https://github.com/openbmc/dbus-sensors. >> >>> .Value property x 18500 emits-change writable >>> root@obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000 >>> root@saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value >>> x 18500 >>> root@obmc:~# >>> Thanks, >>> Raj >>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ >>> On Wednesday, December 4, 2019 1:34 AM, James Feist james.feist@linux.intel.com wrote: >>>> On 12/3/19 5:49 AM, Alexander Amelkin wrote: >>>> >>>>> 03.12.2019 15:06, rgrs wrote: >>>>> >>>>>> Hi, >>>>>> How do I fake sensor readings in OpenBMC? >>>>>> We're trying to fake temperature sensors and make sure fans ramp up/down >>>>>> accordingly. >>>>> >>>>> We ended up patching the kernel driver to fake the readings by request. >>>>> I'm not aware of any ready interface in OpenBMC for that. >>>> >>>> If you're using d-bus sensors, the sensor property is writable. It is >>>> also supported by patching the sensor value in redfish. >>>> >>>>> With best regards, >>>>> Alexander Amelkin >>> /james.feist@linux.intel.com > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-09 18:28 ` James Feist @ 2019-12-11 9:14 ` rgrs 2019-12-11 17:29 ` James Feist 0 siblings, 1 reply; 12+ messages in thread From: rgrs @ 2019-12-11 9:14 UTC (permalink / raw) To: James Feist; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian Hi James, I don't see any results for the grep command. Our platform was built referencing Witherspoon IIRC. Below links were used during porting, https://github.com/openbmc/docs/blob/master/development/add-new-system.md https://developer.ibm.com/linuxonpower/2019/01/07/how-to-port-openbmc/ I don't see "entity manager" being used in above links. Is it something specific to Intel servers? If I were to port a new board today, which is the reference platform or guide to refer? Thx, Raj ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Monday, December 9, 2019 11:58 PM, James Feist <james.feist@linux.intel.com> wrote: > On 12/6/19 3:32 AM, rgrs wrote: > > > Hi, > > I dont see any new service even after adding dbus-sensors. > > Please can you point to any platform in upstream that I can refer to? > > https://github.com/openbmc/meta-intel/blob/daa333d956ad9391abcbb85468d9bc9f26ee1190/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb#L43 > > https://github.com/openbmc/meta-facebook/blob/master/meta-tiogapass/recipes-fbtp/packagegroups/packagegroup-fb-apps.bb > > If you do a ps do you see any of the sensor daemons running? > > root@intel-obmc:~# ps | grep -i sensor > 332 root 6008 S /usr/bin/adcsensor > 333 root 6356 S /usr/bin/cpusensor > 334 root 5784 S /usr/bin/exitairtempsensor > 335 root 5696 S /usr/bin/fansensor > 336 root 5608 S /usr/bin/hwmontempsensor > 337 root 5660 S intrusionsensor > 339 root 5716 S /usr/bin/ipmbsensor > 340 root 5512 S /usr/bin/mcutempsensor > 341 root 5868 S /usr/bin/psusensor > 588 root 2776 S grep -i sensor > root@intel-obmc:~# > > If so then you'll need to add entity-manager configurations like these: > > https://github.com/openbmc/entity-manager/blob/7d807754cc9153b04b599804464edd9654d7a81e/configurations/WFT Baseboard.json#L2023 > > Thanks > > James > > > Thanks, > > Raj > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > On Wednesday, December 4, 2019 10:40 PM, James Feist james.feist@linux.intel.com wrote: > > > > > On 12/4/19 1:39 AM, rgrs wrote: > > > > > > > Hi James, > > > > I tried busctl set-property, but the values didn't change. > > > > Are the steps below correct? > > > > (test with both 'field mode' enabled and disabled) > > > > root@obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager > > > > NAME TYPE SIGNATURE RESULT/VALUE FLAGS > > > > .MaxValue property x 0 emits-change writable > > > > .MinValue property x 0 emits-change writable > > > > .Scale property x -3 emits-change writable > > > > .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable > > > > > > This looks like phosphor-hwmon, not dbus-sensors > > > https://github.com/openbmc/dbus-sensors. > > > > > > > .Value property x 18500 emits-change writable > > > > root@obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000 > > > > root@saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value > > > > x 18500 > > > > root@obmc:~# > > > > Thanks, > > > > Raj > > > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > > > On Wednesday, December 4, 2019 1:34 AM, James Feist james.feist@linux.intel.com wrote: > > > > > > > > > On 12/3/19 5:49 AM, Alexander Amelkin wrote: > > > > > > > > > > > 03.12.2019 15:06, rgrs wrote: > > > > > > > > > > > > > Hi, > > > > > > > How do I fake sensor readings in OpenBMC? > > > > > > > We're trying to fake temperature sensors and make sure fans ramp up/down > > > > > > > accordingly. > > > > > > > > > > > > We ended up patching the kernel driver to fake the readings by request. > > > > > > I'm not aware of any ready interface in OpenBMC for that. > > > > > > > > > > If you're using d-bus sensors, the sensor property is writable. It is > > > > > also supported by patching the sensor value in redfish. > > > > > > > > > > > With best regards, > > > > > > Alexander Amelkin > > > > > > /james.feist@linux.intel.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-11 9:14 ` rgrs @ 2019-12-11 17:29 ` James Feist 2019-12-12 5:28 ` rgrs 0 siblings, 1 reply; 12+ messages in thread From: James Feist @ 2019-12-11 17:29 UTC (permalink / raw) To: rgrs; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian On 12/11/19 1:14 AM, rgrs wrote: > Hi James, > > I don't see any results for the grep command. > > Our platform was built referencing Witherspoon IIRC. > > Below links were used during porting, > > https://github.com/openbmc/docs/blob/master/development/add-new-system.md > > https://developer.ibm.com/linuxonpower/2019/01/07/how-to-port-openbmc/ > > I don't see "entity manager" being used in above links. Is it something specific to Intel servers? Entity-manager is here: https://github.com/openbmc/entity-manager, there is a readme checked in with some basic information. There is also a guide here for adding your first sensors: https://github.com/openbmc/entity-manager/blob/master/docs/my_first_sensors.md Configuration files are here: https://github.com/openbmc/entity-manager/tree/master/configurations First step is to add dbus-sensors and entity-manager to your image like the earlier provided links. Thanks, James > > If I were to port a new board today, which is the reference platform or guide to refer? > > Thx, > Raj > > > > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Monday, December 9, 2019 11:58 PM, James Feist <james.feist@linux.intel.com> wrote: > >> On 12/6/19 3:32 AM, rgrs wrote: >> >>> Hi, >>> I dont see any new service even after adding dbus-sensors. >>> Please can you point to any platform in upstream that I can refer to? >> >> https://github.com/openbmc/meta-intel/blob/daa333d956ad9391abcbb85468d9bc9f26ee1190/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb#L43 >> >> https://github.com/openbmc/meta-facebook/blob/master/meta-tiogapass/recipes-fbtp/packagegroups/packagegroup-fb-apps.bb >> >> If you do a ps do you see any of the sensor daemons running? >> >> root@intel-obmc:~# ps | grep -i sensor >> 332 root 6008 S /usr/bin/adcsensor >> 333 root 6356 S /usr/bin/cpusensor >> 334 root 5784 S /usr/bin/exitairtempsensor >> 335 root 5696 S /usr/bin/fansensor >> 336 root 5608 S /usr/bin/hwmontempsensor >> 337 root 5660 S intrusionsensor >> 339 root 5716 S /usr/bin/ipmbsensor >> 340 root 5512 S /usr/bin/mcutempsensor >> 341 root 5868 S /usr/bin/psusensor >> 588 root 2776 S grep -i sensor >> root@intel-obmc:~# >> >> If so then you'll need to add entity-manager configurations like these: >> >> https://github.com/openbmc/entity-manager/blob/7d807754cc9153b04b599804464edd9654d7a81e/configurations/WFT Baseboard.json#L2023 >> >> Thanks >> >> James >> >>> Thanks, >>> Raj >>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ >>> On Wednesday, December 4, 2019 10:40 PM, James Feist james.feist@linux.intel.com wrote: >>> >>>> On 12/4/19 1:39 AM, rgrs wrote: >>>> >>>>> Hi James, >>>>> I tried busctl set-property, but the values didn't change. >>>>> Are the steps below correct? >>>>> (test with both 'field mode' enabled and disabled) >>>>> root@obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager >>>>> NAME TYPE SIGNATURE RESULT/VALUE FLAGS >>>>> .MaxValue property x 0 emits-change writable >>>>> .MinValue property x 0 emits-change writable >>>>> .Scale property x -3 emits-change writable >>>>> .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable >>>> >>>> This looks like phosphor-hwmon, not dbus-sensors >>>> https://github.com/openbmc/dbus-sensors. >>>> >>>>> .Value property x 18500 emits-change writable >>>>> root@obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000 >>>>> root@saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value >>>>> x 18500 >>>>> root@obmc:~# >>>>> Thanks, >>>>> Raj >>>>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ >>>>> On Wednesday, December 4, 2019 1:34 AM, James Feist james.feist@linux.intel.com wrote: >>>>> >>>>>> On 12/3/19 5:49 AM, Alexander Amelkin wrote: >>>>>> >>>>>>> 03.12.2019 15:06, rgrs wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> How do I fake sensor readings in OpenBMC? >>>>>>>> We're trying to fake temperature sensors and make sure fans ramp up/down >>>>>>>> accordingly. >>>>>>> >>>>>>> We ended up patching the kernel driver to fake the readings by request. >>>>>>> I'm not aware of any ready interface in OpenBMC for that. >>>>>> >>>>>> If you're using d-bus sensors, the sensor property is writable. It is >>>>>> also supported by patching the sensor value in redfish. >>>>>> >>>>>>> With best regards, >>>>>>> Alexander Amelkin >>>>>>> /james.feist@linux.intel.com > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-11 17:29 ` James Feist @ 2019-12-12 5:28 ` rgrs 2019-12-12 15:57 ` James Feist 0 siblings, 1 reply; 12+ messages in thread From: rgrs @ 2019-12-12 5:28 UTC (permalink / raw) To: James Feist; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian Hi James, Thanks for the help. One more clarification please, How is entity-manager different from phoshor-hwmon conf files? It contains thresholds too. I was under the assumption IPMI events & logs were generated based on these conf files. LABEL_curriout2 = "p1_vddr_current" WARNLO_curriout2 = "0" CRITLO_curriout2 = "0" WARNHI_curriout2 = "115000" CRITHI_curriout2 = "130000" LABEL_invout2 = "p1_vddr_voltage" WARNLO_invout2 = "0" CRITLO_invout2 = "0" WARNHI_invout2 = "1280" CRITHI_invout2 = "1350" Thanks, Raj ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Wednesday, December 11, 2019 10:59 PM, James Feist <james.feist@linux.intel.com> wrote: > On 12/11/19 1:14 AM, rgrs wrote: > > > Hi James, > > I don't see any results for the grep command. > > Our platform was built referencing Witherspoon IIRC. > > Below links were used during porting, > > https://github.com/openbmc/docs/blob/master/development/add-new-system.md > > https://developer.ibm.com/linuxonpower/2019/01/07/how-to-port-openbmc/ > > I don't see "entity manager" being used in above links. Is it something specific to Intel servers? > > Entity-manager is here:https://github.com/openbmc/entity-manager, there > is a readme checked in with some basic information. > > There is also a guide here for adding your first sensors: > https://github.com/openbmc/entity-manager/blob/master/docs/my_first_sensors.md > > Configuration files are here: > https://github.com/openbmc/entity-manager/tree/master/configurations > > First step is to add dbus-sensors and entity-manager to your image like > the earlier provided links. > > Thanks, > > James > > > If I were to port a new board today, which is the reference platform or guide to refer? > > Thx, > > Raj > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > On Monday, December 9, 2019 11:58 PM, James Feist james.feist@linux.intel.com wrote: > > > > > On 12/6/19 3:32 AM, rgrs wrote: > > > > > > > Hi, > > > > I dont see any new service even after adding dbus-sensors. > > > > Please can you point to any platform in upstream that I can refer to? > > > > > > https://github.com/openbmc/meta-intel/blob/daa333d956ad9391abcbb85468d9bc9f26ee1190/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb#L43 > > > https://github.com/openbmc/meta-facebook/blob/master/meta-tiogapass/recipes-fbtp/packagegroups/packagegroup-fb-apps.bb > > > If you do a ps do you see any of the sensor daemons running? > > > root@intel-obmc:~# ps | grep -i sensor > > > 332 root 6008 S /usr/bin/adcsensor > > > 333 root 6356 S /usr/bin/cpusensor > > > 334 root 5784 S /usr/bin/exitairtempsensor > > > 335 root 5696 S /usr/bin/fansensor > > > 336 root 5608 S /usr/bin/hwmontempsensor > > > 337 root 5660 S intrusionsensor > > > 339 root 5716 S /usr/bin/ipmbsensor > > > 340 root 5512 S /usr/bin/mcutempsensor > > > 341 root 5868 S /usr/bin/psusensor > > > 588 root 2776 S grep -i sensor > > > root@intel-obmc:~# > > > If so then you'll need to add entity-manager configurations like these: > > > https://github.com/openbmc/entity-manager/blob/7d807754cc9153b04b599804464edd9654d7a81e/configurations/WFT Baseboard.json#L2023 > > > Thanks > > > James > > > > > > > Thanks, > > > > Raj > > > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > > > On Wednesday, December 4, 2019 10:40 PM, James Feist james.feist@linux.intel.com wrote: > > > > > > > > > On 12/4/19 1:39 AM, rgrs wrote: > > > > > > > > > > > Hi James, > > > > > > I tried busctl set-property, but the values didn't change. > > > > > > Are the steps below correct? > > > > > > (test with both 'field mode' enabled and disabled) > > > > > > root@obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager > > > > > > NAME TYPE SIGNATURE RESULT/VALUE FLAGS > > > > > > .MaxValue property x 0 emits-change writable > > > > > > .MinValue property x 0 emits-change writable > > > > > > .Scale property x -3 emits-change writable > > > > > > .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable > > > > > > > > > > This looks like phosphor-hwmon, not dbus-sensors > > > > > https://github.com/openbmc/dbus-sensors. > > > > > > > > > > > .Value property x 18500 emits-change writable > > > > > > root@obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000 > > > > > > root@saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value > > > > > > x 18500 > > > > > > root@obmc:~# > > > > > > Thanks, > > > > > > Raj > > > > > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > > > > > On Wednesday, December 4, 2019 1:34 AM, James Feist james.feist@linux.intel.com wrote: > > > > > > > > > > > > > On 12/3/19 5:49 AM, Alexander Amelkin wrote: > > > > > > > > > > > > > > > 03.12.2019 15:06, rgrs wrote: > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > How do I fake sensor readings in OpenBMC? > > > > > > > > > We're trying to fake temperature sensors and make sure fans ramp up/down > > > > > > > > > accordingly. > > > > > > > > > > > > > > > > We ended up patching the kernel driver to fake the readings by request. > > > > > > > > I'm not aware of any ready interface in OpenBMC for that. > > > > > > > > > > > > > > If you're using d-bus sensors, the sensor property is writable. It is > > > > > > > also supported by patching the sensor value in redfish. > > > > > > > > > > > > > > > With best regards, > > > > > > > > Alexander Amelkin > > > > > > > > /james.feist@linux.intel.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-12 5:28 ` rgrs @ 2019-12-12 15:57 ` James Feist 2019-12-13 6:06 ` rgrs 0 siblings, 1 reply; 12+ messages in thread From: James Feist @ 2019-12-12 15:57 UTC (permalink / raw) To: rgrs; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian On 12/11/19 9:28 PM, rgrs wrote: > Hi James, > > Thanks for the help. > > One more clarification please, > > How is entity-manager different from phoshor-hwmon conf files? > Entity-manager does runtime detection based on available d-bus properties. In most cases it's based on Fru Detection, but anything on d-bus can be used to configure. So you can write Probe statements (at the bottom of the configuration files in most cases) that say when this key/value pair exists on d-bus, install this configuration. This is most useful for add-in-cards or other removable devices, so that when it exists, the configuration gets loaded. For example this retimer card https://github.com/openbmc/entity-manager/blob/master/configurations/PCIE%20SSD%20Retimer.json says when a Fru Exists with BOARD_PRODUCT_NAME set to a specific value, then load these sensors. It can then export sensors to sysfs as well if needed. Entity-manager is also not limited to sensors, it also configures things like phosphor-pid-control https://github.com/openbmc/entity-manager/blob/7d807754cc9153b04b599804464edd9654d7a81e/configurations/WFT%20Baseboard.json#L1678. We use it specifically so we can use 1 binary for multiple baseboards assuming similar i2c topology. At a high-level view, it takes JSON and when appropriate fields are available on d-bus, puts a system configuration on d-bus, along with being able to export some i2c devices. Hope this helps -James ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Faking Sensor Readings 2019-12-12 15:57 ` James Feist @ 2019-12-13 6:06 ` rgrs 0 siblings, 0 replies; 12+ messages in thread From: rgrs @ 2019-12-13 6:06 UTC (permalink / raw) To: James Feist; +Cc: openbmc, Alexander Amelkin, Thomaiyar, Richard Marian Understood now. Thanks for the detailed reply. ~raj ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, December 12, 2019 9:27 PM, James Feist <james.feist@linux.intel.com> wrote: > On 12/11/19 9:28 PM, rgrs wrote: > > > Hi James, > > Thanks for the help. > > One more clarification please, > > How is entity-manager different from phoshor-hwmon conf files? > > Entity-manager does runtime detection based on available d-bus > properties. In most cases it's based on Fru Detection, but anything on > d-bus can be used to configure. So you can write Probe statements (at > the bottom of the configuration files in most cases) that say when this > key/value pair exists on d-bus, install this configuration. This is most > useful for add-in-cards or other removable devices, so that when it > exists, the configuration gets loaded. For example this retimer card > https://github.com/openbmc/entity-manager/blob/master/configurations/PCIE SSD Retimer.json > says when a Fru Exists with BOARD_PRODUCT_NAME set to a specific value, > then load these sensors. It can then export sensors to sysfs as well if > needed. Entity-manager is also not limited to sensors, it also > configures things like phosphor-pid-control > https://github.com/openbmc/entity-manager/blob/7d807754cc9153b04b599804464edd9654d7a81e/configurations/WFT Baseboard.json#L1678. > We use it specifically so we can use 1 binary for multiple baseboards > assuming similar i2c topology. At a high-level view, it takes JSON and > when appropriate fields are available on d-bus, puts a system > configuration on d-bus, along with being able to export some i2c devices. > > Hope this helps > > -James ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-12-13 6:06 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-12-03 12:06 Faking Sensor Readings rgrs 2019-12-03 13:49 ` Alexander Amelkin 2019-12-03 20:04 ` James Feist 2019-12-04 9:39 ` rgrs 2019-12-04 17:10 ` James Feist 2019-12-06 11:32 ` rgrs 2019-12-09 18:28 ` James Feist 2019-12-11 9:14 ` rgrs 2019-12-11 17:29 ` James Feist 2019-12-12 5:28 ` rgrs 2019-12-12 15:57 ` James Feist 2019-12-13 6:06 ` rgrs
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.