Skip to content

Lab7Defensive/DellPowerEdgeFanNoiseReduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Dynamic Fan Control Script for Dell R720xd

This script dynamically controls the fans on a Dell R720xd server, prioritizing quiet operation while maintaining optimal cooling. It uses ipmitool to adjust fan speeds based on workload and temperature.

Features

  • Dynamic Fan Speed Adjustment: Automatically adjusts fan speeds based on system temperature.
  • Quiet Operation: Starts with a low fan speed and increases only as necessary.
  • Failsafe Mechanism: Restores dynamic fan control if an error occurs.
  • Configurable: Easily adjust temperature thresholds, fan speeds, and check intervals.
  • Detailed Logging: Logs actions, errors, and temperature readings to /var/log/fan_control.log.

How to Use

1. Prerequisites

IPMItool: Ensure ipmitool is installed:

sudo apt install ipmitool

Root Access: The script requires root privileges to control the server fans.

2. Download the Script

Save the script to /usr/local/bin/fan_control.sh:

sudo nano /usr/local/bin/fan_control.sh

Paste the script content and save.

3. Make the Script Executable

sudo chmod +x /usr/local/bin/fan_control.sh

From here you can either start the script manually or automate it to start on boot with a system service:

Automate the Script with systemd

1. Create a Systemd Service File

Create a new service file:

sudo nano /etc/systemd/system/fan_control.service

Paste the following:

ini
Copy code
[Unit]
Description=Dynamic Fan Control Script
After=network.target

[Service]
ExecStart=/usr/local/bin/fan_control.sh
Restart=always
User=root
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

2. Reload and Enable the Service

Reload systemd to recognize the new service:

sudo systemctl daemon-reload
sudo systemctl enable fan_control.service

Start the service:

sudo systemctl start fan_control.service

3. Verify the Service

Check the service status:

sudo systemctl status fan_control.service

Configuration

Adjustable Parameters

You can modify these parameters in the script to suit your needs:

TEMP_CHECK_INTERVAL: Time between temperature checks (default: 30 seconds). MIN_FAN_SPEED: Minimum fan speed percentage (default: 20%). MAX_FAN_SPEED: Maximum fan speed percentage (default: 50%). TEMP_THRESHOLDS: Temperature thresholds for fan speed adjustments. FAN_SPEEDS: Fan speeds corresponding to the thresholds. Example To adjust fan speeds more aggressively, modify:

TEMP_THRESHOLDS=(35 45 55 65 75)
FAN_SPEEDS=(20 30 40 50 60)

Logs

The script logs all actions, temperature readings, and errors to: /var/log/fan_control.log

To view the logs:

tail -f /var/log/fan_control.log

Troubleshooting

Common Issues

ipmitool Command Fails:

Ensure ipmitool is installed and functional:

ipmitool sdr
Ensure IPMI is enabled in the BIOS/UEFI.

Service Fails to Start:

Check the service logs:

sudo journalctl -u fan_control.service

Fan Speed Fluctuations:

Increase the TEMP_CHECK_INTERVAL or adjust TEMP_THRESHOLDS and FAN_SPEEDS to reduce sensitivity.

License

This script is released under the MIT License.

How to Use This README

  1. Save the content as README.md in your GitHub repository.
  2. Commit and push it to your repository:
    git add README.md
    git commit -m "Added README for Dynamic Fan Control Script"
    git push

About

Script to reduce the noise of Dell PowerEdge Server fans dynamically based on work load.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages