All of lore.kernel.org
 help / color / mirror / Atom feed
* Removing sensors on standby
@ 2019-06-11 10:07 Thaj
  2019-06-11 15:45 ` Ed Tanous
  2019-06-11 16:42 ` Matt Spinler
  0 siblings, 2 replies; 3+ messages in thread
From: Thaj @ 2019-06-11 10:07 UTC (permalink / raw)
  To: OpenBMC Maillist


[-- Attachment #1.1: Type: text/plain, Size: 712 bytes --]

Hi,

As per current implementation of OpenBMC sensor architecture sensor is
added/removed when hwmon driver is probed/removed.
But there are scenarios where hwmon driver is available but values are not
available. For example there are some sensors (VR, ADC, pwm tach) in my
system which are unavailable on BMC Standby(Host powered OFF). Power to
these devices are removed when host is off causing hwmon driver to read a
value 0. Please find the attached screenshot for reference.

Requirement is that, Sensor should be monitored only on host powered ON
state.

How to handle sensors in this case?

Is it a good idea to add a config file entry for this purpose (something
like REMOVE_ON_STANDBY) ?

Regards,
Thaj

[-- Attachment #1.2: Type: text/html, Size: 914 bytes --]

[-- Attachment #2: Sensor.PNG --]
[-- Type: image/png, Size: 39228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing sensors on standby
  2019-06-11 10:07 Removing sensors on standby Thaj
@ 2019-06-11 15:45 ` Ed Tanous
  2019-06-11 16:42 ` Matt Spinler
  1 sibling, 0 replies; 3+ messages in thread
From: Ed Tanous @ 2019-06-11 15:45 UTC (permalink / raw)
  To: Thaj, OpenBMC Maillist

On 6/11/19 3:07 AM, Thaj wrote:
> 
> Requirement is that, Sensor should be monitored only on host powered ON
> state.  
> 

The dbus-sensors project currently has handling of this;  I'm unsure of
whether phosphor-hwmon can monitor the host state, but I suspect there's
a way.

> 
> Is it a good idea to add a config file entry for this purpose (something
> like REMOVE_ON_STANDBY) ?
> 

Example of reading ADCs only when host is on:
https://github.com/openbmc/entity-manager/blob/3e5e41fb89b91234ef043df1137c8984f9cafdc4/configurations/WFT%20Baseboard.json#L6

Example of reading a temperature sensor only after host firmware has
been instantiated:
https://github.com/openbmc/entity-manager/blob/3e5e41fb89b91234ef043df1137c8984f9cafdc4/configurations/WFT%20Baseboard.json#L1172

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing sensors on standby
  2019-06-11 10:07 Removing sensors on standby Thaj
  2019-06-11 15:45 ` Ed Tanous
@ 2019-06-11 16:42 ` Matt Spinler
  1 sibling, 0 replies; 3+ messages in thread
From: Matt Spinler @ 2019-06-11 16:42 UTC (permalink / raw)
  To: openbmc



On 6/11/2019 5:07 AM, Thaj wrote:
> Hi,
>
> As per current implementation of OpenBMC sensor architecture sensor is 
> added/removed when hwmon driver is probed/removed.
> But there are scenarios where hwmon driver is available but values are 
> not available. For example there are some sensors (VR, ADC, pwm tach) 
> in my system which are unavailable on BMC Standby(Host powered OFF). 
> Power to these devices are removed when host is off causing hwmon 
> driver to read a value 0. Please find the attached screenshot for 
> reference.
>
> Requirement is that, Sensor should be monitored only on host powered 
> ON state.
>
> How to handle sensors in this case?
>
> Is it a good idea to add a config file entry for this purpose 
> (something like REMOVE_ON_STANDBY) ?
>
If you are referring to the phosphor-hwmon repository (as opposed to 
dbus-sensors), I would accept a patch
that does that.

There is already a case in phosphor-hwmon where an OperationalStatus 
interface, with a boolean
Functional property, can get added.  Another idea would be to set that 
to not Functional in this case,
and have the web UI check that and display something different if it 
isn't functional.

In hindsight, having another property on the Sensor.Value interface to 
give the sensor status, like
working, broken, or not-available may have been a good idea.

> Regards,
> Thaj
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-11 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 10:07 Removing sensors on standby Thaj
2019-06-11 15:45 ` Ed Tanous
2019-06-11 16:42 ` Matt Spinler

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.