Keepin’ it cool: Dell R620 Fan Script
What’s the difference between the stock fan speed of a Dell R620 and a Boeing 747 engine? One can actually cause flight. I don’t know about you, but I really don’t want my servers flying off to Cancun for a weekend trip. How can we take this from being loud enough to cause hearing damage down to “my keyboard is louder than my servers”? Enter Dell’s IPMI Tool. With the IPMI Tool, we can set custom fan speeds! Not only are we going to change the fan speeds to make our servers quieter, but we are going to also write a script up to easily set them in the future!
But why would I need to have a script? Can’t I just set it and forget it?
Theoretically yes, but as we are homelabbers, we know something could always happen. Recently, my PDU gave me the magic smoke and shut off my R620’s. When I booted them back up, they were back to 100% fan speed, which is not ideal. Having this script allowed me to double click on one file and get everything back under control.
Before we start, make sure you download IPMI Tools from here. We will be using version 1.8.18 for this post. You’ll also want to grab your servers iDRAC IP, Username, and Password. These are very important.
Installation is pretty simple. Once you have it downloaded, navigate to where you downloaded it and double click “ipmitool-setup-1.8.18-dellemc_p001.exe” to launch it. On the first page of the installer, click “Next”.
You will now see the license agreement. This is very important and you must read it. Once you have finished reading it, click “I agree”.
Finally, you can pick where to install IPMITool. I kept it in the default installation path which is “C:\ipmitool_1.8.18-dellemc_p001”.
Click “install” and wait for the installation to finish. Once it has finished installation, we can work on getting the script ready! Open up both Notepad and Command Prompt.
The first step to making this a script is we need to change where we will be executing the commands from. In Command prompt, run the following command and press enter:
cd C:\ipmitool_1.8.18-dellemc_p001
Once we know the pathway is correct, put the same command in your Notepad. The next commands I find easier to type in Notepad and then copy/paste into Command Prompt, as you will need to change a few things. The first command we need to run is to set the fan speed to manually controlled. Copy and paste the following command into your notepad:
ipmitool.exe -I lanplus -H <ipaddress> -U <username> -P <password> raw 0x30 0x30 0x01 0x00
You will now need to change the <ipaddress> to match your servers iDRAC IP, the <username> to the iDRAC username, and the <password> to the iDRAC password. An example is:
ipmitool.exe -I lanplus -H 10.0.0.16 -U root -P SecurePass23 raw 0x30 0x30 0x01 0x00
*Disclaimer* It is not a great practice to store passwords in plaintext like we are doing here. Proceed knowing that if your system is compromised, your iDRAC login could be exposed.
Copy and paste the command you modified into Command Prompt and hit enter. You are now ready to set the fan speeds and enjoy a nice quiet server! Same as before, I find it easier to modify the next command in Notepad and then copy paste it into Command Prompt.
ipmitool.exe -I lanplus -H <ipaddress> -U <username> -P <password> raw 0x30 0x30 0x02 0xff <fanspeed>
Once you have this in your Notepad, we need to change a few things. Same as before, update <ipaddress>, <username>, and <password>. For <fanspeed>, you can pick any fan speed in increments of 10. Below is a list of potential fan speeds. Once you have decided what fan speed you want to use, replace <fanspeed> with that hex value.
- Off: 0x00
- 10%: 0x0A
- 20%: 0x14
- 30%: 0x1E
- 40%: 0x28
- 50%: 0x32
- 60%: 0x3C
- 70%: 0x46
- 80%: 0x50
- 90%: 0x5A
- 100%: 0x64
An example of what the command may look like is:
ipmitool.exe -I lanplus -H 10.0.0.16 -U root -P SecurePass23 raw 0x30 0x30 0x02 0xff 0x14
I like to keep my servers at 20%. I did some testing and with my full server load, temps stay very nice at 20% fan speed. Now copy and paste this command into your Command Prompt and hit enter.
You should instantly hear your fans slow down and everything become quiet. Sweet, sweet quiet. So how do we make this into a script? Easy, you already did! Since we saved all of the commands in Notepad, we can now save it as a .bat file. Save it to somewhere you can easily access it (I saved mine to my documents folder).
*Pro Tip* If you have multiple Dell servers you can have setup them all in one .bat file! I have two R620’s so both mine are scripted out to have 20% fan speed.
While writing this, I also decided to create a PowerShell version of the script that is very interactive. I essentially nullified this entire post haha, but I still 100% believe that this method is great and does show you what is actually being done. While my PowerShell version is also good, we can fall into the habit of just running things and not knowing what is actually being ran. If you would like to see my PowerShell version, it is up on my Github. Here is a direct link to the Repo.