History log of /openbmc/phosphor-fan-presence/control/json/utils/flight_recorder.cpp (Results 1 – 5 of 5)
Revision Date Author Comments
# 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

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& me

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