7d24ee8e | 18-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add Average and Maximum classes
These classes will implement the xyz.openbmc_project.Sensor.Aggregation.History.Average/Maximum interfaces. Each of these interfaces contains an array of value/time
Add Average and Maximum classes
These classes will implement the xyz.openbmc_project.Sensor.Aggregation.History.Average/Maximum interfaces. Each of these interfaces contains an array of value/timestamp entries, where the value is either the average or maximum power as reported by the power supply. The most recent value will always be in element 0 of the array.
Change-Id: I41b0b84abe146c57f23629bd50acbf9e7fb746ab Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
c180a189 | 18-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add RecordManager testcases
These will test the linear conversion as well as record queue management.
Change-Id: I94e80e0d51f889e8ca2aef7c9c9c17e86153f5e3 Signed-off-by: Matt Spinler <spinler@us.ib
Add RecordManager testcases
These will test the linear conversion as well as record queue management.
Change-Id: I94e80e0d51f889e8ca2aef7c9c9c17e86153f5e3 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
c3414388 | 18-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add functions to return the averages and maximums
Add functions to return the input history in a format that can be used to write the D-Bus properties.
Change-Id: I7a395568dcdce89b5f3e4b6a73d58dc84
Add functions to return the averages and maximums
Add functions to return the input history in a format that can be used to write the D-Bus properties.
Change-Id: I7a395568dcdce89b5f3e4b6a73d58dc84adaaa7c Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
8168d280 | 18-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add function to handle a new input history record
This function will take a raw input power history record and add it to the record manager cache.
The record manager will parse the raw record, vali
Add function to handle a new input history record
This function will take a raw input power history record and add it to the record manager cache.
The record manager will parse the raw record, validate its sequence ID, and place it in the front of its internal queue. It prunes its queue if it needs to or clears it out if the sequence ID is out of order.
Change-Id: I25eca05f30b45ae97801ff99a083cc8fd97a688a Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
28fa1b6b | 18-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add functions to parse an input history record
The code will take a 5 byte raw record that comes from the power supply and create an instance of a Record out of it. A Record includes the average an
Add functions to parse an input history record
The code will take a 5 byte raw record that comes from the power supply and create an instance of a Record out of it. A Record includes the average and maximum power values, the sequence ID, and a timestamp.
Change-Id: I9dec5fd3de2ae2c6275a1407bcec4717557ffe86 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
e710d189 | 18-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add function to convert from linear format
The average and maximum power values are returned from the power supply in Watts specified in linear format. The values must be converted from linear form
Add function to convert from linear format
The average and maximum power values are returned from the power supply in Watts specified in linear format. The values must be converted from linear format to be useful. The value will be converted to an integer, keeping the units as Watts.
Linear format is a 16 bit value made up of 5 bits of exponent followed by 11 bits of mantissa, where the value is: X = mantissa * 2^exponent
These values are specified as two's complement, and technically may be negative, though there isn't really a reason for a power supply to specify negative power values. The code will support them anyway for completeness, and to be helpful to future code that may need to for sure.
Change-Id: I2cde529ed4355e173c8a3ecff2865f2c350ad61e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
d7abf367 | 18-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add history::RecordManager class
This class will manage the records for the input power history that has to be maintained on D-Bus. This includes the average power and maximum power over 30 second
Add history::RecordManager class
This class will manage the records for the input power history that has to be maintained on D-Bus. This includes the average power and maximum power over 30 second intervals.
The actual power values come from the power supply, and the PowerSupply class will pass that data to this class every time it is read, which is faster than the data actually changes since it only changes every 30s. This class will only save new data when it has changed.
If there is new data available, this class will let the caller know that it should then ask for the D-Bus property values for the maximum and average power values, which are each arrays with entries made up of timestamps along with the values.
This commit just includes some base functionality. The rest will come in future commits.
Change-Id: I1e521ba2ff7f733376b769ffa0d7053a0231d732 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
0d09f298 | 22-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Don't use MESSAGE in elog metadata
That name is already used by the journal, and strange things can happen when there are two MESSAGE fields in a single journal entry. For example, dumping the journ
Don't use MESSAGE in elog metadata
That name is already used by the journal, and strange things can happen when there are two MESSAGE fields in a single journal entry. For example, dumping the journal without the verbose option will show that metadata as a standalone journal entry.
Change-Id: Ibc45799063f7b50b2f39a068192333bf57244d52 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
018a7bce | 04-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Fill in PowerSupply::updateInventory()
This function will read the power supply's CCIN, part number, serial number, and firmware version from the supply and then write them to the supply's inventory
Fill in PowerSupply::updateInventory()
This function will read the power supply's CCIN, part number, serial number, and firmware version from the supply and then write them to the supply's inventory object.
If the supply isn't present, it will write empty values to the inventory, so stale values won't be left in the case that something was removed.
The Purpose property on the Software.Version interface also always needs to get written to 'Other', otherwise it defaults to 'Unknown'.
The CCIN was chosen as the closest thing available for use in the Model property.
Resolves openbmc/openbmc#1782
Change-Id: I20ab1225beda93a889cc70f20c40efdfa99e64f6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
589e8726 | 04-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Rearrange constants at the top of power_supply.cpp
Grouped the types together in preparation for adding more, and also made the naming consistent.
Change-Id: I3fff04087584e5eab8b4ef480c24774a14247a
Rearrange constants at the top of power_supply.cpp
Grouped the types together in preparation for adding more, and also made the naming consistent.
Change-Id: I3fff04087584e5eab8b4ef480c24774a14247a66 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
234ce0d2 | 04-Jan-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add update power supply inventory stubs and calls
This function will read values from the power supply and put them into the inventory.
This commit doesn't deal with what is written, but it is prop
Add update power supply inventory stubs and calls
This function will read values from the power supply and put them into the inventory.
This commit doesn't deal with what is written, but it is properties like the part and serial numbers.
It needs to be called: * On startup, regardless of presence state. * When a power supply is added, after the hwmon directory has been determined, to read the values for the new unit * When a power supply is removed.
When the function is called when the unit isn't present, it will just write empty values to the inventory. This ensures when a unit is removed that it doesn't contain stale values.
Change-Id: I432a515cf30321d1c9e327fc9c0332d1c724cf94 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
01741f17 | 01-Dec-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Fill in the function for resolving errors
The function will look for the error log entries that have the matching callout string via the association interface. It will then loop over those entries m
Fill in the function for resolving errors
The function will look for the error log entries that have the matching callout string via the association interface. It will then loop over those entries matching the callout and look for the entries that match the message for the fault/error we are looking to resolve. If/when a match is found, the Resolved property for the logging entry will be set to true.
Resolves: openbmc/openbmc#2676
Change-Id: Ic24841bca0b9fff7d70cc6343862f96f451ec468 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
08b05712 | 30-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Resolve error when input fault clears
Change-Id: I3e670f77815791852268a727c3b75bb445c099d3 Signed-off-by: Brandon Wyman <bjwyman@gmail.com> |
43ce2089 | 30-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Add a function for resolving errors
Create a function that will take a callback and message as input parameters. These will be used to find each error that matches, so that the Resolved property can
Add a function for resolving errors
Create a function that will take a callback and message as input parameters. These will be used to find each error that matches, so that the Resolved property can be set to true.
Change-Id: Icd19e72b3f59c7f7e719d58746c490d8c7e22fad Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
64dd2701 | 29-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Remove the TODO for need to deglitch
This should have been removed as part of the work for openbmc/openbmc#2484.
Change-Id: I2fb13ed7ac3ec707954a73d9348b71d5d54d95d6 Signed-off-by: Brandon Wyman <b
Remove the TODO for need to deglitch
This should have been removed as part of the work for openbmc/openbmc#2484.
Change-Id: I2fb13ed7ac3ec707954a73d9348b71d5d54d95d6 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
2ef48cf6 | 21-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Fix power supply present delay
The member variable indicating a power supply is present should be updated after the timer expires. If the message is not indicating present, the variable should be se
Fix power supply present delay
The member variable indicating a power supply is present should be updated after the timer expires. If the message is not indicating present, the variable should be set to false and the timer stopped.
Change-Id: Id5b78e42858cc2dd96b8a3fc9ecb21ec4eec6b10 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
2877add8 | 10-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Update HWMON path when supply becomes present
If the monitor starts when a power supply is missing, and then it is later added, the path to the HWMON directory will need to be updated. It is also po
Update HWMON path when supply becomes present
If the monitor starts when a power supply is missing, and then it is later added, the path to the HWMON directory will need to be updated. It is also possible that the power supply could be removed, something else added, and then the power supply gets added back, which could also require an update to the HWMON directory, as the path may have changed.
Change-Id: I9d6f6f2967e6c8fa419b7dbee052d18dc2552951 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
b08efa4f | 16-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Increase the power on delay timer to 5 seconds
The current level of ship-level Witherspoon power supplies are not always asserting the POWER_GOOD bit in the STATUS_WORD within the expected 2 second
Increase the power on delay timer to 5 seconds
The current level of ship-level Witherspoon power supplies are not always asserting the POWER_GOOD bit in the STATUS_WORD within the expected 2 second window. Increasing the power on delay timer from 2 seconds to 5 seconds.
Change-Id: I980fefcd67c092b694ef482f89928f2bd9f82857 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
e2fc7aa9 | 13-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Add check for faultFound to power fault checks
The faultFound flag was added in an earlier series of commits. This was intended to limit the number of faults leading up to error log entries. During
Add check for faultFound to power fault checks
The faultFound flag was added in an earlier series of commits. This was intended to limit the number of faults leading up to error log entries. During the checks for when the system is powered on, a number of the faults (OC, OV, OT, etc.) can ultimately lead to other faults, especially the UNIT_IS_OFF fault. For instance, if an overcurrent fault is detected, it likely means that the power supply will turn itself off. When that fault is seen and logged, the faultFound will be set to true. If that is the case, we do not need to also log a fault for the PGOOD being off or the UNIT_IS_OFF bit being on, we already know a fault has occurred. The metadata should capture the resulting end state.
Change-Id: I27ea7e77d492597a3581026285c7e552a1297a60 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
a3c675c1 | 14-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Implement de-glitch for input fault
If three consecutive reads in a row, on second apart, show the INPUT_FAULT_WARN and/or VIN_UV_FAULT on, create and log an error.
Resolves: openbmc/openbmc#2484
Implement de-glitch for input fault
If three consecutive reads in a row, on second apart, show the INPUT_FAULT_WARN and/or VIN_UV_FAULT on, create and log an error.
Resolves: openbmc/openbmc#2484
Change-Id: I35dedfc6acbb68bd8004c4fd1cc3d6dc799a9a17 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
e4af980f | 13-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Implement de-glitch for read failures
If three consecutive read failures in a row occur, one second apart, create and log an error.
Change-Id: Iaed04c307de2419c614b7916a99dd36a6aa2c106 Signed-off-b
Implement de-glitch for read failures
If three consecutive read failures in a row occur, one second apart, create and log an error.
Change-Id: Iaed04c307de2419c614b7916a99dd36a6aa2c106 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
50044ea7 | 08-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Implement de-glitch for temperature fault or warn
If three consecutive reads in a row, one second apart, show the fault on, create an log an error.
Change-Id: I9fb1285a01e269beffd2201f5082545748f5b
Implement de-glitch for temperature fault or warn
If three consecutive reads in a row, one second apart, show the fault on, create an log an error.
Change-Id: I9fb1285a01e269beffd2201f5082545748f5bee3 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
ba25553b | 08-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Implement de-glitch for fan fault or warn
If three consecutive reads in a row, one second apart, show the fault on, create and log an error.
Change-Id: Iac7d244b0dc2609c9b499514b88460d653b8d70d Sig
Implement de-glitch for fan fault or warn
If three consecutive reads in a row, one second apart, show the fault on, create and log an error.
Change-Id: Iac7d244b0dc2609c9b499514b88460d653b8d70d Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
2ab319b0 | 08-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Implement de-glitch for output overvoltage fault
If three consecutive reads in a row, one second apart, show the fault on, create and log an error.
Change-Id: I4ab029b24f5afd263ade7eeccca00b34efd99
Implement de-glitch for output overvoltage fault
If three consecutive reads in a row, one second apart, show the fault on, create and log an error.
Change-Id: I4ab029b24f5afd263ade7eeccca00b34efd99d3e Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
dd61be48 | 07-Nov-2017 |
Brandon Wyman <bjwyman@gmail.com> |
Implement de-glitch for output overcurrent fault
If three consecutive reads in a row, one second apart, show the fault on, create and log an error.
Change-Id: I0a51241ac00514c50fac49c050cf5bf086ca9
Implement de-glitch for output overcurrent fault
If three consecutive reads in a row, one second apart, show the fault on, create and log an error.
Change-Id: I0a51241ac00514c50fac49c050cf5bf086ca9ab4 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|