commit | 2344882dc030cf6d3ec51e2e626b5a97cebf32be | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Thu Aug 26 09:08:56 2021 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Thu Aug 26 09:09:33 2021 -0500 |
tree | 70a241fe9da57cd4a7250a9db5a1732e8cb5c236 | |
parent | 1dff7dceb9b2b8efe8b44c6d7518cd0207b89837 [diff] |
clang-format: sync latest from docs Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I86cd8f3c19c734b68a65e291c7a07f3650c95d67
phosphor-virtual-sensor reads in virtual_sensor_config.json There are two types of data in this file:
See virtual_sensor_config.json in this repository for an example. Sensors added this way can use any expression that is accepted by exprtk.
For example:
{ "Desc": { "Config" : "D-Bus", "Type" : "modifiedMedian" } }
Sensors added this way can only use a set of restricted calculations. At this stage the only type supported is modifiedMedian.
The virtual sensor configuration information needs to be added into the relevant hardware configuration file in entity-manager. This method of adding a virtual sensor allows a recipe that builds for different hardware configurations to have different virtual sensors for each configuration.
The virtual sensor configuration in entity manager follows a different format to the JSON in virtual_sensor_config.json (specified in entity-manager/schemas/VirtualSensor.json). In particular, the format for Thresholds is different. The following table shows the severity fields that correspond to a particular threshold.
Threshold | Severity |
---|---|
Warning | 0 |
Critical | 1 |
PerformanceLoss | 2 |
SoftShutdown | 3 |
HardShutdown | 4 |