The iDRAC stock curve runs the CPU at ~72°C on the 7080 RPM floor even under load (optimises for quiet, not cool). Add a bash daemon + systemd unit that drives the chassis fans from CPU temp on two curves, picked by garage occupancy (the server is in the garage): COOL when empty (measured ~58-65°C under load), QUIET near the silent floor when the ha-sofia garage door shows someone is there (open, or <15min since last activity). Manual fan mode is backstopped: bash EXIT trap + systemd ExecStopPost hand fans back to Dell auto on stop/crash; CPU>=83°C or repeated IPMI failures do the same. Pushgateway metrics (job=fan_control). 36 unit tests cover the pure curve/hysteresis/presence/parse logic; DRY_RUN + RUN_ONCE for integration checks. Deployed and verified on 192.168.1.127 (CPU 70->58°C in cool mode, hysteresis stepping confirmed). Design: docs/plans/2026-06-04-pve-fan-control-design.md Runbook: docs/runbooks/fan-control.md [ci skip] Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
668 B
Desktop File
21 lines
668 B
Desktop File
[Unit]
|
|
Description=Presence-aware IPMI fan controller (Dell R730, garage)
|
|
Documentation=https://github.com/ViktorBarzin/infra/blob/master/scripts/fan-control.sh
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
EnvironmentFile=-/etc/fan-control.env
|
|
ExecStart=/usr/local/bin/fan-control
|
|
# Belt-and-suspenders: whatever happens to the daemon, hand the fans back to
|
|
# the iDRAC's own automatic curve so the box is never stuck in manual mode.
|
|
ExecStopPost=/usr/bin/ipmitool raw 0x30 0x30 0x01 0x01
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=fan-control
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|