Home
last modified time | relevance | path

Searched hist:"811 f31d614af241ab88487739c9922ddb0be6ff6" (Results 1 – 1 of 1) sorted by relevance

/openbmc/phosphor-pid-control/
H A Dmain.cppdiff 811f31d614af241ab88487739c9922ddb0be6ff6 Mon Sep 21 01:31:55 CDT 2020 Josh Lehan <krellan@google.com> main: Allowing logging and tuning to also be enabled by files

The logging and tuning flags, which come from the command line,
are now also able to be enabled by the presence of certain files.

This allows the logging and tuning features to be enabled,
at runtime, without having to change the command line.

The content of /etc/thermal.d/tuning does not matter,
only the existence of this file is checked for.
The content of /etc/thermal.d/logging can optionally
be a directory path, which will be used if it exists,
otherwise use the systemwide default temporary directory.

This makes it easy for people doing thermal calibration
to enable these options as they need, without having to
destabilize the system by hand-editing the systemd configuration,
which is non-trivial to change at runtime, due to systemd caching.

The directory choice of /etc/thermal.d has precedence,
as it was already hardcoded in the setpoint file during tuning.

Tested: Tuning mode was enabled and logging appeared in /tmp
mkdir -p /etc/thermal.d
touch /etc/thermal.d/logging
touch /etc/thermal.d/tuning
killall swampd

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Ie74673664de806cbb8a0c70c61310e646ec38014