Read proc temps and dimm temps
This commit uses openpower-occ-control to monitor the temperature and
power sensors, and create sensors on D-BUS. In the loop, read the
sensor values every 1 seconds.
Tested:
I use virtual data to get sensor values:
busctl tree org.open_power.OCC.Control
|-/org
| `-/org/open_power
| `-/org/open_power/control
| |-/org/open_power/control/occ0
| `-/org/open_power/control/occ1
`-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/sensors
|-/xyz/openbmc_project/sensors/power
| |-/xyz/openbmc_project/sensors/power/p0_mem_2_power
| |-/xyz/openbmc_project/sensors/power/p0_mem_power
| |-/xyz/openbmc_project/sensors/power/p0_power
| |-/xyz/openbmc_project/sensors/power/p1_mem_power
| |-/xyz/openbmc_project/sensors/power/p1_power
| |-/xyz/openbmc_project/sensors/power/p2_mem_power
| |-/xyz/openbmc_project/sensors/power/p2_power
| |-/xyz/openbmc_project/sensors/power/p3_mem_power
| |-/xyz/openbmc_project/sensors/power/p3_power
| `-/xyz/openbmc_project/sensors/power/total_power
`-/xyz/openbmc_project/sensors/temperature
|-/xyz/openbmc_project/sensors/temperature/dimm5_dram_temp
|-/xyz/openbmc_project/sensors/temperature/dimm9_dram_temp
|-/xyz/openbmc_project/sensors/temperature/proc0_core2_temp
|-/xyz/openbmc_project/sensors/temperature/proc0_core3_temp
|-/xyz/openbmc_project/sensors/temperature/proc1_core2_temp
|-/xyz/openbmc_project/sensors/temperature/proc1_core3_temp
|-/xyz/openbmc_project/sensors/temperature/vrm_vdd0_temp
`-/xyz/openbmc_project/sensors/temperature/vrm_vdd1_temp
busctl introspect org.open_power.OCC.Control
/xyz/openbmc_project/sensors/temperature/proc0_core3_temp
NAME TYPE SIGNATURE RESULT/VALUE
org.freedesktop.DBus.Introspectable interface - -
.Introspect method - s
org.freedesktop.DBus.Peer interface - -
.GetMachineId method - s
.Ping method - -
org.freedesktop.DBus.Properties interface - -
.Get method ss v
.GetAll method s a{sv}
.Set method ssv -
.PropertiesChanged signal sa{sv}as -
xyz.openbmc_project.Sensor.Value interface - -
.MaxValue property d 0
.MinValue property d 0
.Unit property s "xyz.openbmc...
.Value property d 49
xyz.openbmc_project.State.Decorator.OperationalStatus interface - -
.Functional property b true
busctl introspect org.open_power.OCC.Control
/xyz/openbmc_project/sensors/power/total_power
NAME TYPE SIGNATURE RESULT/VALUE
org.freedesktop.DBus.Introspectable interface - -
.Introspect method - s
org.freedesktop.DBus.Peer interface - -
.GetMachineId method - s
.Ping method - -
org.freedesktop.DBus.Properties interface - -
.Get method ss v
.GetAll method s a
.Set method ssv -
.PropertiesChanged signal sa{sv}as -
xyz.openbmc_project.Sensor.Value interface - -
.MaxValue property d 0
.MinValue property d 0
.Unit property s "xyz.openbmc...
.Value property d 83
xyz.openbmc_project.State.Decorator.OperationalStatus interface - -
.Functional property b true
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Iff30ab51745dab500fa19aa4c35b07e0052ac665
6 files changed