enable health_monitor new implementation
Add health_monitor interface and implementation. Enable the
health_monitor from existing healthMonitor flow.
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
Tested:
```
busctl tree xyz.openbmc_project.HealthMon
`- /xyz
`- /xyz/openbmc_project
`- /xyz/openbmc_project/metric
`- /xyz/openbmc_project/metric/bmc
|- /xyz/openbmc_project/metric/bmc/cpu
| |- /xyz/openbmc_project/metric/bmc/cpu/kernel
| |- /xyz/openbmc_project/metric/bmc/cpu/total
| `- /xyz/openbmc_project/metric/bmc/cpu/user
|- /xyz/openbmc_project/metric/bmc/memory
| |- /xyz/openbmc_project/metric/bmc/memory/available
| |- /xyz/openbmc_project/metric/bmc/memory/buffered_and_cached
| |- /xyz/openbmc_project/metric/bmc/memory/free
| |- /xyz/openbmc_project/metric/bmc/memory/shared
| `- /xyz/openbmc_project/metric/bmc/memory/total
`- /xyz/openbmc_project/metric/bmc/storage
|- /xyz/openbmc_project/metric/bmc/storage/rw
`- /xyz/openbmc_project/metric/bmc/storage/tmp
curl -k https://localhost:8443/redfish/v1/Managers/bmc/ManagerDiagnosticData
--user "root:0penBmc"
{
"@odata.id": "/redfish/v1/Managers/bmc/ManagerDiagnosticData",
"@odata.type": "#ManagerDiagnosticData.v1_2_0.ManagerDiagnosticData",
"FreeStorageSpaceKiB": 3,
"Id": "ManagerDiagnosticData",
"MemoryStatistics": {
"AvailableBytes": 354029533,
"BuffersAndCacheBytes": 79077333,
"FreeBytes": 291730033,
"SharedBytes": 11876000,
"TotalBytes": 425516000
},
"Name": "Manager Diagnostic Data",
"ProcessorStatistics": {
"KernelPercent": 16.1534,
"UserPercent": 10.6638
},
"ServiceRootUptimeSeconds": 834.753
}
```
Change-Id: I1e9fac226b438f0556cb20321f1f2b6d51af7dbc
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/meson.build b/meson.build
index 09ef147..f56e3f5 100644
--- a/meson.build
+++ b/meson.build
@@ -24,11 +24,11 @@
executable(
'health-monitor',
[
- 'healthMonitor.cpp',
'health_metric_config.cpp',
'health_metric.cpp',
'health_utils.cpp',
'health_metric_collection.cpp',
+ 'health_monitor.cpp',
],
dependencies: [
base_deps