Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include sensor monitor for our platform [meta-facebook] #24

Open
manishtoc opened this issue May 6, 2021 · 16 comments
Open

Include sensor monitor for our platform [meta-facebook] #24

manishtoc opened this issue May 6, 2021 · 16 comments

Comments

@manishtoc
Copy link

        i wanted to enable the sensor monitors like "ShutdownAlaramMonitor" and "ThesholdAlaramLogger" to our system to monitor the sensor values of our fan.
     
        i created phosphor-fan_bbappend files and try to enable the sensor-monitor like "control", "monitor".
        But still sensor-monitor is not enabled.

       Could you please provide any suggestions on this.
@spinler
Copy link
Contributor

spinler commented May 6, 2021

In meta-ibm I did it like:

$ git grep sensor-monitor meta-ibm
meta-ibm/recipes-phosphor/fans/phosphor-fan_%.bbappend:PACKAGECONFIG_append_p10bmc = " json sensor-monitor"
meta-ibm/recipes-phosphor/fans/phosphor-fan_%.bbappend:FAN_PACKAGES_append_p10bmc = " sensor-monitor"
meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend:RDEPENDS_${PN}-fan-control_append_p10bmc = " fan-watchdog sensor-monitor"

@manishtoc
Copy link
Author

i did this for meta-facebook code is compiling fine but senor-monitor service file is not created in /lib/systemd/system
grep -nr " sensor-monitor"
recipes-fb/packagegroups/packagegroup-fb-apps.bb:39:RDEPENDS_${PN}-fan-control_append_yosemitev2 = "fan-watchdog sensor-monitor"
recipes-phosphor/fans/phosphor-fan_%.bbappend:8:PACKAGECONFIG_append_yosemitev2 = " json sensor-monitor"
recipes-phosphor/fans/phosphor-fan_%.bbappend:9:FAN_PACKAGES_append_yosemitev2 = " sensor-monitor"

@manishtoc
Copy link
Author

i enabled the sensor-monitor for platform meta-facebook .
but sensor-monter service file is not running i am getting below error.
an 01 00:02:50 yosemitev2 systemd[1]: Started Sensor Monitor.
Jan 01 00:02:50 yosemitev2 sensor-monitor[808]: Could not find PGOOD interface org.openbmc.control.Power on D-Bus
Jan 01 00:02:50 yosemitev2 sensor-monitor[808]: terminate called after throwing an instance of 'phosphor::fan::util::DBusServiceError'
Jan 01 00:02:51 yosemitev2 sensor-monitor[808]: what(): DBus service lookup failed: /org/openbmc/control/power0 org.openbmc.control.Power

@spinler
Copy link
Contributor

spinler commented May 13, 2021

sensor-monitor is using some code used by fan-control that looks at a pgood property that apparently x86 doesn't use. I think for the case of sensor-monitor at the very least it can be changed to look at the CurrentPowerState property on the chassis state interface. If you look in https://github.com/openbmc/phosphor-fan-presence/blob/master/power_state.hpp it should be pretty straight forward to make a new derived class to look at that property, and then change the sensor-monitor code to create an instance of that instead.

@manishtoc
Copy link
Author

We enable sensor-monitor services, and Fan Monitoring interface (xyz.openbmc_project.Thermal.Alert ) .
but for the sensor monitor i need this two interface xyz.openbmc_project.Sensor.Threshold.HardShutdown and xyz.openbmc_project.Sensor.Threshold.SoftShutdown how we can enble this .

@spinler
Copy link
Contributor

spinler commented May 25, 2021

Those threshold interfaces are pretty new. I've built them into phosphor-virtual-sensor, but not sure if any other sensor apps implement them yet. Which one are you using? You may need to add support for them.

@manishtoc
Copy link
Author

We wanted to power off the slots when the fan sensor values goes below the critical value for our platform .

we have added the shutdown interfaces in the phosphor-virtual-sensor . now shutdown interface dbus propertys are created .
could you please let us know where the shutdown action {host/slots, bmc} can be taken care .

@spinler
Copy link
Contributor

spinler commented Jun 2, 2021

@manishtoc
Copy link
Author

We wanted to power on , and agin power off the slots on if threshold value cross. like if the threshold values is more than 120 power off the slot and agin if reach to 95 i want to power on the slot.

Could you please let us know any Interface is avilable for Power on the slot .

@manishtoc
Copy link
Author

chassis

sensor-monitor is using some code used by fan-control that looks at a pgood property that apparently x86 doesn't use. I think for the case of sensor-monitor at the very least it can be changed to look at the CurrentPowerState property on the chassis state interface. If you look in https://github.com/openbmc/phosphor-fan-presence/blob/master/power_state.hpp it should be pretty straight forward to make a new derived class to look at that property, and then change the sensor-monitor code to create an instance of that instead.

Can we by pass the power control (pgood property that apparently x86 doesn't use ) for our platfrom.

@spinler
Copy link
Contributor

spinler commented Jun 17, 2021

We wanted to power on , and agin power off the slots on if threshold value cross. like if the threshold values is more than 120 power off the slot and agin if reach to 95 i want to power on the slot.

Could you please let us know any Interface is avilable for Power on the slot .

I haven't written anything like that in this code since we didn't need it. You are welcome to add whatever you need. I assume you have some d-bus interface that can power on slots? You may want to make a new Monitor class for this power on part.

@spinler
Copy link
Contributor

spinler commented Jun 17, 2021

chassis

sensor-monitor is using some code used by fan-control that looks at a pgood property that apparently x86 doesn't use. I think for the case of sensor-monitor at the very least it can be changed to look at the CurrentPowerState property on the chassis state interface. If you look in https://github.com/openbmc/phosphor-fan-presence/blob/master/power_state.hpp it should be pretty straight forward to make a new derived class to look at that property, and then change the sensor-monitor code to create an instance of that instead.

Can we by pass the power control (pgood property that apparently x86 doesn't use ) for our platfrom.

I'm not entirely sure what you mean, but I have no problem with you making it behave how you need, as long as you don't break what is currently there (so use compiler options, etc).

@manishtoc
Copy link
Author

manishtoc commented Jul 13, 2021

pgood property that apparently x86 doesn't use
we are using Slot PowerCycle: (xyz.openbmc_project.State.Host1) to check the power state that is inclusive of BMC . if Bmc is power off what is the use of checking the power state of Slot power ? in this case can you please suggest how we can implement or power state for x86 or either (some compiler option or configuration to disable power state check). https://github.com/openbmc/phosphor-fan-presence/blob/master/power_state.hpp.

@spinler
Copy link
Contributor

spinler commented Jul 13, 2021

Hi @manishtoc,
What I mean is:

  1. Make a new class derived from PowerState, similar to how we wrote PGoodState at https://github.com/openbmc/phosphor-fan-presence/blob/master/power_state.hpp#L135
  2. Have that class check State.Host1 or whatever you need to tell you if power is on and when it turns on. So similar to how PGoodState works, just with different properties/interfaces.
  3. Add a compiler option to control which class gets created here: https://github.com/openbmc/phosphor-fan-presence/blob/master/sensor-monitor/main.cpp#L31

@manishtoc
Copy link
Author

Hi @spinler
we don't have Have any power interafce similar to (PGood) , our host /bmc is always on (power state ) and if host/bmc is power off what is the use ok cheking this power state . i just don't want to not use this power state class . Can u please suggest how i can skip this one power state check for my platfrorm (metafacebook).
std::shared_ptrphosphor::fan::PowerState powerState =
std::make_sharedphosphor::fan::PGoodState();

@HCL-BMC
Copy link
Contributor

HCL-BMC commented Oct 26, 2021

Hi @spinler ,

https://github.com/openbmc/phosphor-fan-presence/blob/master/power_state.hpp#L135

Was PGoodState class implemented to get powerstate of fan ?

In our system, we don't have fan fru. In this case, can we implement a new derived class and get the power state of hosts ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants