# Controlar Fans/Coolers - Linux

Controla os fans/coolers/temperatura com ipmitool

# How to control Dell server fanspeeds with ipmitool

Link: [https://wiki.joeplaa.com/en/tutorials/how-to-control-dell-server-fanspeeds-with-ipmitool](https://wiki.joeplaa.com/en/tutorials/how-to-control-dell-server-fanspeeds-with-ipmitool)

# Introduction

I'm running a homelab partly as a hobby, but also to support our business needs, especially the software development part. My current setup consist of three servers, one HP and two Dell servers. The HP server is running perfectly fine when considering its temperatures and fanspees. The fans are throttled down pretty aggressively, so I don't really have too much of an issue with noise. It will speed up and make a racket when TeamCity is doing its thing, but that is shortlived.

The Dells however are troublesome. I have a T320 with 8 harddisks running TrueNAS. The disks obviously produce heat and the single fan in the tower doesn't generate enough airflow. Or better said, because the air shroud is missing, the air is not properly routed along the disk and through the CPU heat sink. The CPU will run into the 50°C region (when idling) when the ambient temperature is around 30°C (we're experiencing a heat wave).

The other Dell, a R320, is just loud. The little fans have to spin at an insane rate to keep the CPU cool. On top of that, I flashed the RAID card to passthrough mode for ZFS. The server doesn't get any disk temperature readings and thus preventatively speeds up the fans (this doesn't seem to apply to the T320).

The real solution would be to have a dedicated, air-conditioned (or at least well ventilated) room. But alas, we don't have that luxury. Currently the servers are in a little hallway next to the office. This little room will heat up quickly with three servers buzzing away, so the doors cannot be closed permanently.

A temporary "fix", well it isn't really a fix, because they are still very loud, is to slow down the fans manually using `ipmitool` commands. The downside obviously is that temperatures will go up quickly. Luckily [brezlord](https://github.com/brezlord/iDRAC7_fan_control) made [a script](https://github.com/brezlord/iDRAC7_fan_control) to fix that, thanks man!.

# The script

I modified it a little to fit my specific usecase:

- Changed the "dynamic" temperature from 35 to 45°C
- Added additional speed settings
- Use the CPU instead of inlet (ambient) temperature to control the speeds
- Added additional speed increments

```bash
#!/bin/bash
#
# https://github.com/brezlord/iDRAC7_fan_control
# A simple script to control fan speeds on Dell generation 12 PowerEdge servers.
# If the inlet temperature is above 45deg C enable iDRAC dynamic control and exit program.
# If inlet temp is below 45deg C set fan control to manual and set fan speed to predetermined value.
# The tower servers T320, T420 & T620 inlet temperature sensor is after the HDDs so temperature will
# be higher than the ambient temperature.

# Variables
IDRAC_IP="IP address of iDRAC"
IDRAC_USER="user"
IDRAC_PASSWORD="password"
# Fan speed in %
SPEED0="0x00"
SPEED5="0x05"
SPEED10="0x0a"
SPEED15="0x0f"
SPEED20="0x14"
SPEED25="0x19"
SPEED30="0x1e"
SPEED35="0x23"
SPEED40="0x28"
SPEED45="0x2D"
SPEED50="0x32"
TEMP_THRESHOLD="45" # iDRAC dynamic control enable threshold
#TEMP_SENSOR="04h"   # Inlet Temp
#TEMP_SENSOR="01h"  # Exhaust Temp
TEMP_SENSOR="0Eh"  # CPU 1 Temp
#TEMP_SENSOR="0Fh"  # CPU 2 Temp

# Get system date & time.
DATE=$(date +%d-%m-%Y\ %H:%M:%S)
echo "Date $DATE"

# Get temperature from iDARC.
T=$(ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD sdr type temperature | grep $TEMP_SENSOR | cut -d"|" -f5 | cut -d" " -f2)
echo "--> iDRAC IP Address: $IDRAC_IP"
echo "--> Current CPU Temp: $T"

# If CPU ~~ambient~~ temperature is above 45deg C enable dynamic control and exit, if below set manual control.
if [[ $T > $TEMP_THRESHOLD ]]
then
  echo "--> Temperature is above 45deg C"
  echo "--> Enabled dynamic fan control"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x01 0x01
  exit 1
else
  echo "--> Temperature is below 45deg C"
  echo "--> Disabled dynamic fan control"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x01 0x00
fi

# Set fan speed dependant on CPU ~~ambient~~ temperature if CPU ~~inlet~~ temperature is below 45deg C.
# If CPU ~~inlet~~ temperature between 0 and 19deg C then set fans to 15%.
if [ "$T" -ge 0 ] && [ "$T" -le 19 ]
then
  echo "--> Setting fan speed to 15%"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x02 0xff $SPEED15

# If inlet temperature between 20 and 24deg C then set fans to 20%
elif [ "$T" -ge 20 ] && [ "$T" -le 24 ]
then
  echo "--> Setting fan speed to 20%"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x02 0xff $SPEED20

# If inlet temperature between 25 and 29deg C then set fans to 25%
elif [ "$T" -ge 25 ] && [ "$T" -le 29 ]
then
  echo "--> Setting fan speed to 25%"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x02 0xff $SPEED25

# If inlet temperature between 30 and 34deg C then set fans to 30%
elif [ "$T" -ge 30 ] && [ "$T" -le 34 ]
then
  echo "--> Setting fan speed to 30%"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x02 0xff $SPEED30

# If inlet temperature between 35 and 40deg C then set fans to 35%
elif [ "$T" -ge 35 ] && [ "$T" -le 39 ]
then
  echo "--> Setting fan speed to 35%"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x02 0xff $SPEED35

# If inlet temperature between 40 and 45deg C then set fans to 40%
elif [ "$T" -ge 40 ] && [ "$T" -le 45 ]
then
  echo "--> Setting fan speed to 40%"
  ipmitool -I lanplus -H $IDRAC_IP -U $IDRAC_USER -P $IDRAC_PASSWORD raw 0x30 0x30 0x02 0xff $SPEED40
fi
```

<div class="code-toolbar" id="bkmrk-copy" style="text-align: justify;"><div class="toolbar"><div class="toolbar-item"><button>Copy</button></div></div></div># Implementation

## pfSense

1. Create a folder `/root/fan_control`
2. The Bash executable in pfSense is located in `usr/local/bin/bash`, so make sure this is specified in the top of the script:
    
    ```bash
    #!/usr/local/bin/bash
    ...
    ```
3. Copy the script to the folder
4. Make script executable: `chmod +x /root/fan_control/fan_control.sh`
5. Add iDRAC credentials in script
6. Run the script to test
7. Create a cron job with `crontab -e` and add line:
    
    ```shell
    * * * * * /usr/local/bin/bash /root/fan_control/fan_control.sh >/dev/null 2>&1
    ```

## TrueNAS

I followed [breznet's guide](https://www.breznet.com/dell-idrac7-manual-fan-control/).

1. Create a dataset `fan_control`
2. Copy the script to the dataset
3. Make script executable: `chmod +x /mnt/store1/fan_control/fan_control.sh`
4. Add iDRAC credentials in script
5. Run the script to test
6. Create a cron job in TrueNAS GUI running every minute

![cronjob-truenas-fan_control.png](https://wiki.joeplaa.com/images/cronjob-truenas-fan_control.png)

#   

# Script controla fan - decimal/hexadecinal

Link: [https://forum.proxmox.com/threads/ipmi-tool-error-after-v8-upgrade.129334/page-2](https://forum.proxmox.com/threads/ipmi-tool-error-after-v8-upgrade.129334/page-2)

<div class="bbCodeBlock-title" id="bkmrk-bash%3A">Bash:</div>```bash
#!/bin/bash

# Fancontrol v1.1 2022-09-15 15:42

# Define variables

MAX_FAN=90
MIN_FAN=20
HIGH_TEMP=37
LOW_TEMP=35
SPEED_STEP=10
IDRAC_IP=10.0.0.1
IPMI_USER=fancontrol
IPMI_PASSWORD=yoursupercomplexpassword

# Define Functions

ENABLE_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x01 0x00 > /dev/null 2>&1
}


GET_TEMP ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD  sensor reading "Exhaust Temp"|sed 's/[^0-9]//g'
}


SET_FAN ()
{
 ipmitool -I lanplus -H $IDRAC_IP -U $IPMI_USER -P $IPMI_PASSWORD raw 0x30 0x30 0x02 0xff $FAN_SETTING > /dev/null 2>&1
}

# File to save the last fan speed

 [ -f fan_speed.last ] || echo $MIN_FAN > fan_speed.last

FAN_SPEED=$(<fan_speed.last)

#-----------------------------------------------------------------------------------------

CURRENT_TEMP=$(GET_TEMP)                # get the current temperature

 if (($CURRENT_TEMP > $HIGH_TEMP)) ; then
    FAN_SPEED=$(expr $FAN_SPEED + $SPEED_STEP)
     if (($FAN_SPEED > $MAX_FAN)) ; then
                FAN_SPEED=$MAX_FAN
        fi
 fi

 if (($CURRENT_TEMP < $LOW_TEMP)) ; then
     FAN_SPEED=$(expr $FAN_SPEED - $SPEED_STEP)
     if (($FAN_SPEED < $MIN_FAN)) ; then
         FAN_SPEED=$MIN_FAN
     fi
 fi

FAN_SETTING=$(printf "0x"'%x\n' $FAN_SPEED)
ENABLE_FAN
SET_FAN

logger -t FanControl "Current Temperature" $CURRENT_TEMP"C" "Fans at" $FAN_SPEED"%"
echo $FAN_SPEED > fan_speed.last

exit 0
```

**Informações adicionais:**

Launch a command prompt on the server and navigate to the directory above. Then run the following commands, substituting the ip address (-H), username (-U), and password (-P) of your iDRAC:

```
To enable remote fan control: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x01 0x00

To set the fan to 20%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x14

To set the fan to 25%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x19

To set the fan to 30%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x1e

To set the fan to 35%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x23

To set the fan to 40%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x28

To set the fan to 45%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x2D

To set the fan to 50%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x32
```

**TABELA CONVERSÃO DECIMAL PARA HEXADECIMAL**

# Decimal-hexadecimal-binary conversion table

<div class="table-responsive" id="bkmrk-dec-hex-bin-%C2%A0-dec-he"><table class="cellpadding-1 table" style="width: 102.975%;" title="This table contains four sets of three columns, each of which give the decimal, hexadecimal, and binary values for the same quantity. The first, fourth, seventh, and tenth columns list a decimal value. The second, fifth, eighth, and eleventh columns list a matching hexadecimal value for the decimal values. The third, sixth, ninth, and twelfth columns list a matching binary value for the decimal values."><colgroup><col style="width: 6.19585%;"></col><col style="width: 6.31501%;"></col><col style="width: 10.7236%;"></col><col style="width: 3.45538%;"></col><col style="width: 6.67246%;"></col><col style="width: 6.67246%;"></col><col style="width: 10.6044%;"></col><col style="width: 1.19151%;"></col><col style="width: 6.0767%;"></col><col style="width: 6.31501%;"></col><col style="width: 10.9619%;"></col><col style="width: 1.31066%;"></col><col style="width: 6.31501%;"></col><col style="width: 6.07867%;"></col><col style="width: 11.1982%;"></col></colgroup><tbody><tr><td>Dec</td><td>Hex</td><td>Bin</td><td> </td><td>Dec</td><td>Hex</td><td>Bin</td><td> </td><td>Dec</td><td>Hex</td><td>Bin</td><td> </td><td>Dec</td><td>Hex</td><td>Bin</td></tr><tr><td>0</td><td>0</td><td>00000000</td><td> </td><td>64</td><td>40</td><td>01000000</td><td> </td><td>128</td><td>80</td><td>10000000</td><td> </td><td>192</td><td>c0</td><td>11000000</td></tr><tr><td>1</td><td>1</td><td>00000001</td><td> </td><td>65</td><td>41</td><td>01000001</td><td> </td><td>129</td><td>81</td><td>10000001</td><td> </td><td>193</td><td>c1</td><td>11000001</td></tr><tr><td>2</td><td>2</td><td>00000010</td><td> </td><td>66</td><td>42</td><td>01000010</td><td> </td><td>130</td><td>82</td><td>10000010</td><td> </td><td>194</td><td>c2</td><td>11000010</td></tr><tr><td>3</td><td>3</td><td>00000011</td><td> </td><td>67</td><td>43</td><td>01000011</td><td> </td><td>131</td><td>83</td><td>10000011</td><td> </td><td>195</td><td>c3</td><td>11000011</td></tr><tr><td>4</td><td>4</td><td>00000100</td><td> </td><td>68</td><td>44</td><td>01000100</td><td> </td><td>132</td><td>84</td><td>10000100</td><td> </td><td>196</td><td>c4</td><td>11000100</td></tr><tr><td>5</td><td>5</td><td>00000101</td><td> </td><td>69</td><td>45</td><td>01000101</td><td> </td><td>133</td><td>85</td><td>10000101</td><td> </td><td>197</td><td>c5</td><td>11000101</td></tr><tr><td>6</td><td>6</td><td>00000110</td><td> </td><td>70</td><td>46</td><td>01000110</td><td> </td><td>134</td><td>86</td><td>10000110</td><td> </td><td>198</td><td>c6</td><td>11000110</td></tr><tr><td>7</td><td>7</td><td>00000111</td><td> </td><td>71</td><td>47</td><td>01000111</td><td> </td><td>135</td><td>87</td><td>10000111</td><td> </td><td>199</td><td>c7</td><td>11000111</td></tr><tr><td>8</td><td>8</td><td>00001000</td><td> </td><td>72</td><td>48</td><td>01001000</td><td> </td><td>136</td><td>88</td><td>10001000</td><td> </td><td>200</td><td>c8</td><td>11001000</td></tr><tr><td>9</td><td>9</td><td>00001001</td><td> </td><td>73</td><td>49</td><td>01001001</td><td> </td><td>137</td><td>89</td><td>10001001</td><td> </td><td>201</td><td>c9</td><td>11001001</td></tr><tr><td>10</td><td>a</td><td>00001010</td><td> </td><td>74</td><td>4a</td><td>01001010</td><td> </td><td>138</td><td>8a</td><td>10001010</td><td> </td><td>202</td><td>ca</td><td>11001010</td></tr><tr><td>11</td><td>b</td><td>00001011</td><td> </td><td>75</td><td>4b</td><td>01001011</td><td> </td><td>139</td><td>8b</td><td>10001011</td><td> </td><td>203</td><td>cb</td><td>11001011</td></tr><tr><td>12</td><td>c</td><td>00001100</td><td> </td><td>76</td><td>4c</td><td>01001100</td><td> </td><td>140</td><td>8c</td><td>10001100</td><td> </td><td>204</td><td>cc</td><td>11001100</td></tr><tr><td>13</td><td>d</td><td>00001101</td><td> </td><td>77</td><td>4d</td><td>01001101</td><td> </td><td>141</td><td>8d</td><td>10001101</td><td> </td><td>205</td><td>cd</td><td>11001101</td></tr><tr><td>14</td><td>e</td><td>00001110</td><td> </td><td>78</td><td>4e</td><td>01001110</td><td> </td><td>142</td><td>8e</td><td>10001110</td><td> </td><td>206</td><td>ce</td><td>11001110</td></tr><tr><td>15</td><td>f</td><td>00001111</td><td> </td><td>79</td><td>4f</td><td>01001111</td><td> </td><td>143</td><td>8f</td><td>10001111</td><td> </td><td>207</td><td>cf</td><td>11001111</td></tr><tr><td>16</td><td>10</td><td>00010000</td><td> </td><td>80</td><td>50</td><td>01010000</td><td> </td><td>144</td><td>90</td><td>10010000</td><td> </td><td>208</td><td>d0</td><td>11010000</td></tr><tr><td>17</td><td>11</td><td>00010001</td><td> </td><td>81</td><td>51</td><td>01010001</td><td> </td><td>145</td><td>91</td><td>10010001</td><td> </td><td>209</td><td>d1</td><td>11010001</td></tr><tr><td>18</td><td>12</td><td>00010010</td><td> </td><td>82</td><td>52</td><td>01010010</td><td> </td><td>146</td><td>92</td><td>10010010</td><td> </td><td>210</td><td>d2</td><td>11010010</td></tr><tr><td>19</td><td>13</td><td>00010011</td><td> </td><td>83</td><td>53</td><td>01010011</td><td> </td><td>147</td><td>93</td><td>10010011</td><td> </td><td>211</td><td>d3</td><td>11010011</td></tr><tr><td>20</td><td>14</td><td>00010100</td><td> </td><td>84</td><td>54</td><td>01010100</td><td> </td><td>148</td><td>94</td><td>10010100</td><td> </td><td>212</td><td>d4</td><td>11010100</td></tr><tr><td>21</td><td>15</td><td>00010101</td><td> </td><td>85</td><td>55</td><td>01010101</td><td> </td><td>149</td><td>95</td><td>10010101</td><td> </td><td>213</td><td>d5</td><td>11010101</td></tr><tr><td>22</td><td>16</td><td>00010110</td><td> </td><td>86</td><td>56</td><td>01010110</td><td> </td><td>150</td><td>96</td><td>10010110</td><td> </td><td>214</td><td>d6</td><td>11010110</td></tr><tr><td>23</td><td>17</td><td>00010111</td><td> </td><td>87</td><td>57</td><td>01010111</td><td> </td><td>151</td><td>97</td><td>10010111</td><td> </td><td>215</td><td>d7</td><td>11010111</td></tr><tr><td>24</td><td>18</td><td>00011000</td><td> </td><td>88</td><td>58</td><td>01011000</td><td> </td><td>152</td><td>98</td><td>10011000</td><td> </td><td>216</td><td>d8</td><td>11011000</td></tr><tr><td>25</td><td>19</td><td>00011001</td><td> </td><td>89</td><td>59</td><td>01011001</td><td> </td><td>153</td><td>99</td><td>10011001</td><td> </td><td>217</td><td>d9</td><td>11011001</td></tr><tr><td>26</td><td>1a</td><td>00011010</td><td> </td><td>90</td><td>5a</td><td>01011010</td><td> </td><td>154</td><td>9a</td><td>10011010</td><td> </td><td>218</td><td>da</td><td>11011010</td></tr><tr><td>27</td><td>1b</td><td>00011011</td><td> </td><td>91</td><td>5b</td><td>01011011</td><td> </td><td>155</td><td>9b</td><td>10011011</td><td> </td><td>219</td><td>db</td><td>11011011</td></tr><tr><td>28</td><td>1c</td><td>00011100</td><td> </td><td>92</td><td>5c</td><td>01011100</td><td> </td><td>156</td><td>9c</td><td>10011100</td><td> </td><td>220</td><td>dc</td><td>11011100</td></tr><tr><td>29</td><td>1d</td><td>00011101</td><td> </td><td>93</td><td>5d</td><td>01011101</td><td> </td><td>157</td><td>9d</td><td>10011101</td><td> </td><td>221</td><td>dd</td><td>11011101</td></tr><tr><td>30</td><td>1e</td><td>00011110</td><td> </td><td>94</td><td>5e</td><td>01011110</td><td> </td><td>158</td><td>9e</td><td>10011110</td><td> </td><td>222</td><td>de</td><td>11011110</td></tr><tr><td>31</td><td>1f</td><td>00011111</td><td> </td><td>95</td><td>5f</td><td>01011111</td><td> </td><td>159</td><td>9f</td><td>10011111</td><td> </td><td>223</td><td>df</td><td>11011111</td></tr><tr><td>32</td><td>20</td><td>00100000</td><td> </td><td>96</td><td>60</td><td>01100000</td><td> </td><td>160</td><td>a0</td><td>10100000</td><td> </td><td>224</td><td>e0</td><td>11100000</td></tr><tr><td>33</td><td>21</td><td>00100001</td><td> </td><td>97</td><td>61</td><td>01100001</td><td> </td><td>161</td><td>a1</td><td>10100001</td><td> </td><td>225</td><td>e1</td><td>11100001</td></tr><tr><td>34</td><td>22</td><td>00100010</td><td> </td><td>98</td><td>62</td><td>01100010</td><td> </td><td>162</td><td>a2</td><td>10100010</td><td> </td><td>226</td><td>e2</td><td>11100010</td></tr><tr><td>35</td><td>23</td><td>00100011</td><td> </td><td>99</td><td>63</td><td>01100011</td><td> </td><td>163</td><td>a3</td><td>10100011</td><td> </td><td>227</td><td>e3</td><td>11100011</td></tr><tr><td>36</td><td>24</td><td>00100100</td><td> </td><td>100</td><td>64</td><td>01100100</td><td> </td><td>164</td><td>a4</td><td>10100100</td><td> </td><td>228</td><td>e4</td><td>11100100</td></tr><tr><td>37</td><td>25</td><td>00100101</td><td> </td><td>101</td><td>65</td><td>01100101</td><td> </td><td>165</td><td>a5</td><td>10100101</td><td> </td><td>229</td><td>e5</td><td>11100101</td></tr><tr><td>38</td><td>26</td><td>00100110</td><td> </td><td>102</td><td>66</td><td>01100110</td><td> </td><td>166</td><td>a6</td><td>10100110</td><td> </td><td>230</td><td>e6</td><td>11100110</td></tr><tr><td>39</td><td>27</td><td>00100111</td><td> </td><td>103</td><td>67</td><td>01100111</td><td> </td><td>167</td><td>a7</td><td>10100111</td><td> </td><td>231</td><td>e7</td><td>11100111</td></tr><tr><td>40</td><td>28</td><td>00101000</td><td> </td><td>104</td><td>68</td><td>01101000</td><td> </td><td>168</td><td>a8</td><td>10101000</td><td> </td><td>232</td><td>e8</td><td>11101000</td></tr><tr><td>41</td><td>29</td><td>00101001</td><td> </td><td>105</td><td>69</td><td>01101001</td><td> </td><td>169</td><td>a9</td><td>10101001</td><td> </td><td>233</td><td>e9</td><td>11101001</td></tr><tr><td>42</td><td>2a</td><td>00101010</td><td> </td><td>106</td><td>6a</td><td>01101010</td><td> </td><td>170</td><td>aa</td><td>10101010</td><td> </td><td>234</td><td>ea</td><td>11101010</td></tr><tr><td>43</td><td>2b</td><td>00101011</td><td> </td><td>107</td><td>6b</td><td>01101011</td><td> </td><td>171</td><td>ab</td><td>10101011</td><td> </td><td>235</td><td>eb</td><td>11101011</td></tr><tr><td>44</td><td>2c</td><td>00101100</td><td> </td><td>108</td><td>6c</td><td>01101100</td><td> </td><td>172</td><td>ac</td><td>10101100</td><td> </td><td>236</td><td>ec</td><td>11101100</td></tr><tr><td>45</td><td>2d</td><td>00101101</td><td> </td><td>109</td><td>6d</td><td>01101101</td><td> </td><td>173</td><td>ad</td><td>10101101</td><td> </td><td>237</td><td>ed</td><td>11101101</td></tr><tr><td>46</td><td>2e</td><td>00101110</td><td> </td><td>110</td><td>6e</td><td>01101110</td><td> </td><td>174</td><td>ae</td><td>10101110</td><td> </td><td>238</td><td>ee</td><td>11101110</td></tr><tr><td>47</td><td>2f</td><td>00101111</td><td> </td><td>111</td><td>6f</td><td>01101111</td><td> </td><td>175</td><td>af</td><td>10101111</td><td> </td><td>239</td><td>ef</td><td>11101111</td></tr><tr><td>48</td><td>30</td><td>00110000</td><td> </td><td>112</td><td>70</td><td>01110000</td><td> </td><td>176</td><td>b0</td><td>10110000</td><td> </td><td>240</td><td>f0</td><td>11110000</td></tr><tr><td>49</td><td>31</td><td>00110001</td><td> </td><td>113</td><td>71</td><td>01110001</td><td> </td><td>177</td><td>b1</td><td>10110001</td><td> </td><td>241</td><td>f1</td><td>11110001</td></tr><tr><td>50</td><td>32</td><td>00110010</td><td> </td><td>114</td><td>72</td><td>01110010</td><td> </td><td>178</td><td>b2</td><td>10110010</td><td> </td><td>242</td><td>f2</td><td>11110010</td></tr><tr><td>51</td><td>33</td><td>00110011</td><td> </td><td>115</td><td>73</td><td>01110011</td><td> </td><td>179</td><td>b3</td><td>10110011</td><td> </td><td>243</td><td>f3</td><td>11110011</td></tr><tr><td>52</td><td>34</td><td>00110100</td><td> </td><td>116</td><td>74</td><td>01110100</td><td> </td><td>180</td><td>b4</td><td>10110100</td><td> </td><td>244</td><td>f4</td><td>11110100</td></tr><tr><td>53</td><td>35</td><td>00110101</td><td> </td><td>117</td><td>75</td><td>01110101</td><td> </td><td>181</td><td>b5</td><td>10110101</td><td> </td><td>245</td><td>f5</td><td>11110101</td></tr><tr><td>54</td><td>36</td><td>00110110</td><td> </td><td>118</td><td>76</td><td>01110110</td><td> </td><td>182</td><td>b6</td><td>10110110</td><td> </td><td>246</td><td>f6</td><td>11110110</td></tr><tr><td>55</td><td>37</td><td>00110111</td><td> </td><td>119</td><td>77</td><td>01110111</td><td> </td><td>183</td><td>b7</td><td>10110111</td><td> </td><td>247</td><td>f7</td><td>11110111</td></tr><tr><td>56</td><td>38</td><td>00111000</td><td> </td><td>120</td><td>78</td><td>01111000</td><td> </td><td>184</td><td>b8</td><td>10111000</td><td> </td><td>248</td><td>f8</td><td>11111000</td></tr><tr><td>57</td><td>39</td><td>00111001</td><td> </td><td>121</td><td>79</td><td>01111001</td><td> </td><td>185</td><td>b9</td><td>10111001</td><td> </td><td>249</td><td>f9</td><td>11111001</td></tr><tr><td>58</td><td>3a</td><td>00111010</td><td> </td><td>122</td><td>7a</td><td>01111010</td><td> </td><td>186</td><td>ba</td><td>10111010</td><td> </td><td>250</td><td>fa</td><td>11111010</td></tr><tr><td>59</td><td>3b</td><td>00111011</td><td> </td><td>123</td><td>7b</td><td>01111011</td><td> </td><td>187</td><td>bb</td><td>10111011</td><td> </td><td>251</td><td>fb</td><td>11111011</td></tr><tr><td>60</td><td>3c</td><td>00111100</td><td> </td><td>124</td><td>7c</td><td>01111100</td><td> </td><td>188</td><td>bc</td><td>10111100</td><td> </td><td>252</td><td>fc</td><td>11111100</td></tr><tr><td>61</td><td>3d</td><td>00111101</td><td> </td><td>125</td><td>7d</td><td>01111101</td><td> </td><td>189</td><td>bd</td><td>10111101</td><td> </td><td>253</td><td>fd</td><td>11111101</td></tr><tr><td>62</td><td>3e</td><td>00111110</td><td> </td><td>126</td><td>7e</td><td>01111110</td><td> </td><td>190</td><td>be</td><td>10111110</td><td> </td><td>254</td><td>fe</td><td>11111110</td></tr><tr><td>63</td><td>3f</td><td>00111111</td><td> </td><td>127</td><td>7f</td><td>01111111</td><td> </td><td>191</td><td>bf</td><td>10111111</td><td> </td><td>255</td><td>ff</td><td>11111111</td></tr></tbody></table>

</div>

# Quiet Fans on Dell PowerEdge Servers Via IPMI

Link: https://blog.hessindustria.com/quiet-fans-on-dell-poweredge-servers-via-ipmi/

<div class="page-header" id="bkmrk-joshua-hess29-dec-20" style="text-align: justify;"><div class="container"><div class="row"><div class="col-lg-12"><div class="blog-details-page"><div class="post-author d-lg-flex justify-content-between pb-5"><div class="author-details  d-flex align-items-center"><div class="post-card-byline-content">[JOSHUA HESS](https://blog.hessindustria.com/author/joshua/)<span class="post-card-byline-date"><time datetime="2021-12-29">29 DEC 2021</time> <span class="bull">•</span> 3 MIN READ</span></div></div></div><div class="post-image image-flex mb-3 w-100">![Quiet Fans on Dell PowerEdge Servers Via IPMI](https://blog.hessindustria.com/content/images/2021/12/dell_poweredge.jpg)</div></div></div></div></div></div><main id="bkmrk-intro-you-just-got-y">## Intro

You just got your new shiny Dell PowerEdge server all set up, but you are getting annoyed by the constant fan ramping up and down or the louder than desired whining of fans. Or worse yet, you just added an "unsupported" GPU or another PCIe device to your PowerEdge and now the fans are ripping at near 100% and screaming away like a jet engine. Fear not! This quick tutorial will get your server to STFU in no time!

When I first got into servers and HomeLab years ago, the standard and accepted way to quiet down PowerEdge servers was to add a resistor in series with each of the fans. Luckily, the newer generations of PowerEdge servers since then have a standard IPMI interface and some known commands to manually control the fan speed. No resistors or soldering irons required this time, nice.

## Step By Step

### Before We Begin

Before starting, you'll need to:

<div class="main-centent-area post-details-wrapper section-padding pt-4 clearfix" style="text-align: justify;"><div class="container"><div class="row"><div class="col-md-10 mx-auto"><div class="entry-content">1. Have access to a Linux machine (Ubuntu recommended)
2. Know your Dell iDRAC IP address and login credentials
3. Make sure IPMI Over LAN option is enabled in iDRAC as shown below

<figure class="kg-card kg-image-card">![](https://blog.hessindustria.com/content/images/2021/12/image-2.png)</figure></div></div></div></div></div>### Install IPMI Tool

The first thing to do is install IPMI Tool. To do so, open a terminal and run the following command:

```
sudo apt install ipmitool
```

This is what we will use to send raw IPMI commands to the server.

### Enter Manual Fan Control Mode

To put the fan speed controller into manual or fixed speed mode, run the following command with your own iDRAC IP and credentials:

```
ipmitool -I lanplus -H <ip> -U <user> -P <pass> raw 0x30 0x30 0x01 0x00
```

### Set Static Fan Speed

To set a static fan speed run the following command with your own iDRAC IP, credentials, and fan speed as a percentage (0-100) in hexadecimal format (0x00-0x64).

```
ipmitool -I lanplus -H <ip> -U <user> -P <pass> raw 0x30 0x30 0x02 0xFF <speed>
```

For example, setting the speed to 10% (0xA) would be as follows:

```
ipmitool -I lanplus -H <ip> -U <user> -P <pass> raw 0x30 0x30 0x02 0xFF 0xA
```

**NOTE:** The static fan speed commands only work if the speed controller is set in manual mode as set above. It will return to automatic mode upon an iDRAC reset.

### Maximizing Sound Reduction

It may be counterintuitive, but to minimize sound level, lower fan speed isn't always better. In my case, with the R730 server, I found that the optimum fan speed for minimum perceived sound was 11% fan speed. I found that the lower speeds had a lower frequency sound which was actually more noticeable than the higher frequency whine at slightly higher speeds. It's worth sweeping through the speeds on your setup and finding the highest speed with an acceptable sound level.

### Double Check Your Temps

The downside to setting the fans to a static speed is, of course, reduced cooling performance and no reaction during high load. In my case, this was not an issue since my server never goes near full load and my ambient temperatures are consistently quite low. However, it is worth double-checking your temperatures and running some synthetic loads to see what the worse case would look like. You can find most of the critical temperatures exposed in the iDRAC web interface.

### Final Thoughts

This method worked great for me and I have used this on all my servers in my home lab. I took this one step further and made a bash script that I can call at a moment's notice if the settings get reset. This can happen if the iDRAC is reset in any way (FW update, SW reset, sustained power outage). You can see the simple bash script below for reference:

```
#!/bin/bash
ipmitool -I lanplus -H <ip> -U <user> -P <pass> raw 0x30 0x30  0x01 0x00
ipmitool -I lanplus -H <ip> -U <user> -P <pass> raw 0x30 0x30 0x02 0xFF 0xB
echo Server STFU done!

```

That's it! I hope this was helpful and saves some headaches and bleeding ears for fellow PowerEdge owners.

</main>

# Dell Fan Noise Control - Silence Your Poweredge

<div class="px-md xs:px-0" id="bkmrk-"></div>Link: [https://www.reddit.com/r/homelab/comments/7xqb11/dell\_fan\_noise\_control\_silence\_your\_poweredge/](https://www.reddit.com/r/homelab/comments/7xqb11/dell_fan_noise_control_silence_your_poweredge/)

Hey,

there were some threads complaining about server noise in this sub the last days. I did some research on how to manually controlling the PowerEdge fans.

I read threads on this sub and other boards and found a lot of commands. These are already widely known, but I wanted to list them again. Maybe they will help others.

I tested them with my R210II, T620 and T330. So basically a 11th, 12th and 13th generation PowerEdge. Although you might have to change the sensors' names accordingly.

```
### Dell Fan Control Commands
#
#
# Hex to Decimal: http://www.hexadecimaldictionary.com/hexadecimal/0x1a/
#
#
# print temps and fans rpms
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> sensor reading "Ambient Temp" "FAN 1 RPM" "FAN 2 RPM" "FAN 3 RPM"
#
# print fan info
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> sdr get "FAN 1 RPM" "FAN 2 RPM" "FAN 3 RPM"
#
# enable manual/static fan control
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> raw 0x30 0x30 0x01 0x00
#
# disable manual/static fan control
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> raw 0x30 0x30 0x01 0x01
#
# set fan speed to 0 rpm
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> raw 0x30 0x30 0x02 0xff 0x00
#
# set fan speed to 20 %
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> raw 0x30 0x30 0x02 0xff 0x14
#
# set fan speed to 30 %
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> raw 0x30 0x30 0x02 0xff 0x1e
#
# set fan speed to 100 %
ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> raw 0x30 0x30 0x02 0xff 0x64
```

I wrote a small script, that will check the servers temperature periodically (crontab) and disables or enables the dynamic fan control based on a temperature threshold. You may have to adjust the time frame depending on your server usage.

```
#!/bin/bash
#
# crontab -l > mycron
# echo "#" >> mycron
# echo "# At every 2nd minute" >> mycron
# echo "*/2 * * * * /bin/bash /scripts/dell_ipmi_fan_control.sh >> /tmp/cron.log" >> mycron
# crontab mycron
# rm mycron
# chmod +x /scripts/dell_ipmi_fan_control.sh
#
DATE=$(date +%Y-%m-%d-%H%M%S)
echo "" && echo "" && echo "" && echo "" && echo ""
echo "$DATE"
#
IDRACIP="<iDRAC-IP>"
IDRACUSER="<iDRAC-USER>"
IDRACPASSWORD="<iDRAC-PASSWORD>"
STATICSPEEDBASE16="0x0f"
SENSORNAME="Ambient"
TEMPTHRESHOLD="29"
#
T=$(ipmitool -I lanplus -H $IDRACIP -U $IDRACUSER -P $IDRACPASSWORD sdr type temperature | grep $SENSORNAME | cut -d"|" -f5 | cut -d" " -f2)
# T=$(ipmitool -I lanplus -H $IDRACIP2 -U $IDRACUSER -P $IDRACPASSWORD sdr type temperature | grep $SENSORNAME2 | cut -d"|" -f5 | cut -d" " -f2 | grep -v "Disabled")
echo "$IDRACIP: -- current temperature --"
echo "$T"
#
if [[ $T > $TEMPTHRESHOLD ]]
  then
    echo "--> enable dynamic fan control"
    ipmitool -I lanplus -H $IDRACIP -U $IDRACUSER -P $IDRACPASSWORD raw 0x30 0x30 0x01 0x01
  else
    echo "--> disable dynamic fan control"
    ipmitool -I lanplus -H $IDRACIP -U $IDRACUSER -P $IDRACPASSWORD raw 0x30 0x30 0x01 0x00
    echo "--> set static fan speed"
    ipmitool -I lanplus -H $IDRACIP -U $IDRACUSER -P $IDRACPASSWORD raw 0x30 0x30 0x02 0xff $STATICSPEEDBASE16
fi
```

<div class="text-neutral-content" id="bkmrk--1" slot="text-body" style="text-align: justify;"><div class="mb-sm  mb-xs px-md xs:px-0" data-post-click-location="text-body"><div class="md text-14" id="bkmrk--2"></div></div></div>

# brezlord/iDRAC7_fan_control

<div class="repository-content " id="bkmrk-"><div class="clearfix container-xl px-md-4 px-lg-5 px-3"><div><div class="Layout Layout--flowRow-until-md react-repos-overview-margin Layout--sidebarPosition-end Layout--sidebarPosition-flowRow-end" data-view-component="true"><div class="Layout-main" data-view-component="true"><div data-target="react-partial.reactRoot"><div class="Box-sc-g0xbh4-0 izjvBm"><div class="Box-sc-g0xbh4-0 eLcVee"><div class="Box-sc-g0xbh4-0 hsfLlq"><div class="Box-sc-g0xbh4-0 laYubZ"></div></div></div></div></div></div></div></div></div></div><div class="repository-content " id="bkmrk-link%3A-https%3A%2F%2Fgithub"><div class="clearfix container-xl px-md-4 px-lg-5 px-3"><div class="Layout Layout--flowRow-until-md react-repos-overview-margin Layout--sidebarPosition-end Layout--sidebarPosition-flowRow-end" data-view-component="true"><div class="Layout-main" data-view-component="true"><div data-target="react-partial.reactRoot"><div class="Box-sc-g0xbh4-0 izjvBm"><div class="Box-sc-g0xbh4-0 yfPnm"><div class="Box-sc-g0xbh4-0 ehcSsh"><div class="Box-sc-g0xbh4-0 iGmlUb"><div class="Box-sc-g0xbh4-0 iRQGXA"><nav aria-label="Repository files" class="Box-sc-g0xbh4-0 dvTdPK"></nav></div><div class="Box-sc-g0xbh4-0 bJMeLZ js-snippet-clipboard-copy-unpositioned" data-hpc="true"><article class="markdown-body entry-content container-lg">Link: [https://github.com/brezlord/iDRAC7\_fan\_control](https://github.com/brezlord/iDRAC7_fan_control)

A simple script to control fan speeds on Dell generation 12 PowerEdge servers.  
If the monitored temperature is above 35deg C enable iDRAC dynamic control and exit program.  
If monitored temperature is below 35deg C set fan control to manual and set fan speed to predetermined value.  
The tower servers T320, T420 &amp; T620 inlet temperature sensor is after the HDDs so temperature will be higher than the ambient temperature.

As you may have discovered, when you cross flash a Dell H310 raid controller to IT mode and as soon as the iDRAC detects that a drive has been inserted the fans spin up and get loud even when the ambient temperature is low, say 20deg C. This is as designed by Dell, which sucks.

#### Directly from page 30 PowerEdge T320 Technical Guide

<div class="markdown-heading" dir="auto" style="text-align: justify;">[<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/brezlord/iDRAC7_fan_control#directly-from-page-30-poweredge-t320-technical-guide)</div>*RAID Setup with PERC H310: A system configured as non-RAID has a higher noise level than a system configured as RAID. With non-RAID, the temperature of the hard disk drives is not monitored, which causes the fan speed to be higher to ensure sufficient cooling resulting in higher noise level*

There is no warranty provided and you use this scrip at your own risk. Please ensure you review the temperature set points for your use case to ensure your hard drives are kept at your desired temperature, change the set points as needed. I suggest that you trend you HDD temps to validate your setting and that you setup alarms in TrueNAS so that you get warnings if the HDD temperatures get to high.

I use this script on a Dell T320 running TrueNAS 12 and it work great. The server lives in my garage, which in Western Australia can get into the low 40s deg C.

You will need to create a data set for the script to reside in and make it executable, this assumes that you have a pool called tank and a dataset named fan\_control.

```
chmod +x /mnt/tank/fan_control/fan_control.sh

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="text-align: justify;"><div class="zeroclipboard-container"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></div></div>Make sure you set the below variables;

```
IDRAC_IP="IP address of iDRAC"
IDRAC_USER="user"
IDRAC_PASSWORD="passowrd"

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="text-align: justify;"><div class="zeroclipboard-container"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></div></div>There are multiple temperature sensors that you can choose to use. Just uncomment the one you would like the script to monitor. Not all temperature sensors are available in some models. You can run the following command from the shel to list all of the available temperature sensors on you generation 12 Dell sever.

```
ipmitool -I lanplus -H <ip address> -U <username> -P <password> sdr type temperature

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="text-align: justify;"><div class="zeroclipboard-container"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></div></div>Output from a Dell T320

```
Inlet Temp       | 04h | ok  |  7.1 | 23 degrees C
Temp             | 0Eh | ok  |  3.1 | 33 degrees C
Temp             | 0Fh | ns  |  3.2 | Disabled

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="text-align: justify;"><div class="zeroclipboard-container"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></div></div>Output from a Dell R720

```
Inlet Temp       | 04h | ok  |  7.1 | 20 degrees C
Exhaust Temp     | 01h | ok  |  7.1 | 31 degrees C
Temp             | 0Eh | ok  |  3.1 | 50 degrees C
Temp             | 0Fh | ok  |  3.2 | 45 degrees C

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="text-align: justify;"><div class="zeroclipboard-container"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></div></div>You will need to enable IPMI in the iDRAC and the user must have administrator privileges.

You can test the script by running ./fan\_control.sh from the scrips directory. If it is working you should get an output similar to this;

```
Date 04-09-2020 10:24:52
--> iDRAC IP Address: 192.168.40.140
--> Current Inlet Temp: 22
--> Temperature is below 35deg C
--> Disabled dynamic fan control

--> Setting fan speed to 20%

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="text-align: justify;"><div class="zeroclipboard-container"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></div></div>Once you have verified the script is working you can set it to run every 5 minutes via cron.

On TrueNAS Core this can be found under the Tasks menu --&gt; Cron Jobs.

On TrueNAS Scale this can be found under the System menu --&gt; Advanced Cron Jobs tab.

## Systemd

<div class="markdown-heading" dir="auto" style="text-align: justify;">[<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/brezlord/iDRAC7_fan_control#systemd)</div>## Running as a service

<div class="markdown-heading" dir="auto" style="text-align: justify;">[<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/brezlord/iDRAC7_fan_control#running-as-a-service)</div>Once the service is up and running, the temprature will be checked every `INTERVAL_SEC` seconds. Fan speed will change if the temprature has changed and warrants a speed change.

There is a delay before the temprature monitoring begins and is controlled by the variable `INITIAL_START_DELAY_SEC`. After this initial delay the time between checks is governed by the `INTERVAL_SEC` value.

When the server is shutdown/rebooted or started, the manual control is reset, this is to avoid any left over low fan speeds from previous power outage/powerdown/shutdown etc.

The files required to run the service are `fan_control_dyn.sh` `fancontrol.service`

Simply execute the following to get the service set up.

```
sudo cp fan_control_dyn.sh /usr/local/sbin/fan_control_dyn.sh
sudo chmod 755 /usr/local/sbin/fan_control_dyn.sh
sudo cp fancontrol.service /etc/systemd/system/fancontrol.service
sudo systemctl enable fancontrol.service
sudo systemctl start fancontrol.service

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="text-align: justify;"><div class="zeroclipboard-container"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></div></div>If you are using a location other than `/usr/local/sbin/fan_control_dyn.sh` then you'll need to modify the location in the `fancontrol.service` file as well

```
ExecStart=/MY_ABSOLUTE_PATH/fan_control_dyn.sh
```

</article></div></div></div></div></div></div></div></div></div></div>

# Dell PowerEdge T620 : How To Reduce FAN Speed with IPMI

Link: [https://std.rocks/dell\_t620\_fanspeed.html](https://std.rocks/dell_t620_fanspeed.html)

- *Last updated: Feb 8, 2022*

![Dell logo](https://std.rocks/images/dell_ipmi/002.svg)![Dell PowerEdge T620](https://std.rocks/images/dell_ipmi/004.png)

Recently I had to replace **Dell** certified mechanical **hard drives** with uncertified **SSD** drives on a **PowerEdge T620** server and was unpleasantly suprised to find that the fans were spinning noisly when inserted.

After quick research, I discovered that it was a known issue and that **Dell** wasn't able to offer any [solution](https://www.dell.com/community/Systems-Management-General/PowerEdge-T620-Fan-Speed-75-after-installing-SSD/td-p/5136373)…

Thanks to god/internet, I also found a post where a user has been able to control the fan speed with the **ipmitool**. So, big thanks to, [tatmde](https://www.reddit.com/r/homelab/comments/7xqb11/dell_fan_noise_control_silence_your_poweredge/).

I will simply post here what I have done in my situation.

⚠️ <span class="red">Be advised that changing the fan speed may result in overheating and damage to the components.</span> ⚠️

<section id="bkmrk-enable-ipmi-over-lan"><section>## Enable IPMI over LAN

To control the **FANs speed** via network we need to enable **IPMI over LAN** from **IDRAC**.

⚠️ Enable **IPMI over LAN** could be considered as security issue cause a remote station would have the capability to control the system's power state as well as being able to gather certain platform information. ⚠️

- Connect to your **iDRAC**, go to **iDRAC Settings** &gt; **Network** and enable **IPMI Over LAN** :

![Dell IDRAC | enable IPMI](https://std.rocks/images/dell_ipmi/001.png)</section><section>## ipmitool utility

### Installing on GNU/Linux

Install **ipmitool** software. This utility will allow us to communicate with the **IPMI**.

- From a **Debian** you could use this command to install **ipmitool** :

```
root@host:~# apt-get install ipmitool
```

### Using ipmitool

#### Check temperature

- Get **temperature** informations :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> sdr type temperature
Inlet Temp       | 04h | ok  |  7.1 | 21 degrees C
Temp             | 0Eh | ok  |  3.1 | 29 degrees C
Temp             | 0Fh | ok  |  3.2 | 35 degrees C
```

- We can see the corresponding values in **iDRAC** :

![Dell IDRAC | temperature probes](https://std.rocks/images/dell_ipmi/005.png)#### Control FAN Speed

- To disable **manual**/**static** fan control (auto mode) :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x01 0x01
```

- To enable **manual**/**static** fan control (manual mode) :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x01 0x00
```

- Get current **Fan** speed :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> sdr get Fan1 Fan2 | grep "Sensor Reading"
 Sensor Reading        : 1560 (+/- 120) RPM
 Sensor Reading        : 1560 (+/- 120) RPM
```

- Set **Fan** speed at **1320 RPM (16%)** :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x02 0xff 0x10
```

- Set **Fan** speed at **1560 RPM (20%)** :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x02 0xff 0x14
```

- Set **Fan** speed at **2040 RPM (30%)** :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x02 0xff 0x1e
```

- Set **Fan** speed at **3000 RPM (50%)** :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x02 0xff 0x32
```

- Set **Fan** speed at **5040 RPM (100%)** :

```
user@host:~$ ipmitool -I lanplus -H <iDRAC IP> -U <iDRAC user> -P <iDRAC password> raw 0x30 0x30 0x02 0xff 0x64
```

</section><section>## Create ipmi service

I got mad and decided to create a **service** that automatically regulates the **speed** of the **fans**.

I will detail here the different **steps** to set it up.

*Note : This script is adapted to my own configuration*

### Create system account

- For **security** reason I decided to run the service with **system account**. So let's create a **system** account :

```
root@host:~# useradd --system --no-create-home ipmiservice
```

- Create **log** folder :

```
root@host:~# mkdir /var/log/ipmiservice
```

```
root@host:~# chown -R ipmiservice /var/log/ipmiservice
```

### Create bash script

- Create **/usr/local/sbin/ipmiservice.sh** file :

```
root@host:~# touch /usr/local/sbin/ipmiservice.sh
```

```
root@host:~# chown ipmiservice: /usr/local/sbin/ipmiservice.sh
```

```
root@host:~# chmod +x /usr/local/sbin/ipmiservice.sh
```

- **/usr/local/sbin/ipmiservice.sh** :

```
#!/bin/bash 

#Stops script on errors, unset variables or failing pipeline 
set -euo pipefail

#variables definitions 
LOG=/var/log/ipmiservice/ipmi.log
IP="192.168.1.10"
PASSWORD='STp@ssw0rd!'

#functions 
##Set Fan Speed, accept one argument to set speed 
FanSpeed()
{
        ipmitool -I lanplus -H "$IP" -U root -P "$PASSWORD" raw 0x30 0x30 0x02 $1
}
##Get Temp values 
GetValues()
{
        #Get motherboard, cpu1 and cpu2 temperature 
        OUTPUT=$(/usr/bin/ipmitool -I lanplus -H "$IP" -U root -P "$PASSWORD" sdr type temperature | sed -e 's/Temp\(.*0Eh\)/Cpu1\1/' -e 's/Temp\(.*0Fh\)/Cpu2\1/')
        #Extract motherboard temp 
        SB=$(echo $OUTPUT| awk -F'|' '{ print $5 $9 $13 }' | awk '{ print $1 }')
        #Extract cpu1 temp 
        CPU1=$(echo $OUTPUT| awk -F'|' '{ print $5 $9 $13 }' | awk '{ print $5 }')
        #Extract cpu2 temp 
        CPU2=$(echo $OUTPUT| awk -F'|' '{ print $5 $9 $13 }' | awk '{ print $9 }')
        #motherboard+cpu1+cpu2 temp 
        LOG_TOTAL=$(($SB+$CPU1+$CPU2))
        #Get Fan1 speed 
        FANS=$(ipmitool -I lanplus -H "$IP" -U root -P "$PASSWORD" sensor reading Fan1 | awk '{ print $3 }')
}

#set manual mode 
ipmitool -I lanplus -H "$IP" -U root -P "$PASSWORD" raw 0x30 0x30 0x01 0x00

GetValues
echo "$(date "+%Y-%m-%d %H:%M:%S")" "MB : $SB | CPU1 : $CPU1 | CPU2 : $CPU2 | LOG_TOTAL : $LOG_TOTAL"

while :
do
        if [ "$LOG_TOTAL" -le 100 ] && [ $FANS -eq 1440 ]; then
                echo "$(date "+%Y-%m-%d %H:%M:%S")" "FAN speed : 1440, don't do anything" | tee -a "$LOG"
        elif [ "$LOG_TOTAL" -le 100 ] && [ $FANS -ne 1440 ]; then
                FanSpeed "0xff 0x12" #Set speed to 1440 
                echo "$(date "+%Y-%m-%d %H:%M:%S")" "Set speed to 1440" | tee -a "$LOG"
        elif [ "$LOG_TOTAL" -gt 100 ] && [ "$LOG_TOTAL" -le 105 ] && [ $FANS -ne 1560 ]; then
                FanSpeed "0xff 0x14" #Set speed to 1560 
                echo "$(date "+%Y-%m-%d %H:%M:%S")" "Set speed to 1560" | tee -a "$LOG"
        elif [ "$LOG_TOTAL" -gt 105 ] && [ "$LOG_TOTAL" -le 115 ] && [ $FANS -ne 2040 ]; then
                FanSpeed "0xff 0x1e" #Set speed to 2040 
                echo "$(date "+%Y-%m-%d %H:%M:%S")" "Set speed to 2040" | tee -a "$LOG"
        elif [ "$LOG_TOTAL" -gt 115 ] && [ "$LOG_TOTAL" -le 130 ] && [ $FANS -ne 3000 ]; then
                FanSpeed "0xff 0x32" #Set speed to 3000 
                echo "$(date "+%Y-%m-%d %H:%M:%S")" "Set speed to 3000" | tee -a "$LOG"
        elif [ "$LOG_TOTAL" -gt 130 ] && [ $FANS -ne 5040 ]; then
                FanSpeed "0xff 0x64" #Set speed to 5040 
                echo "$(date "+%Y-%m-%d %H:%M:%S")" "Set speed to 5040" | tee -a "$LOG"
        fi
        sleep 30s
        GetValues
        echo "$(date "+%Y-%m-%d %H:%M:%S")" "MB : $SB | CPU1 : $CPU1 | CPU2 : $CPU2 | TEMP TOTAL : $LOG_TOTAL" >> "$LOG"
        echo "$(date "+%Y-%m-%d %H:%M:%S")" "FAN speed : $FANS" | tee -a "$LOG"
done
```

### Create systemd service

Now we will create a **systemd** service.

- Create **systemd** service :

```
root@host:~# vim /etc/systemd/system/ipmi.service
```

```
[Unit]
Description=ipmi t620 fan control
After=network.target

[Service]
Type=simple
User=ipmiservice
Group=ipmiservice
WorkingDirectory=/usr/local/sbin/
ExecStart=/usr/local/sbin/ipmiservice.sh
Restart=always

[Install]
WantedBy=multi-user.target
```

- Enable **systemd** service :

```
root@host:~# systemctl enable ipmi.service
```

- Start **systemd** service :

```
root@host:~# systemctl start ipmi.service
```

- Check **logs** output :

```
root@host:~# tail -f /var/log/ipmiservice/ipmi.log
2021-05-09 15:16:57 FAN speed : 1440, don't do anything
2021-05-09 15:17:32 MB : 22 | CPU1 : 37 | CPU2 : 40 | TEMP TOTAL : 99
2021-05-09 15:17:32 FAN speed : 1440, don't do anything
2021-05-09 15:18:04 MB : 22 | CPU1 : 38 | CPU2 : 40 | TEMP TOTAL : 100
2021-05-09 15:18:04 FAN speed : 1440, don't do anything
2021-05-09 15:18:36 MB : 22 | CPU1 : 39 | CPU2 : 40 | TEMP TOTAL : 101
2021-05-09 15:18:36 FAN speed : 1440, don't do anything
2021-05-09 15:18:37 Set speed to 1560
2021-05-09 15:19:09 MB : 22 | CPU1 : 38 | CPU2 : 40 | TEMP TOTAL : 100
2021-05-09 15:19:09 FAN speed : 1560
```

</section></section>

# dell-idrac-6-fan-speed-control-service

Link: [hippyod/dell-idrac-6-or-7-fan-speed-control-service: Simple service to monitor ambient temp of Dell PowerEdge R610 or R720 (iDRAC 6 or 7) and set fan speed manually and appropiately via IPMI (github.com)](https://github.com/hippyod/dell-idrac-6-or-7-fan-speed-control-service)

git clone [https://github.com/hippyod/dell-idrac-6-or-7-fan-speed-control-service.git](https://github.com/hippyod/dell-idrac-6-or-7-fan-speed-control-service.git)

Simple service to monitor ambient temp of Dell PowerEdge R610 or R720 (iDRAC 6 &amp; 7) and set fan speed manually and appropiately via IPMI.

This service will start on boot, monitor the average core CPU temperature every 30s, and adjust fan speed over LAN via the ipmitool based on a rolling average of the average CPU temperatures every two minutes; i.e. `${AVG_CPU_TEMPS_ARRAY_SUM}/4`

**\[NOTE: if you don't understand the instructions, that's what internet search is for.\]**

1. Make sure ipmitool and lm\_sensors is installed; e.g.  
    `sudo dnf install ipmitool lm_sensors`
2. Make sure iDRAC is enabled over lan from the host OS
3. Get the IP address of iDRAC from the LCD menus at the front of the screen, or during boot
4. Enter the iDRAC IP address, username, and password in fan-speed-control.sh 
    1. We suggest making the IP address static
    2. We suggest changing the root/calvin default username and password on iDRAC first if you haven't already done so
    3. If the fan isn't under control by the time your login screen comes up, check the IP address first
5. `sudo sensors-detect`
    1. Hit enter all the way through until it asks you to write out the results of the probe unless you know what you're doing
6. `sudo cp fan-speed-control.sh /usr/local/bin/`
7. `sudo cp fan-speed-control.service /usr/lib/systemd/system/`
8. `sudo systemctl enable /usr/lib/systemd/system/fan-speed-control.service`
9. `sudo systemctl start fan-speed-control.service`

The service will start and run every 5 seconds until a proper temperature average is calculated, and then every 30 seconds (default), adjusting the fan speed appropiately as the average core CPU temperature rises. Minimum rotation is set to 15%. Once the temp rises past 90% of the high CPU temperature as reported by the sensors command, it will return control to iDRAC until the core CPU average temperature falls back under 90% of the reported high. *Please read through the script to understand the default settings, and to adjust the IP address of your iDRAC.*

This stopped my machine (first a Dell Poweredge R610, and later a R720) from sounding like a jet engine, but it still sounds like a loud, '90's era desktop with this. Still much better and much more tolerable. Expect the fan speed to adjust somewhat regularly depending on usage and sensor sensistivity, and adjust the way the service works to your heart's desire, but see warning and disclaimer below. Occasionally the sensors may miss a beat, which will cause the script to fail. The script is designed to restart the service until fixed.

### DISCLAIMER

<div class="markdown-heading" dir="auto" id="bkmrk-" style="text-align: justify;">[<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/hippyod/dell-idrac-6-or-7-fan-speed-control-service#disclaimer)</div>#### USE AT YOUR OWN RISK!! No responsibility taken for any damage caused to your equipment as result of this script.

<div class="markdown-heading" dir="auto" id="bkmrk--2" style="text-align: justify;">[<svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/hippyod/dell-idrac-6-or-7-fan-speed-control-service#use-at-your-own-risk--no-responsibility-taken-for-any-damage-caused-to-your-equipment-as-result-of-this-script)</div>Original script before modification can be found and freely obtained from [NoLooseEnds](https://github.com/NoLooseEnds/Scripts)

# REDUCE THE FAN NOISE OF THE DELL R720XD (PLUS OTHER 12TH GEN SERVERS) WITH IPMI

Link: [https://blog.filegarden.net/2020/10/06/reduce-the-fan-noise-of-the-dell-r720xd-plus-other-12th-gen-servers-with-ipmi/](https://blog.filegarden.net/2020/10/06/reduce-the-fan-noise-of-the-dell-r720xd-plus-other-12th-gen-servers-with-ipmi/)

<header class="entry-header" id="bkmrk-%C2%A0october-6%2C-2020%C2%A0%C2%A0sp">#####  [<time class="entry-date" datetime="2020-10-06T06:11:08-05:00">October 6, 2020 </time>](https://blog.filegarden.net/2020/10/06/reduce-the-fan-noise-of-the-dell-r720xd-plus-other-12th-gen-servers-with-ipmi/ "6:11 am")<span class="byline"> <span class="author vcard">[Spencer LeB](https://blog.filegarden.net/author/sleblanc/ "View all posts by Spencer LeB")</span></span>

</header>## Introduction

In this guide I will be showing you how you can reduce the fan noise of the Dell Powerdge r720XD. This will probably work on the r720 and other 12th gen dell servers. To do this, we will be using IPMI to manually override the fan speed.

### Requirements

In order to follow this guide, you will need the following:

<div class="entry-content" id="bkmrk-a-linux-machine-%28or-" style="text-align: justify;">- A Linux machine (or anything with `ipmitool` available)
- 12th gen Dell Poweredge Server with iDRAC 7

</div>### Disclaimer

Make sure you keep an eye out on the temperatures of the server or else it will overheat and could cause hardware damage. If you brick your server, thats your problem!

## Getting setup

### Enabling IPMI

The first thing you will need to do is connect to the iDRAC interface on your dell server. You can do so by entering the IP address of the DRAC in a browser. If you are unsure on the IP address, you can find it by powering on the server, pressing F2 to enter the system setup, go to the DRAC section and find the IP somewhere in there. You then need to login. the default credentials are username `root` and password `calvin`.

Once logged in, you will need to go to `Overview -> iDRAC Settings -> Network` and then scroll to the IMPI Settings. You will need to make sure this is enabled.

<div class="entry-content" id="bkmrk-" style="text-align: justify;"><figure class="wp-block-image">![](https://back2basics.io/wp-content/uploads/2020/05/enable_ipmi.png)</figure></div>### Installing IPMI tool

First of all, check if you already have `ipmitool` installed. If you do, you can skip this step. If not, lets install it.

If you are on a debian based machine, you can use apt to install it. First, lets update our apt repo.

```
sudo apt update
```

Now lets install it

```
sudo apt install ipmitool
```

## Controlling some fans

### Enabling manual fan control

Once IPMI has been enabled, we now need to enable remote fan control. We can do so with this command. Make sure to replace the IP, username and password for your system.

```
ipmitool -I lanplus -H SERVERS_IP_HERE -U IDRAC_USERNAME -P 'IDRAC_PASSWORD_HERE' raw 0x30 0x30 0x01 0x00
```

### Setting the speed

You may not have noticied a difference in the sound yet but dont worry, we can now override the current fan speed with our own. Prepare yourself! Use this command to set the fan speed to 20%.

```
ipmitool -I lanplus -H SERVERS_IP_HERE -U IDRAC_USERNAME -P 'IDRAC_PASSWORD_HERE' raw 0x30 0x30 0x02 0xff 0x14
```

If you cant hear the difference or you would like to check the current speed, you can do so via the iDRAC system. go to `Overview -> Hardware -> Fans`.

<div class="entry-content" id="bkmrk--1" style="text-align: justify;"><figure class="wp-block-image">![](https://back2basics.io/wp-content/uploads/2020/05/fan_speeds.png)</figure></div>### Custom speeds

If you want to change the speed to something other than 20%, you just need to change the value at the end from `0x14` to whatever you’d like. `0x14` is the hexadecimal value for 20. Here are some premade values for you. If your not sure how to work out hexadecimal values, check out this [website](https://www.rapidtables.com/convert/number/decimal-to-hex.html).

### Set fan speed to 25%

```
ipmitool -I lanplus -H SERVERS_IP_HERE -U IDRAC_USERNAME -P 'IDRAC_PASSWORD_HERE' raw 0x30 0x30 0x02 0xff 0x19
```

### Set fan speed to 30%

```
ipmitool -I lanplus -H SERVERS_IP_HERE -U IDRAC_USERNAME -P 'IDRAC_PASSWORD_HERE' raw 0x30 0x30 0x02 0xff 0x1E
```

### Set fan speed to 50%

```
ipmitool -I lanplus -H SERVERS_IP_HERE -U IDRAC_USERNAME -P 'IDRAC_PASSWORD_HERE' raw 0x30 0x30 0x02 0xff 0x32
```

### Set fan speed to 60%

```
ipmitool -I lanplus -H SERVERS_IP_HERE -U IDRAC_USERNAME -P 'IDRAC_PASSWORD_HERE' raw 0x30 0x30 0x02 0xff 0x3C
```

### Set fan speed to 100%

```
ipmitool -I lanplus -H SERVERS_IP_HERE -U IDRAC_USERNAME -P 'IDRAC_PASSWORD_HERE' raw 0x30 0x30 0x02 0xff 0x64
```

Original Author  
[https://back2basics.io/2020/05/reduce-the-fan-noise-of-the-dell-r720xd-plus-other-12th-gen-servers-with-ipmi/](https://back2basics.io/2020/05/reduce-the-fan-noise-of-the-dell-r720xd-plus-other-12th-gen-servers-with-ipmi/)

<footer class="entry-footer" id="bkmrk--2">---

<div class="row"><div class="col-md-6 cattegories" style="text-align: justify;">  
</div></div></footer>