tlBMC Collectors Module

Collectors in tlBMC are background services responsible for actively discovering hardware components, reading telemetry from physical or virtual devices, and updating the central Store. These collectors run periodically or respond to system state transitions to keep the inventory and sensor values up to date.

The core implementation files are located in third_party/milotic/external/cc/tlbmc/collector/.


Central Configuration

Collectors are managed and activated at boot time through the central TlbmcConfig (defined in central_config.proto). If a collector module is marked enabled: false, its background loop will not initialize, and it will not register routes or poll hardware.

Summary of Collector Configurations

| Collector | Configuration Field | Default | Description | : Message : : : : | :---------- | :--------------------------------- | :------ | :------------ | | FRU | fru_collector_module | false | Scans and | : Collector : : : populates : : : : : inventory : : : : : data : : : : : (EEPROMs, : : : : : cables, : : : : : boards) and : : : : : builds the : : : : : parent-child : : : : : chassis : : : : : topology. : | Sensor | sensor_collector_module | false | Manages | : Collector : : : polling loops : : : : : for physical : : : : : (HWMon, PSU, : : : : : ADC) and : : : : : virtual : : : : : sensors. : | Bulk | N/A (platform factory) | N/A | Manages high- | : Sensor : : : frequency, : : Collector : : : batched : : : : : telemetry and : : : : : sensor set : : : : : subscriptions : | Thermal | thermal_control_sub_module | false | Orchestrates | : Collector : (under sensor_collector_module) : : multi-zone : : : : : thermal : : : : : control : : : : : loops, fan : : : : : PID cooling, : : : : : and Redfish : : : : : thermal/ : : : : : power : : : : : subsystems. : | Metric | metric_collector_module | true | Gathers | : Collector : : : software : : : : : health and : : : : : performance : : : : : telemetry : : : : : (e.g., : : : : : hitless : : : : : metrics, : : : : : PSI). : | GPIO | gpio_collector_module | false | Monitors | : Collector : : : discrete GPIO : : : : : inputs and : : : : : implements : : : : : power control : : : : : signals. : | Power | power_fault_log_collector_module | false | Subscribes to | : Fault Log : : : power-good : : Collector : : : signals and : : : : : records power : : : : : faults. : | SEL | sel_collector_module | false | Gathers and | : Collector : : : records : : : : : System Event : : : : : Log (SEL) : : : : : messages. : | PCIe | pcie_collector_module | false | Discovers | : Collector : : : PCIe slots : : : : : and : : : : : aggregates : : : : : link : : : : : telemetry. :


Supported Collectors and Core Tasks

1. FRU Collector (fru_collector.cc)

Responsible for physical inventory scanning:

  • Evaluates Entity Manager JSON probe rules.
  • Interrogates FRU EEPROMs to extract part numbers, serial numbers, and assets.
  • Links components together in a topological tree (TopologyConfigNode).

2. Sensor Collector (sensor_collector.cc)

Coordinates all telemetry gathering:

  • Instantiates sensor devices mapped from configurations.
  • Spawns background worker loops to periodically refresh values.
  • Performs threshold evaluations and triggers events (if enable_threshold_monitoring is active).

3. Bulk Sensor Collector (bulk_sensor_collector.h)

Coordinates high-frequency batched telemetry collection:

  • Groups sensors into SensorSets by sampling interval and category.
  • Offloads subscriptions to hardware drivers via dedicated MonitoringChangeExecutor threads.
  • Stores raw telemetry batches in circular buffers (BulkStore) and extracts individual SensorValues on demand via BulkSensor.

4. Thermal Collector (thermal_collector.cc)

Coordinates thermal management loops and fan PID controllers:

  • Orchestrates multi-zone thermal loops via ZoneManager and PID/stepwise controllers.
  • Manages Redfish ThermalSubsystem (Fans) and PowerSubsystem (PowerSupplies).
  • Supports runtime tuning of PID control coefficients and manual fan override modes.

5. Metric Collector (metric_collector.cc)

Monitors tlBMC service health:

  • Polls memory consumption, CPU utilization, thread counts, and DBus messaging latencies.
  • Reads pressure stall information (PSI) from the kernel.

6. GPIO Collector (gpio_collector.cc)

Polls and monitors hardware pins:

  • Integrates with the platform's GPIO pins using Linux kernel gpiod interfaces.
  • Implements host power-control submodules.

7. Power Fault Log Collector (power_fault_log_collector.cc)

Subscribes to power-good signals and records power faults:

  • Monitors fault log directories or GPIO power-good transitions.
  • Records structured power fault event logs.

8. SEL Collector (sel_collector.cc)

Aggregates alerts:

  • Listens to internal threshold monitors.
  • Writes structured System Event Logs (SEL) back to the BMC.

9. PCIe Collector (pcie_collector.cc)

Discovers PCIe slots and aggregates link telemetry:

  • Evaluates slot stable IDs against physical Redfish locations.
  • Monitors presence via GPIO pins and aggregates link telemetry.

Protobuf Configuration Schemas

The collectors run background tasks that map hardware state to local memory buffers. They parse and write to the following protobuf schemas:

  • FruTable / Fru (defined in fru.proto): Stores physical inventory assets (EEPROM fields).
  • Processor (defined in processor.proto): Maps CPU inventory attributes (cores, threads, architecture).
  • Memory (defined in memory.proto): Maps DIMM memory module sizing and vendor info.
  • ResourceStatus (defined in status.proto): State management values (enabled, absent, error states).
  • SensorTable / Sensor (defined in sensor.proto): Schema representing sensor channels and dynamic measurements.
  • SoftwareMetrics (defined in software_metrics.proto): Schema representing daemon sockets and netfilter stats.
  • PowerFaultLogEntry (defined in power_fault_log_entry.proto): Defines the event parameters logged on power failures.
  • SseEvent (defined in sse_event.proto): SSE frame layout for satellite controller alerts.
  • ThermalConfig (defined in thermal_config.proto): Defines multi-zone thermal PID coefficients and fan stepwise management rules.

Configuration Example (tlbmc_config_bundle.textproto)

Shows how platform integrators enable the FRU, Sensor, and Gpio collectors on a platform:

general_config {
  platform_name: "default"
  fru_collector_module {
    enabled: true
    own_chassis_in_redfish: true
  }
  sensor_collector_module {
    enabled: true
    enable_threshold_monitoring: true
  }
  gpio_collector_module {
    enabled: true
    power_control_sub_module {
      enabled: true
      power_control_type: POWER_CONTROL_TYPE_GPIO
    }
  }
  sel_collector_module {
    enabled: true
  }
}

Code References

Config & Inventory Protos

Core Code