Onboarding NPIs to Sensor Collector Module

go/tlbmc-onboarding-npis

This document outlines the additions necessary to Entity-Manager (EM) JSON configuration files to enable sensor collector module on an NPI. Entity-Manager provides mappings from hardware components to software components within a system, these mappings are managed through EM configuration files as described here.

Note: tlBMC requires only additions to existing EM config files, no deletions or modifications of existing properties should occur. This allows tlBMC to be backward compatible with existing bmcweb without conflicting behavior. Original design doc can be viewed at go/tlbmc-data-completeness

Prerequisites

The tlBMC Sensor Collector Module must be enabled for your platform in tlbmc_config_bundle.textproto. If it is not enabled, tlBMC will not collect sensor data regardless of EM configuration. See tlbmc_config_bundle.textproto in tlbmc source.

Sensor

Note: For any sensor configuration to be parsed by tlBMC, must add the property "TlbmcOwned": true to the sensor EM config. This must be added per sensor. tlBMC will error if a sensor is marked as TlbmcOwned but is not a supported type.

Example:

{
  "Name": "temp_sensor_1",
  "Type": "tmp461",
  "Bus": 13,
  "Address": 76,
  "TlbmcOwned": true
}

HWMon Temp Sensors

If a HWMon Temp Sensor type is supported by tlBMC, only "TlbmcOwned": true needs to be added to its configuration in EM. No other changes are required.

Not all sensor types are currently supported by tlBMC, see kSupportedHwmonTempSensorTypes in tlbmc/configs/entity_config_json_impl.cc.

PSU Sensors

If a PSU Sensor type is supported by tlBMC, only "TlbmcOwned": true needs to be added to its configuration in EM. No other changes are required.

Not all sensor types are currently supported by tlBMC, see kSupportedPsuSensorTypes in tlbmc/configs/entity_config_json_impl.cc.

SkipDbusRead Property

For Hwmon Temp Sensors and PSU Sensors, if the dbus interface of the sensor is not being consumed by other processes such as PID loop, we can stop polling over dbus to significantly reduce CPU usage on BMC. By adding the property "SkipDbusRead": true in the sensor configuration, the dbus-sensor daemon will stop polling the sensor. tlBMC backend will still supply the reading as expected when queried through redfish.

Example:

{
  "Name": "temp_sensor_1",
  "Type": "tmp461",
  "Bus": 13,
  "Address": 76,
  "TlbmcOwned": true,
  "SkipDbusRead": true
}

Fan Controller

All I2C fans need a corresponding fan controller defined in the EM config that share the bus/address combination as the fans. Without this field, no I2C fans will be populated.

An example definition:

"Exposes": [
  ...
    {
        "Address": "0x2c",
        "Bus": "34",
        "Name": "FAN_CONTROLLER",
        "Type": "MAX31790",
        "TlbmcOwned": true
    },
  ...
],

I2C Fans (Tach/PWM)

For all I2C configs, there must be a JSON Connector field that contains at least Pwm (the index of the fan) and PwmName (name of the PWM Fan sensor). Some configs may already have this present. No other changes are required to make I2C fans compatible with tlBMC.

An example definition:

"Exposes": [
  ...
    {
      "Address": "0x2c",
      "BindConnector": "fan1_tach_connector",
      "Bus": "32",
      "Connector": {
          "Pwm": 1,
          "PwmName": "fan1_pwm"
      },
      "EntityId": "0x1A",
      "EntityInstance": "0x01",
      "Index": 1,
      "Name": "fan1_tach",
      ...
    }
  ...
]

Related Item

RelatedItem is a field unique to tlBMC, since RelatedItem can no longer be detected through dbus calls, they must be defined in the static configuration. The RelatedItem of any sensor must be defined as a RelatedItem JSON object within the sensor config. It contains the fields Id (the redfish Id of the related item) and Type (the ResourceType of the related item). By default, the related item will be the parent chassis object. This field only needs to be overridden in the case that the related item should be a different object e.g. a fan.

An example definition:

"Exposes": [
  ...
    {
      ...
      "Name": "fan1_tach",
      "RelatedItem": {
          "Id": "Fan1",
          "Type": "RESOURCE_TYPE_FAN",
          "User": "tlbmc"
      },
      ...
    }
  ...
]