|
|
||
|---|---|---|
| README.md | ||
| fan_controller.py | ||
| install.sh | ||
| requirements.txt | ||
| web_server.py | ||
README.md
IPMI Fan Controller v2
A simpler, more robust fan controller for Dell T710 and compatible servers using IPMI.
What's Different from v1?
- Direct host execution - No Docker networking complications
- Better error recovery - Automatically reconnects on IPMI failures
- Simpler codebase - Easier to debug and modify
- Working web UI - Clean, responsive dashboard
- CLI testing mode - Test without starting the web server
Quick Start
1. Install
cd ~/projects/fan-controller-v2
chmod +x install.sh
sudo ./install.sh
This will:
- Install Python dependencies
- Create systemd service
- Set up config in
/etc/ipmi-fan-controller/
2. Configure
Edit the configuration file:
sudo nano /etc/ipmi-fan-controller/config.json
Set your IPMI credentials:
{
"host": "192.168.1.100",
"username": "root",
"password": "your-password",
"port": 623
}
3. Start
sudo systemctl start ipmi-fan-controller
Open the web UI at http://your-server:8000
CLI Testing
Test the IPMI connection without the web server:
python3 fan_controller.py 192.168.1.100 root password
This will:
- Test the connection
- Show temperatures and fan speeds
- Try manual fan control (30% → 50% → auto)
Features
Automatic Control
- Adjusts fan speed based on CPU temperature
- Configurable fan curve (temp → speed mapping)
- Panic mode: sets fans to 100% if temp exceeds threshold
Manual Control
- Set any fan speed from 0-100%
- Override automatic control temporarily
Safety Features
- Returns to automatic control on shutdown
- Reconnects automatically if IPMI connection drops
- Panic temperature protection
Configuration Options
{
"host": "192.168.1.100", // IPMI IP address
"username": "root", // IPMI username
"password": "secret", // IPMI password
"port": 623, // IPMI port (default: 623)
"enabled": false, // Start automatic control on boot
"interval": 10, // Check interval in seconds
"min_speed": 10, // Minimum fan speed (%)
"max_speed": 100, // Maximum fan speed (%)
"panic_temp": 85, // Panic mode trigger (°C)
"panic_speed": 100, // Panic mode fan speed (%)
"fan_curve": [ // Temp (°C) → Speed (%) mapping
{"temp": 30, "speed": 15},
{"temp": 40, "speed": 25},
{"temp": 50, "speed": 40},
{"temp": 60, "speed": 60},
{"temp": 70, "speed": 80},
{"temp": 80, "speed": 100}
]
}
Troubleshooting
Connection Failed
- Verify IPMI is enabled in BIOS/iDRAC
- Test manually:
ipmitool -I lanplus -H <ip> -U <user> -P <pass> mc info - Check firewall allows port 623
Fans Not Responding
- Some Dell servers need 3rd party PCIe response disabled
- Try enabling manual mode first via web UI
- Check IPMI user has admin privileges
Service Won't Start
# Check logs
sudo journalctl -u ipmi-fan-controller -f
# Check config is valid JSON
sudo python3 -c "import json; json.load(open('/etc/ipmi-fan-controller/config.json'))"
Files
fan_controller.py- Core IPMI control logicweb_server.py- FastAPI web interfaceinstall.sh- Installation scriptrequirements.txt- Python dependencies
License
MIT License - Feel free to modify and distribute.