History log of /openbmc/phosphor-health-monitor/test/ (Results 1 – 17 of 17)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ce8b5ae416-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: If87740ef153661e338448c9de753cbd61fd164eb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

a3c17d0f01-Apr-2024 Konstantin Aladyshev <aladyshev22@gmail.com>

meson: Provide missing meson dependency for tests

Currently local meson build fails with error:
"""
../health_metric_config.cpp:5:10: fatal error: nlohmann/json.hpp:
No such file or directory
5

meson: Provide missing meson dependency for tests

Currently local meson build fails with error:
"""
../health_metric_config.cpp:5:10: fatal error: nlohmann/json.hpp:
No such file or directory
5 | #include <nlohmann/json.hpp>
"""
Add missing nlohmann_json dependency to fix the issue.

Tested:
Local build via "meson setup build && cd build && meson compile" now
finishes without errors.

Change-Id: I1f42d6a9c1ddf838a90f7d8b9d880cc4faf7150c
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...

a102762b05-Mar-2024 Jagpal Singh Gill <paligill@gmail.com>

add json config and implementation for hysteresis

Add the json config for health metric hysteresis and implementation
logic for it. Update the health metric config test to validate the
hysteresis va

add json config and implementation for hysteresis

Add the json config for health metric hysteresis and implementation
logic for it. Update the health metric config test to validate the
hysteresis value.

Change-Id: I60c0daa601abee9ac1916581d23257cc04128dd0
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

b2df817c03-Mar-2024 Jagpal Singh Gill <paligill@gmail.com>

drop the collection frequency from health metric

Drop the collection frequency from health metric config and its
corresponding code as collection frequency has been moved to
monitor specific propert

drop the collection frequency from health metric

Drop the collection frequency from health metric config and its
corresponding code as collection frequency has been moved to
monitor specific property rather than metric.

Change-Id: If8345581552b99397487cf5d67865f44e1b2fc2e
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

9758280127-Feb-2024 Jagpal Singh Gill <paligill@gmail.com>

storage metric: add generic implementation

Add the generic implementation for the storage metric, so there is no
need to add a new enum value and new code, every time a new storage
type needs to be

storage metric: add generic implementation

Add the generic implementation for the storage metric, so there is no
need to add a new enum value and new code, every time a new storage
type needs to be added.

Change-Id: Idcd99455ca559eb6274a71613684a99b4b63a6f0
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

67b8ebe023-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

improve enum logging

Ensure we're using an enumeration string everywhere we log one to
improve readability of the log statements.

This depends on I6850b0bb142f0ef5219a5fc07c2cb4e2c90d5779 from
phos

improve enum logging

Ensure we're using an enumeration string everywhere we log one to
improve readability of the log statements.

This depends on I6850b0bb142f0ef5219a5fc07c2cb4e2c90d5779 from
phosphor-logging for `to_string` conversion support.

Tested:

Running directly on development system shows:
```
<7> TYPE=CPU, NAME=CPU SUBTYPE=CPU PATH=, FREQ=1, WSIZE=120
<7> THRESHOLD TYPE=xyz.openbmc_project.Common.Threshold.Type.Warning THRESHOLD BOUND=xyz.openbmc_project.Common.Threshold.Bound.Upper VALUE=80.000000 LOG=False TARGET=
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5ea7a050e94833af272e79e6add716d1d3e66571

show more ...

6a3884a424-Feb-2024 Jagpal Singh Gill <paligill@gmail.com>

threshold: use absolute value for D-Bus

Use the absolute value for threshold rather than percentage value.
This involves passing the total value from the metric collection so it
can be used in perce

threshold: use absolute value for D-Bus

Use the absolute value for threshold rather than percentage value.
This involves passing the total value from the metric collection so it
can be used in percentage calculation within health metric logic.

Change-Id: I46240aee54117c70637f9fbf882018f0eac520b2
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

e7b17de923-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

metric-config: remove the buffer/cache-memory threshold

The kernel will naturally attempt to use almost all free memory up with
buffers and caches. We should not have a threshold on this behavior
b

metric-config: remove the buffer/cache-memory threshold

The kernel will naturally attempt to use almost all free memory up with
buffers and caches. We should not have a threshold on this behavior
by default.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic40a260667e89d62820e99753efda025ba5bde47

show more ...

78a224bd23-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

metric-config: remove the free-memory threshold

By default we have a metric on the available memory. Free memory should
be a subset of available memory. You can have some memory held by
kernel cac

metric-config: remove the free-memory threshold

By default we have a metric on the available memory. Free memory should
be a subset of available memory. You can have some memory held by
kernel caches that can be evicted as needed, which show up in available
and not free. Having a threshold on free memory is probably not what
anyone wants by default, so remove it from the default config.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I16d15266b6e10e6c7a788095b4b29d5e603e102c

show more ...

c00c19e023-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

metric-config: remove thresholds on userspace and kernel CPU

We do not need a default threshold on the userspace and kernel CPU
metrics because we already have a threshold on the overall CPU usage.

metric-config: remove thresholds on userspace and kernel CPU

We do not need a default threshold on the userspace and kernel CPU
metrics because we already have a threshold on the overall CPU usage.
Sustained CPU usage is likely what someone wants to identify, no matter
which side of the accounting it is attributed to. Delete the extra
thresholds.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I56352169b3fc50f11410f054053c39c40a79b82e

show more ...

afbac90b22-Feb-2024 Jagpal Singh Gill <paligill@gmail.com>

metric_config: add lower bound support

Add the lower bound support to the metric config and fix the parsing
logic to update threshold configs accordingly. Update the collection
test for lower bound.

metric_config: add lower bound support

Add the lower bound support to the metric config and fix the parsing
logic to update threshold configs accordingly. Update the collection
test for lower bound.

Change-Id: I6fd3bd8d85974f95ba877eb8d19a77c8acffef7c
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

fbb835ba22-Feb-2024 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

Change-Id: I7948c1c8108da238952abaa3e7d400fdca80c7e5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

79434b5410-Dec-2023 Jagpal Singh Gill <paligill@gmail.com>

add health_metric_collection implementation

Add the interface and implementation for health_metric_collection which
encapsulates various health_metrics.
This change is in relation to following desig

add health_metric_collection implementation

Add the interface and implementation for health_metric_collection which
encapsulates various health_metrics.
This change is in relation to following design and D-Bus interface
update -
https://gerrit.openbmc.org/c/openbmc/docs/+/64917
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/64914

Add test_health_metric_collection gtest for unit testing.

Change-Id: Ia0b9fbc6bec4850735c7eb74dcd5c40fc47c568c
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

dfe839fd16-Feb-2024 Jagpal Singh Gill <paligill@gmail.com>

health_metric: add tmp storage support

Add the tmp storage support in health config parser and health metric.

Change-Id: Ibb265c28b22d786031ed152d2cc52f40814be984
Signed-off-by: Jagpal Singh Gill <

health_metric: add tmp storage support

Add the tmp storage support in health config parser and health metric.

Change-Id: Ibb265c28b22d786031ed152d2cc52f40814be984
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

cfd889fe10-Feb-2024 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

Change-Id: Ie0805a98908ddca5c97471588adc160d9f5633c6
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

23f091e510-Dec-2023 Jagpal Singh Gill <paligill@gmail.com>

add health_metric implementation

Add the interface and implementation for the health_metric to be used
in the rewrite for phosphor-health-monitor.
This change is in relation to following design and

add health_metric implementation

Add the interface and implementation for the health_metric to be used
in the rewrite for phosphor-health-monitor.
This change is in relation to following design and D-Bus interface
update -
https://gerrit.openbmc.org/c/openbmc/docs/+/64917
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/64914

gtest added for UT.

Change-Id: Iffcc52f9dff712890377b1222fd7e7d5d6661eaf
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

7e11ab0a08-Dec-2023 Jagpal Singh Gill <paligill@gmail.com>

add health_metric_config implementation

Add the health_metric_config interface and implementation for
phosphor-health-monitor. This interface will be used in the
re-write of phosphor-health-monitor.

add health_metric_config implementation

Add the health_metric_config interface and implementation for
phosphor-health-monitor. This interface will be used in the
re-write of phosphor-health-monitor.
This change is in relation to following design and D-Bus interface
update-
https://gerrit.openbmc.org/c/openbmc/docs/+/64917
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/64914

gtest added for UT.

Change-Id: Ic40faafbb57597023cc70036428d46ee69a895a2
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...