#
32c4feff |
| 02-Apr-2025 |
Anwaar Hadi <anwaar.hadi@ibm.com> |
Updated Miscellaneous Journal Traces to lg2
Update the logging API used for files not in phosphor-fan-presence/presence, phosphor-fan-presence/monitor, or phosphor-fan-presence/control from the olde
Updated Miscellaneous Journal Traces to lg2
Update the logging API used for files not in phosphor-fan-presence/presence, phosphor-fan-presence/monitor, or phosphor-fan-presence/control from the older phosphor::logging::log to the more recent lg2::log.
Tested: * Verified journal traces worked correctly in simulation and on physical hardware. * Modified json config files to force parsing and sensor-monitor errors and verified correct output and key/value pairs in the journalctl output.
Change-Id: Ie68ac5733ecd20d5f17882020df861a975121f77 Signed-off-by: Anwaar Hadi <anwaar.hadi@ibm.com>
show more ...
|
#
4fa67aa1 |
| 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: If152304b21dd2daaa2f79255a4f98218615efb05 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: If152304b21dd2daaa2f79255a4f98218615efb05 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
dfddd648 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ica590f8613f1fb89ab1ca676ac51c1cc7e38d67f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
5e15c3ba |
| 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I3e9e6350864ac267819a4b8d670bef7d3746976e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
fbf4703f |
| 17-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
use std::format instead of fmt::format
The std::format is sufficient for the uses in this repository except for in one file (override_fan_target.cpp, since P2286 isn't supported by GCC yet). Switch
use std::format instead of fmt::format
The std::format is sufficient for the uses in this repository except for in one file (override_fan_target.cpp, since P2286 isn't supported by GCC yet). Switch to std::format whenever possible.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib2576fb530a4d7ce238e1b0bd95b40b476ec2107
show more ...
|
#
61b73296 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I152f141a5e8343b92b5ce81d3ca16eec77b5606b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
cb356d48 |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9029cc722e7712633c15436bd3868d8c3209f567
show more ...
|
#
8cb2bfbd |
| 19-Jul-2022 |
Mike Capps <mikepcapps@gmail.com> |
sensor-monitor: fix logging statement
Previous implementation used Logger class which caused build failures. This fix uses only minimal logging necessary.
Signed-off-by: Mike Capps <mikepcapps@gmai
sensor-monitor: fix logging statement
Previous implementation used Logger class which caused build failures. This fix uses only minimal logging necessary.
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: Icfa605e6cf62c559e5baeac0e0a3e75edf2ef712
show more ...
|
#
477b13bd |
| 11-Jul-2022 |
Mike Capps <mikepcapps@gmail.com> |
monitor,sensor-monitor: catch exceptions when creating BMC dumps
catch and log exceptions thrown when creating BMC dumps
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: I986ca3e51302016
monitor,sensor-monitor: catch exceptions when creating BMC dumps
catch and log exceptions thrown when creating BMC dumps
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: I986ca3e51302016886ca8ae571054a5b4260a093
show more ...
|
#
808d7fe8 |
| 13-Jun-2022 |
Mike Capps <mikepcapps@gmail.com> |
meson support: remove code warnings 1
This commit contains code changes necessary to support the increased warning level from Meson builds. Most changes are for unused variables.
To keep the review
meson support: remove code warnings 1
This commit contains code changes necessary to support the increased warning level from Meson builds. Most changes are for unused variables.
To keep the review size manageable, this commit contains only monitor and presence changes (and top-level json_config.hpp).
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: I7280b512c54e8d5aeba3300764a239f3dcbab14d
show more ...
|
#
683a96c6 |
| 27-Apr-2022 |
Mike Capps <mikepcapps@gmail.com> |
monitor: Capture BMC dumps on fan/ambient shutdowns
When fan-monitor or sensor-monitor generates an EPOW, this change creates a BMC dump after the system is powered off and all error logs are create
monitor: Capture BMC dumps on fan/ambient shutdowns
When fan-monitor or sensor-monitor generates an EPOW, this change creates a BMC dump after the system is powered off and all error logs are created.
Change-Id: Iacdd2d2b388e79988e2536d52497f0e697e1d444 Signed-off-by: Mike Capps <mikepcapps@gmail.com>
show more ...
|
#
be15edee |
| 21-Apr-2022 |
Matt Spinler <spinler@us.ibm.com> |
sensor-mon: Add missing arg in fmt::format call
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6b1a08033b45724e04dfd620ffe4a2a5b51b6312
|
#
b2766c15 |
| 08-Mar-2022 |
Mike Capps <mikepcapps@gmail.com> |
monitor: remove POWER_THERMAL_CRITICAL_FAULT PEL message
This message has been deprecated due to the removal of the PowerFault bit.
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: I730d
monitor: remove POWER_THERMAL_CRITICAL_FAULT PEL message
This message has been deprecated due to the removal of the PowerFault bit.
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: I730dca008d15f5b985a3c2006e164edba53330c6
show more ...
|
#
d914ebf4 |
| 21-Feb-2022 |
Matthew Barth <msbarth@us.ibm.com> |
sensor-monitor: Correct shutdown propertiesChanged matches
The wrong shutdown type was associated to the defined propertiesChanged matches. It appears this had no affect on receiving these signals a
sensor-monitor: Correct shutdown propertiesChanged matches
The wrong shutdown type was associated to the defined propertiesChanged matches. It appears this had no affect on receiving these signals as long as both hard & soft threshold interfaces were implemented on a system since after receiving the signal, the data in the signal is used to determine which threshold changed.
Change-Id: I64b44ca474fe2a5049774b0018787c6016c35691 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
7f6946b2 |
| 14-May-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor:monitor: Use a single PowerState object
Now that both monitor classes need to know about power state, change them to keep a shared_ptr to a PowerState object and then pass the object into the
sensor:monitor: Use a single PowerState object
Now that both monitor classes need to know about power state, change them to keep a shared_ptr to a PowerState object and then pass the object into their constructors.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ia83217e8af51204bbb3fc6e8e3f2eac5912b5913
show more ...
|
#
3efec61c |
| 11-May-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor-monitor: Capture PID in event logs
Pass the PID of the process into an event log with the _PID additional data entry. This gets done automatically when the report() or commit() phosphor-logg
sensor-monitor: Capture PID in event logs
Pass the PID of the process into an event log with the _PID additional data entry. This gets done automatically when the report() or commit() phosphor-logging event log library functions are called, but needs to be done manually when the D-Bus API is used. This just provides a way to see which process created the event log and I just forgot to do this when I first wrote it..
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I094a0eb9634df53759f257799ae518ffd63e45cd
show more ...
|
#
2a6b39c8 |
| 11-May-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor-monitor: Changes for power off error
The hard and soft shutdown alarm errors are posted twice when a system shuts down due to those thresholds being exceeded, once when the threshold is first
sensor-monitor: Changes for power off error
The hard and soft shutdown alarm errors are posted twice when a system shuts down due to those thresholds being exceeded, once when the threshold is first exceeded, and again when the shutdown actually occurs. For these errors, make the following changes that will differentiate them from the first time they were logged:
1. Change severity to Critical 2. Set POWER_THERMAL_CRITICAL_FAULT=TRUE in the additional data 3. Set SEVERITY_DETAIL=SYSTEM_TERM in the additional data
Certain implementations, such as the IBM one, will take additional actions based on these changes.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I94a1cc9dad492e78f59619c4012bcaf6a4c81431
show more ...
|
#
ffd54674 |
| 21-Jan-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor-mon: Create event logs
Create phosphor-logging event logs when the alarms are tripped and cleared. The severity will be 'Error' on trip, and 'Informational' on clear.
The error names will b
sensor-mon: Create event logs
Create phosphor-logging event logs when the alarms are tripped and cleared. The severity will be 'Error' on trip, and 'Informational' on clear.
The error names will be xyz.openbmc_project.Sensor.Threshold.Error. HardShutdownAlarmLow HardShutdownAlarmLowClear HardShutdownAlarmHigh HardShutdownAlarmHighClear
When the shutdown occurs after the delay, the AlarmLow/AlarmHigh events are sent again. This is so there is an event log that occurs at the time of the shutdown, and it says what the problem was that caused it.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: If36c48e73f4208d781040c8b2c06995f66bebc20
show more ...
|
#
08a66efa |
| 21-Jan-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor-mon: Persist timer start times
It's possible that while a shutdown timer is running, this app or the whole BMC may restart. In that case, we want to restart the timer with only the remaining
sensor-mon: Persist timer start times
It's possible that while a shutdown timer is running, this app or the whole BMC may restart. In that case, we want to restart the timer with only the remaining time, assuming the alarm is still active.
To do this, create a new AlarmTimestamps class to hold any running timer start times and persist these times using the cereal library. If the application is restarted with timestamps written out and the alarm is initially active and power is on, then the shutdown timer will be calculated to be: delay = shutdownDelay - (now - original time)
Note that cereal doesn't know how to handle the AlarmType or ShutdownType types so they are converted to ints before writing.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: If07abe91c0e6951fcd74bbc49eb511a38f7b4006
show more ...
|
#
0b839516 |
| 21-Jan-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor-mon: Start timers and shutdown
When the threshold alarm is tripped, start a timer for the configured amount of time. If the alarm clears before that time, stop the timer. If it doesn't, powe
sensor-mon: Start timers and shutdown
When the threshold alarm is tripped, start a timer for the configured amount of time. If the alarm clears before that time, stop the timer. If it doesn't, power off the system.
Note that the alarm for the SoftShutdown threshold still does a hard shutdown. That's because in the family of systems this was written for, the hypervisor also gets an alert when the threshold trips and is the one that drives the power off. The shutdown that this code does would only occur when the hypervisor doesn't shut down first.
This could easily be wrapped in some sort of compile flags where the default behavior would be to do a soft shutdown, but since at this point there is no user of that the default will remain the way it is.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I3bc8f82562594dcd61bfcbc471ffe1a2d9451595
show more ...
|
#
16c7dc1e |
| 21-Jan-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor-mon: Handle propertiesChanged
Fill in the handler for a Threshold.HardShutdown or Threshold.SoftShutdown property changing.
If the power is off, do nothing, otherwise read out the changed al
sensor-mon: Handle propertiesChanged
Fill in the handler for a Threshold.HardShutdown or Threshold.SoftShutdown property changing.
If the power is off, do nothing, otherwise read out the changed alarm properties and check if any action needs to be taken.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I379e90dffe3e6d3acdf18820bda34f2a5671f57a
show more ...
|
#
9c0715b6 |
| 21-Jan-2021 |
Matt Spinler <spinler@us.ibm.com> |
sensor-mon: Create sensor-monitor application
This is a new application that will be used to take actions based on sensor values or sensor threshold alarm values. It's not built unless the --enable
sensor-mon: Create sensor-monitor application
This is a new application that will be used to take actions based on sensor values or sensor threshold alarm values. It's not built unless the --enable-sensor-monitor option is used.
The first behavior will be to do power offs and create event logs based on the xyz.openbmc_project.Sensor.Threshold.HardShutdown and SoftShutdown threshold interfaces that may be present on sensor object paths. It will watch the high and low alarm properties on those interfaces. This could then be used to power off the system after some delay if some sensor value gets too high or low, such as a high ambient or a low voltage.
This first commit in the series creates the application and a new ShutdownAlarmMonitor class, which is where the monitoring will happen. Initially, it just finds all existing soft and hard shutdown interfaces on D-Bus and puts them in a map. It also registers for properties changed signals for those interfaces.
Note that the interfacesAdded signal doesn't need to be used because all sensor applications today emit propertiesChanged signals when they first start up anyway.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ia5b82fcbe32f65d94b23bf26a025202a7f885183
show more ...
|