summaryrefslogtreecommitdiffstats
path: root/obmc/sensors.py
Commit message (Collapse)AuthorAgeFilesLines
* sensors: Remove sensor managerHEADmasterAdriana Kobylak2018-08-211-52/+0
| | | | | | | | | | | | | | This sensor manager was in charge of creating the /org/openbmc/sensors object and initializing them, but this path is now deprecated and the sensors have moved to other paths specified by the ipmi sensor config.yaml file in the openbmc/openbmc repo. This sensor manager can now be removed. Tested: Powered on a Witherspoon to the Host OS without ipmi giving get/set sensor errors. Change-Id: Id9f7626d84d49c62cdb48b5d75f4247ed5813b4c Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* sensors: Remove PowerSupplyDeratingSensorAdriana Kobylak2018-08-211-11/+0
| | | | | | | | | | | | The PowerSupplyDerating Sensor is being added to the ipmi sensor.yaml file since the /org/openbmc/sensors path is being deprecated. Remove this sensor from the org path. Tested: Powered on a Witherspoon to the Host OS without sensor errors. Change-Id: Ie6c4a0b649c374c323b87092895d319a98d7cede Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* sensors: Remove PowerSupplyRedundancySensorAdriana Kobylak2018-08-211-46/+0
| | | | | | | | | | | | The PowerSupplyRedundancy Sensor is being added to the ipmi sensor.yaml file since the /org/openbmc/sensors path is being deprecated. Remove this sensor from the org path. Tested: Powered on a Witherspoon to the Host OS without sensor errors. Change-Id: Ie5ad41e7723de67c665576d6a69210df82710869 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* sensors: Remove TurboAllowedSensorAdriana Kobylak2018-08-201-11/+0
| | | | | | | | | | | | The TurboAllowed sensor is already mapped to /xyz/openbmc_project/control/host0/turbo_allowed (Reference: the phosphor-ipmi-sensor-inventory-mrw-config/config.yaml file). Remove it from the deprecated /org/openbmc/sensors path. Tested: Powered on a Witherspoon to the Host OS without errors. Change-Id: Ic1df697756721305ab00b630e74f33160e24e522 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* sensors: Remove BootCountSensorAdriana Kobylak2018-08-081-15/+0
| | | | | | | | | | | | | | The BootCountSensor has moved from the /org/openbmc/sensors path to /xyz/openbmc_project/state/host0. Remove it as it's deprecated. Tested: Verified that the "AttemptsLeft" host property where the BootSensor value now resides had the default value of 3 and was decremented when the Host didn't boot. Then on a successful boot this value was set back to 3. Change-Id: I87e2707abe7b052d4363bc583233780112200e4f Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* sensors: Remove OperatingSystemStatusSensorAdriana Kobylak2018-08-081-12/+0
| | | | | | | | | | | | The OperatingSystemStatusSensor has moved from the /org/openbmc/sensors path to /xyz/openbmc_project/state/host0 and its value in the org path is no longer being updated. Remove this unused sensor class. Tested: Powered on a Witherspoon to the Host OS. Change-Id: I9cb50d999e475583fbdcf0443da73fe6b807f7bd Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* sensors: Remove BootProgressSensorAdriana Kobylak2018-08-071-30/+0
| | | | | | | | | | | | | | The boot progress sensor has moved from the /org/openbmc/sensors path to /xyz/openbmc_project/state/host0. (Reference: the phosphor-ipmi-sensor-inventory%/config.yaml files under the openbmc/openbmc repository). Remove the deprecated sensor class. Tested: Verified Witherspoon powered on to the Host OS. Change-Id: I46ae2a2c6b228759bcde77773f451e201bc40732 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Enable pycodestyleBrad Bishop2018-03-291-5/+5
| | | | | | | Apply fix-ups and run pycodestyle during CI testing. Change-Id: I1005495b11e228abdc8d40a51dbf81c4a6e6c92c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Port to python 3CamVan Nguyen2018-03-121-4/+4
| | | | | | | | Port code to python 3 yet remain backward compatible to python 2. This port is in preparation for yocto 2.4 upgrade. Change-Id: I564824b00c106a2c7ebd2f4a9607cd01eabf1322 Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* witherspoon: correct power supply derating valueDeepak Kodihalli2018-02-231-1/+1
| | | | | | | The derating factor should be 90%. Change-Id: Id67adc69f1ecd3cfb3ea083e56bb2486644d549a Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Point PowerSupplyRedundancySensor to new interfaceGunnar Mills2018-02-131-1/+42
| | | | | | | | | | | | | | | | | | | The PowerSupplyRedundancy sensor is used by the Host to know whether the system has redundant power supply support. The sensor is implemented under the legacy openbmc/pyphosphor repo which does not persist it's values. This commit will move this sensor into the official phosphor settings repo (which does have persistency support) but also keep the legacy interfaces in place for backwards compatibility. The PowerSupplyRedundancySensor should look at the new PowerSupplyRedundancy interface for its value and when setting the PowerSupplyRedundancySensor, set the new value. Resolves openbmc/openbmc#2833 Change-Id: I490d385efba70f26b1a3eac87074b1fa0f8cd907 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Revert "Port obmc to python3.5"Brad Bishop2018-01-311-2/+2
| | | | | | | | | | Parse error with this change: TypeError: iter() returned non-iterator of type 'PathTreeItemIterator' This reverts commit f99783be6592130bbad2d0f69ada2b7ac61618f3. Change-Id: Id2b7f4af5284d25d59e19905c7b873726b02f700 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Port obmc to python3.5Balaji B Rao2018-01-301-2/+2
| | | | | Change-Id: I1ed6c6bd914635485a697369048a8be9e5919fc6 Signed-off-by: Balaji B Rao <balajibapu@gmail.com>
* Make PowerSupplyRedundancy writeable.Dhruvaraj Subhashchandran2017-12-051-8/+1
| | | | | | | | | Power Supply redundancy is read only, based on the requirement for customers to set it, enabling set value on this sensor. Change-Id: I1f2d5e892c0d729fe3f541a2d8c981b4bd678d60 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Change default of PowerSupplyRedundancy to enabledAndrew Geissler2017-11-211-1/+1
| | | | | | | | | | | | | | By default, systems should be in redundant mode so the power management system properly handles power supply failures. When this setting is disabled, the OCC will disable GPU throttling and will not enforce a n level power cap. Partially Resolves openbmc/openbmc#2665 Change-Id: I7850d962172d3a0209ef5fee8d39b5c57e6ef5c0 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* libsensors: pep8 fixesBrad Bishop2017-07-011-4/+7
| | | | | Change-Id: If2608216a919be9b929ac2f99ad29ba2b789fa98 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* libsensors: Remove unused or unsupported typesBrad Bishop2017-07-011-189/+0
| | | | | | | | A number of these types are unused or are now implemented in the xyz sensors namespace. Remove. Change-Id: Ic177bef8eba0f8add38254494051d2049a1148be Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Increase boot count for SBE side switchAndrew Geissler2017-05-221-1/+10
| | | | | | | | The host gets one additional boot try when switching over to the alternate SBE seeprom side Change-Id: Ia692fffdb6720a1b80d9cf2c9cdc279acf84efe5 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Disable user updates for Power Cap SensorJayanth Othayoth2017-04-191-11/+1
| | | | | | | Resolves openbmc/openbmc#1421 Change-Id: Id956ea27f5e212928b9698c11180d1945e3350c3 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
* Add Power Supply Derating Sensor Support.Jayanth Othayoth2017-03-281-0/+11
| | | | | Change-Id: I328315159d1b7c0287f4af5b69973e2c708a7cb2 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
* Add Turbo Allowed Sensor supportJayanth Othayoth2017-03-281-0/+11
| | | | | Change-Id: I407e507f79e0491e36b0404a8ba486a5c88469f5 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
* Corrected sensor name from PsRedundancy to PowerSupplyRedundancyDhruvaraj Subhashchandran2017-03-281-1/+1
| | | | | | | resolves openbmc/openbmc#1391 Change-Id: Iba7d2af745f8e30e42fd447b8cc3f05cb76c9eb5 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Sensor reading support for Power Supply RedundancyDhruvaraj S2017-03-271-0/+11
| | | | | | | | Added Power Supply Redundancy Sensor and prevented setting the value. Change-Id: If05ecb74c1e05ac59da1ae4dbb265ba65ce7744b Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Add BootProgress signal for BootProgressSensorYi Li2016-11-101-0/+5
| | | | | | | | | This signal broadcasts current boot progress when sensor value changes. Partially resolves openbmc/openbmc#315 Change-Id: If490852f2cfc620f720d6edfa629881212a43312 Signed-off-by: Yi Li <adamliyi@msn.com>
* change sensor scaling algorithm for exponential scalesEdward A. James2016-08-181-5/+13
| | | | | | | | | | - scale values should be exponentials (10^x) - implement adjust factor depends on Iaf2d5e30df620212dd3c9e821d6462964520dc44 Change-Id: Id4e1dfad0def21f9f1d341d859c3b2c237dea080 Signed-off-by: Edward A. James <eajames@us.ibm.com>
* Add parameter to Emergency signal of SensorThresholdsYi Li2016-07-291-3/+6
| | | | | | | | | | | | When sensor value is out of range of threshold, an "Emergency" signal will be emitted. Add a "message" parameter to the signal, to provide detail information on the cause of "Emergency". This information will be logged in an ESEL. Partially resolves openbmc/skeleton#64 Change-Id: I501188b36718b8a87582558c349c0316e1092db5 Signed-off-by: Yi Li <adamliyi@msn.com>
* Move sensors.py and propertycacher.py frm skeletonBrad Bishop2016-05-171-0/+281
These skeleton module are somewhat general purpose so move them here. This is just a straight copy plus a pep8 run. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud