Updates and future changes on phosphor-power

Brandon Wyman bjwyman at gmail.com
Wed Dec 11 09:25:39 AEDT 2019


On Mon, Dec 9, 2019 at 9:25 PM Lei YU <mine260309 at gmail.com> wrote:
>
> On Tue, Dec 10, 2019 at 5:10 AM Kun Yi <kunyi at google.com> wrote:
> >
> > Hello Lei,
> >
> > We have some interest to help contribute to the phosphor-power utils.
> >
>
> Great!
>
> >
> > Will phosphor-power provide PMBus fault status bits monitoring?
>
> Yes, it already does monitor PMBus fault, see [power_supply.cpp#L134][1]
>
Yes, the current power supply monitoring application does provide for
status bit monitoring. The generic ones are at the top level of the
tree:
STATUS_WORD fault bits:
 https://github.com/openbmc/phosphor-power/blob/1d103428e50ec000372e6b1c2bccc8ee92ddbc89/pmbus.hpp#L45
STATUS_VOUT fault bits:
 https://github.com/openbmc/phosphor-power/blob/1d103428e50ec000372e6b1c2bccc8ee92ddbc89/pmbus.hpp#L84
STATUS_TEMPERATURE fault bits:
 https://github.com/openbmc/phosphor-power/blob/1d103428e50ec000372e6b1c2bccc8ee92ddbc89/pmbus.hpp#L94

There are some potential conflicts though with whether one really
wants to be monitoring certain faults, such as the fan or temperature
faults. There is also no universal definition for STATUS_MFR:
STATUS_MFR: https://github.com/openbmc/phosphor-power/blob/1d103428e50ec000372e6b1c2bccc8ee92ddbc89/power-supply/power_supply.cpp#L351
If one looks at "PMBus Power System Mgt Protocol Specification – Part
II", the details to STATUS_MFR_SPECIFIC list every bit as
"Manufacturer Defined", so any attempt to further analyze the fault
based on those bits would be specific to the power supply being used.

Some of that, along with the input history collection it is currently
doing, should probably be configurable. That along with some other
things lead to a proposal for creating a new application that would be
driven via a JSON file, etc.:
https://github.com/openbmc/docs/blob/master/designs/psu-monitoring.md

I have some code in progress towards implementing the new power supply
monitoring application, trying to drive towards a more configurable
approach.

>
> > How is it co-operating with phosphor-hwmon or dbus-sensors when reading sensor data from the same PSU device over the same i2c bus?
>
> As far as I know, it does not co-operates with phosphor-hwmon (and I
> am not familiar with dbus-sensors). @Matt Spinler correct me if I am
> wrong.
> Instead, it sends the error log to logging service with the inventory
> path when the error is found. See [power_supply.cpp#L309][2]
> And when the error is gone, it resolves the error by setting the
> `Resolved` property of the log. See [power_supply.cpp#L282]
>
I am not aware of any direct interaction that the power supply monitor
has with phosphor-hwmon or dbus-sensors. There is however some
telemetry data that potentially gets collected via the phosphor-hwmon
application. That is pushing up data such as the input voltage, input
power, etc. I am not very familiar with dbus-sensors, but I am
assuming it serves a similar telemetry purpose.

> There is a [fault-monitor][4] in phosphor-led-manager that monitors
> the error logs in logging service, and assert/deassert the related
> fault LED group.
> So the fault LED will be turned on when an error occurs, and turned
> off when the error is resolved or cleared.
>
That fault LED interaction is somehow tied to associations.
Example associations.json:
https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json

> [1]: https://github.com/openbmc/phosphor-power/blob/1d103428e50ec000372e6b1c2bccc8ee92ddbc89/power-supply/power_supply.cpp#L134
> [2]: https://github.com/openbmc/phosphor-power/blob/1d103428e50ec000372e6b1c2bccc8ee92ddbc89/power-supply/power_supply.cpp#L309
> [3]: https://github.com/openbmc/phosphor-power/blob/1d103428e50ec000372e6b1c2bccc8ee92ddbc89/power-supply/power_supply.cpp#L282
> [4]: https://github.com/openbmc/phosphor-led-manager/tree/master/fault-monitor

These references, along with the ones I included inline are hopefully helpful.


More information about the openbmc mailing list