History log of /openbmc/phosphor-fan-presence/control/json/utils/flight_recorder.cpp (Results 1 – 7 of 7)
Revision Date Author Comments
# 9d533806 09-Apr-2025 Anwaar Hadi <anwaar.hadi@ibm.com>

Cleanup old headers and namespace declarations

Remove the header includes for the old phosphor::logging::log API
as well as unnecessary phosphor::logging namespace declarations.
Fully qualify phosph

Cleanup old headers and namespace declarations

Remove the header includes for the old phosphor::logging::log API
as well as unnecessary phosphor::logging namespace declarations.
Fully qualify phosphor::logging namespace where applicable and/or
needed.

Tested:
* Verified commit passed CI unit tests.
* Verified commit built using bitbake.

Change-Id: I2e490e1aa3fd3423f8c52694c2b97bc58b95525a
Signed-off-by: Anwaar Hadi <anwaar.hadi@ibm.com>

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 ...


# 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 ...


# 4907dace 29-Apr-2022 Matt Spinler <spinler@us.ibm.com>

control: Increase flight recorder max entries

Double the number of entries per key from 20 to 40. Mostly this is for
capturing more target changes.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>

control: Increase flight recorder max entries

Double the number of entries per key from 20 to 40. Mostly this is for
capturing more target changes.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6576dc1574f2db00d9753759cf5a37078168f76e

show more ...


# 7787def0 14-Oct-2021 Matt Spinler <spinler@us.ibm.com>

control: Dump flight recorder to a JSON file

A future commit will dump more debug data as opposed to just the flight
recorder. To better support the data all being in the same file, it
will be a JS

control: Dump flight recorder to a JSON file

A future commit will dump more debug data as opposed to just the flight
recorder. To better support the data all being in the same file, it
will be a JSON file. The first step of that is to write the flight
recorder output to a JSON file.

This also reorganizes the Manager code that does it to prepare for
different data also being in the same file.

An example is:
{
"flight_recorder": [
"Oct 06 05:59:01.183998: main: Startup"
]
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iaeb55ffde3a30c2345968e1b3fad313b50aff331

show more ...


# 13270967 04-Oct-2021 Matt Spinler <spinler@us.ibm.com>

control: Create FlightRecorder class

This class provides a flight recorder feature by providing the following
two interfaces:

1. log(const std::string& id, const std::string& message)
2. dump()

lo

control: Create FlightRecorder class

This class provides a flight recorder feature by providing the following
two interfaces:

1. log(const std::string& id, const std::string& message)
2. dump()

log() saves the passed in message in a map with the previous messages
for that ID along with a timestamp when log() was called. It will
discard the oldest message if necessary to keep a maximum of 20.

dump() will write all messages to the file /tmp/fan_control.txt. It
will sort them all based on the timestamp so messages from different IDs
may be interleaved together.

The ID is used in addition to the message with the idea that there could
be one ID per action or per action instance, so that once active part of
fan control that logged a lot wouldn't force out messages from less
active parts.

Example output is:

Oct 01 04:37:19.123923: pcie_card_cooling-0: Setting parameter to 2
Oct 01 04:37:19.129787: mapped_floor-1: Setting new floor to 4755

The first column is the timestamp down to the microsecond, the second
column is the ID, and the third is the message.

Testing on real hardware showed it took about 21 milliseconds for dump()
to run when there were 30 IDs with 20 messages each.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ie3630174c8aa54911e56054e9d7c38bb7dfb3f18

show more ...