Skip to content

Scripts to control your Dell PowerEdge fans via IPMI, systemd version

Notifications You must be signed in to change notification settings

rhclayto/Dell_iDRAC_fan_controller_systemd

 
 

Repository files navigation

Warning If you update to the latest version, be sure to replace "CPU_TEMPERATURE_TRESHOLD" environment variable with "CPU_TEMPERATURE_THRESHOLD" which was a typo

I modified this from tigerblue77's cool Docker container to work with systemd instead, on bare-metal or VM, whatever.

Table of Contents
  1. Prerequisites
  2. Usage
  3. Parameters
  4. Troubleshooting
  5. Contributing

Prerequisites

iDRAC version

This thingamabob only works on Dell PowerEdge servers that support IPMI commands, i.e. < iDRAC 9 firmware 3.30.30.30.

To access iDRAC over LAN (not needed in "local" mode) :

  1. Log into your iDRAC web console

001

  1. In the left side menu, expand "iDRAC settings", click "Network" then click "IPMI Settings" link at the top of the web page.

002

  1. Check the "Enable IPMI over LAN" checkbox then click "Apply" button.

003

  1. Test access to IPMI over LAN running the following commands :
apt -y install ipmitool
ipmitool -I lanplus \
  -H <iDRAC IP address> \
  -U <iDRAC username> \
  -P <iDRAC password> \
  sdr elist all

(back to top)

Usage

  1. Place the .sh files in /opt/iDRAC-Fan-Control. Be sure to make them executable.
  2. Place the .service file wherever systemd service files go on your system. For instance, on Debian/Ubuntu it's usually /etc/systemd/system
  3. Modify the .service file to work with your setup. The environment variables used to configure the script (see below) are in the .service file. I also have the systemd service locked down with various protections. Modify these if they don't work on your system. For instance, I have PrivateDevices=true, then specifically allow access to only the IPMI devices /dev/ipmi0. Your IPMI device might be named differently. All of these restriction can be disabled if needed by commenting them out. Also, the .service file is set up to control fans on the local machine. If you need to control fans on a machine over the network, change the environment variables in the .service file accordingly (see below).
  4. Start the service with systemctl start idrac-fan-controller.service.
  5. If all goes well, enable the service with systemctl enable idrac-fan-controller.service.
  6. Logs can be viewed with journalctl -u idrac-fan-controller .

(back to top)

Parameters

All parameters are optional as they have default values (including default iDRAC username and password).

  • IDRAC_HOST parameter can be set to "local" or to your distant iDRAC's IP address. Default value is "local".
  • IDRAC_USERNAME parameter is only necessary if you're adressing a distant iDRAC. Default value is "root".
  • IDRAC_PASSWORD parameter is only necessary if you're adressing a distant iDRAC. Default value is "calvin".
  • FAN_SPEED parameter can be set as a decimal (from 0 to 100%) or hexadecimaladecimal value (from 0x00 to 0x64) you want to set the fans to. Default value is 5(%).
  • CPU_TEMPERATURE_THRESHOLD parameter is the T°junction (junction temperature) threshold beyond which the Dell fan mode defined in your BIOS will become active again (to protect the server hardware against overheat). Default value is 50(°C).
  • CHECK_INTERVAL parameter is the time (in seconds) between each temperature check and potential profile change. Default value is 60(s).
  • DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE parameter is a boolean that allows to disable third-party PCIe card Dell default cooling response. Default value is false.
  • KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT parameter is a boolean that allows to keep the third-party PCIe card Dell default cooling response state upon exit. Default value is false, so that it resets the third-party PCIe card Dell default cooling response to Dell default.

(back to top)

Troubleshooting

If your server frequently switches back to the default Dell fan mode:

  1. Check Tcase (case temperature) of your CPU on Intel Ark website and then set CPU_TEMPERATURE_THRESHOLD to a slightly lower value. Example with my CPUs (Intel Xeon E5-2630L v2) : Tcase = 63°C, I set CPU_TEMPERATURE_THRESHOLD to 60(°C).
  2. If it's already good, adapt your FAN_SPEED value to increase the airflow and thus further decrease the temperature of your CPU(s)
  3. If neither increasing the fan speed nor increasing the threshold solves your problem, then it may be time to replace your thermal paste

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

About

Scripts to control your Dell PowerEdge fans via IPMI, systemd version

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%