Skip to content
spoulsonPublic

About

Custom Dell PowerEdge chassis fan speed regulator based on hardware temperature metrics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

frostd

frostd is a daemon that dynamically regulates chassis fan speeds on Dell PowerEdge 12th generation servers (e.g. R720) based on real-time temperature metrics. It reads CPU temperatures via IPMI and optionally GPU temperatures via nvidia-smi, then applies a parabolic easing curve to derive a fan speed percentage that keeps hardware cool without running fans harder than necessary.

Configure a temperature range between ideal (lowest fan speed) to maximum (highest fan speed). frostd adjusts fan speed to safely land somewhere in this range.

Why not use the server's built-in automatic fan mode?

The Baseboard Management Controller (BMC) can dynamically adjust fan speed to keep CPU temps cool, but it doesn't know how to regulate GPU temps.

Additionally, the BMC settings are non-adjustable. With frostd it is possible to set much lower fan speeds than usual and still keep all components cool. This allows for a measurable power reduction at idle.

Features

  • Monitors CPU package temperatures via IPMI natively (no dependency on ipmitool)
  • Optional NVIDIA GPU temperature monitoring via nvidia-smi
  • Parabolic fan speed curve between configurable ideal and maximum temperatures
  • Independent polling intervals per sensor type
  • Rolling sample window to smooth transient temperature spikes
  • Dry-run mode for observing behaviour without changing fan speeds
  • Structured logging (text or JSON) to file or stdout
  • Optional Prometheus metrics endpoint
  • Runs as a systemd service

Requirements

  • Dell PowerEdge 12th generation server (e.g. R720)
  • Debian or Ubuntu Linux, x86-64
  • Compatible NVIDIA driver and CUDA toolkit (GPU monitoring only)

Build requirements

  • GCC 9+ (GCC 13+ recommended for C23 support)
  • make
  • libcyaml-dev (YAML parsing)
  • libyaml-dev (libcyaml dependency)
  • libipmimonitoring-dev (IPMI sensor reads)
  • libfreeipmi-dev (IPMI raw commands)
  • libmicrohttpd-dev (Prometheus HTTP server)
  • libcmocka-dev (unit testing)
  • cppcheck (static analysis)

Dev Tooling

Build

make build

The compiled executable is written to ./frostd.

Run from source

make run

Launches the service using dev.yaml as the configuration file, with log output to stdout.

Local install

make install

This will:

  1. Build the binary
  2. Copy frostd.yaml to /etc/frostd.yaml (skipped if the file already exists)
  3. Install the logrotate configuration to /etc/logrotate.d/frostd
  4. Install and enable the frostd systemd service

Local uninstall

make uninstall

This reverts an install from make install. It stops and removes the systemd service. The configuration file and logs are preserved.

make uninstall_clean

Same as uninstall, but also removes /etc/frostd.yaml and the log file specified within it.

Package install

Build and install a Debian .deb package.

make package

Produces a frostd_<version>_amd64.deb file that can be installed with:

sudo apt install ./frostd_<version>_amd64.deb

Configuration

The default configuration file path is /etc/frostd.yaml. Override with:

frostd -c /path/to/config.yaml

Top-level options

Field Type Default Description
log_file string (stdout) Path to log file. Leave empty to log to stdout.
log_format string text Log format: text or json.
dry_run bool false Log suggested fan speeds without applying them.
fan_log_interval duration 15s How often to log current fan speeds.

Prometheus options (prometheus)

Optional. Omit the section (or leave listen_addr empty) to disable.

Field Type Default Description
listen_addr string (none) host:port to bind the metrics HTTP server. When set, GET /metrics exposes Prometheus metrics.

Exported metrics

Metric Labels Description
frostd_sensor_temperature sensor, id Current temperature reading per sensor ID, in Celsius.
frostd_sensor_aggregate_temperature sensor Rolling aggregate temperature used for fan speed calculation, in Celsius.
frostd_suggested_fan_speed_percent sensor Fan speed percentage suggested by this sensor type.
frostd_actual_fan_rpm fan Actual fan speed in RPM (for fans that report RPM).
frostd_actual_fan_speed_percent fan Actual fan speed as a percentage (for fans that report percent).
frostd_system_fan_speed_percent (none) Commanded system fan speed — the highest suggestion across all sensor types.

Sensor options (cpu / gpu)

Both cpu and gpu sections are optional, but at least one must be enabled.

Field Type Default Description
ideal_temp float 40 Temperature (°C) at which fans run at minimum speed.
max_temp float 75 Temperature (°C) at which fans run at full speed.
sample_size int 3 Number of polling samples to retain in the rolling average.
sample_interval duration 15s How often to poll temperature for this sensor type.

Fan speed algorithm

For each sensor type, frostd polls temperature, takes the maximum reading across all sensor IDs, and maintains a rolling average of the last sample_size maximums. The suggested fan speed is:

suggested = min(100, (actual - ideal)² × 100 / (max - ideal)²)

The system fan speed is set to the highest suggestion across all active sensor types. Fan speed is only updated when at least one sensor has reported since the last update, and only when the suggested speed has changed.

Example configuration

log_file: /var/log/frostd/frostd.log
log_format: json
dry_run: false
fan_log_interval: 15s

prometheus:
  listen_addr: ":9100"

cpu:
  ideal_temp: 40
  max_temp: 75
  sample_size: 3
  sample_interval: 15s

gpu:
  ideal_temp: 45
  max_temp: 80
  sample_size: 3
  sample_interval: 10s

License

Apache 2.0 — see LICENSE.

About

Custom Dell PowerEdge chassis fan speed regulator based on hardware temperature metrics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages