How to silence your Dell PowerEdge server

How to silence your Dell PowerEdge server

This post will cover how to silence your Dell PowerEdge R330 server using IPMI. It should work onmost PowerEdge servers as the concept would be the same.  I have only tested this so far on my personal Dell R330 and it works great for me. It works by checking the temperature using IPMI and then based on that temperature then it changes the system fan speed. You may need to modify this to work on your hardware but only do so AT YOUR OWN RISK.

IPMItool for Windows is part of this download from Dell

Anyone who knows servers, knows that 1U servers are typically the loudest of servers due to the thin height of the case that the fans have to push enough CFM through the chassis to remove the heat from the processor and other components. servers are built to withstand some environmental abuse and neglect to the default settings for airflow are more than safe for most environments. But at home where you do care about the noise it is possible to lower the fan speeds using the built in hardware management interface which is what I’ve done here.

👍 SPX Labs video – https://www.youtube.com/watch?v=FWTas5LTMYM 

👍 SPX Labs blog – https://www.spxlabs.com/blog/2019/3/16/silence-your-dell-poweredge-server 

IPMItool for Windows is part of this download from Dell:

➡️https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=9ngfj 

0:00 Beginning

0:21 Explanation of what I’m doing

1:20 Show how loud the server is before and after

2:21 Creating a PowerShell script to control the fan settings via IPMI

UPDATE:

It looks like anything newer than iDRAC9 3.3x won’t allow fan control anymore.

➡️https://www.dell.com/community/Systems-Management-General/iDRAC9-Unable-to-set-manual-fan-response-after-iDrac-v3-34-34-34/td-p/7339941  

Link to powershell Script Tutorial:

➡️ https://1337admin.org/tutorials/how-to-silence-your-dell-poweredge-server/ 

➡️Subscribe To My Channel and See More Shiny Tech Things 

https://www.youtube.com/c/ShinyTechThings?sub_confirmation=1 

💵 Direct Donation: https://paypal.me/ShinyTechThings 

💵 Join Honey using our affiliate link at https://joinhoney.com/ref/561ezi

Follow me on Twitter: 

➡️

https://twitter.com/Shiny_Tech 

Follow me on Reddit:

➡️ 

https://www.reddit.com/r/ShinyTechThings 

If you would like to help support my channel then please consider using a affiliate link when purchasing any items or becoming a patreon:

➡️ https://www.patreon.com/ShinyTechThings 

➡️WindScribe VPN affiliate link

https://windscribe.com/?affid=6njmsc2q 

#######################################################################################R330FanControl.ps1###

# First and foremost, I cannot recommend using this or any script to alter system cooling or kill processes as it can cause damage or break stuff!
# I accept no liability for anything, USE AT YOUR OWN RISK!
# CAUTION this sctipt could possibly damage things especially data but if your server is already cooking itself it should help lower the temperatures but know if it kills something as it’s writing data consider it lost!
# READ AND UNDERSTAND WHAT IT IS DOING SO YOU CAN MODIFY AS NEEDED

# REQUIRES ipmitools “OM-BMC-Dell-Web-WIN-9.1.0-2757_A00.exe” is what I downloaded from Dell at: https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=9ngfj
# Add to the system variable path the installation folder which might be different from “C:\Program Files (x86)\Dell\SysMgt\bmc” where the ipmitool.exe is located.

# Setup
# create a scheduled task to run on startup that calls powershell.exe with the following parameter(remove the # before the -file part):
# -file “C:\Scripts\PS\R330FanControl\R330FanControl.ps1″
# Set to run with highest privledges and without being logged in, be sure it’s enabled and reboot. Then verify it’s running in the background.

#Variables###################################

# Set iDRAC IP
$iDRAC=”XXX.XXX.XXX.XXX”
# Set iDRAC Credentials
$usr=”root”
$pw=”calvin”

#Reset counter
$i=0

# Enables fan control via ipmitool
$FanControlEnable = “ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x01 0x00”

# DISABLE FAN CONTROL if you ever want to do so.
# ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x01 0x01

# Sets fan speed to % defined in $FanControl variable
# hex conversion tables http://cactus.io/resources/toolbox/decimal-binary-octal-hexadecimal-conversion
$FanControl20 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x14”)
$FanControl30 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x1e”)
$FanControl40 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x28”)
$FanControl50 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x32”)
$FanControl60 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x3c”)
$FanControl70 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x46”)
$FanControl80 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x50”)
$FanControl90 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x5a”)
$FanControl100 = (“ipmitool -I lanplus -H $iDRAC -U $usr -P $pw raw 0x30 0x30 0x02 0xff 0x64”)

#######################
$KillHighCPU = “C:\Scripts\PS\R330FanControl\Kill_CPU_hog.ps1”
#######################
# Retrieves temperatures:
# ipmitool -H $iDRAC -U $usr -P $pw -I lanplus sdr elist | findstr “Temp” | findstr “0Eh”

#############################################

Invoke-Expression -Command $FanControlEnable

While($true)
{
$i++
$cpuTemp = (ipmitool -H $iDRAC -U $usr -P $pw -I lanplus sdr elist | findstr “Temp” | findstr “0Eh” | %{$_.split(‘|’)[4]})

# Extract the digits of the temperature
$cpuTempDigits=$cpuTemp.Substring(0,3)

# Displays the temerature as the script is running
$cpuTempDigits

# Switch logic to change the fan based on operating temperature reported via ipmi. (I noticed this displays different temperatures thatn Speccy, not sure which is more accurate)
# My processor is a e3-1220 V6 which from what I could find has a maximum temperature of ~70°C
# The last temperature from 67-999C will invoke another script tha twill find and kill the process usign the most CPU resources, THIS COULD POTENTIALLY BE DANGEROUS!
switch ($cpuTempDigits) {
{1..49 -contains $_}{write-host “Fan set to 20%” ; Invoke-Expression -Command $FanControl20}
{50..52 -contains $_}{write-host “Fan set to 30%” ;Invoke-Expression -Command $FanControl30}
{53..54 -contains $_}{write-host “Fan set to 40%” ;Invoke-Expression -Command $FanControl40}
{55..56 -contains $_}{write-host “Fan set to 50%” ;Invoke-Expression -Command $FanControl50}
{57..58 -contains $_}{write-host “Fan set to 60%” ;Invoke-Expression -Command $FanControl60}
{59..60 -contains $_}{write-host “Fan set to 70%” ;Invoke-Expression -Command $FanControl70}
{61..62 -contains $_}{write-host “Fan set to 80%” ;Invoke-Expression -Command $FanControl80}
{63..64 -contains $_}{write-host “Fan set to 90%” ;Invoke-Expression -Command $FanControl90}
{65..66 -contains $_}{write-host “Fan set to 100%” ;Invoke-Expression -Command $FanControl100}
{67..999 -contains $_}{write-host “Killing processes to cool down!” ;Invoke-Expression -Command $KillHighCPU}

}
# IF YOU ARE MANUALLY RUNNING THIS SCRIPT you can uncomment out the line below to watch it display the number of times it’s checking temps and setting the fan speeds.
#Write-Host “Action has run $i times at” (date)
}

#################################################################################

Now here’s the  script that kills the task using the most amount of CPU:

#################################################################################

### Kill_CPU_Hog.ps1 ###
# First and foremost, I cannot recommend using this or any script to alter system cooling or kill processes as it can cause damage or break stuff!
# I accept no liability for anything, USE AT YOUR OWN RISK!
# CAUTION this sctipt could possibly damage things especially data but if your server is already cooking itself it should help lower the temperatures but know if it kills something as it’s writing data consider it lost!
# This is the second script that finds what is taking the most CPU usage and kills that process. This script should not be run on it’s own.
# This script is invoked by the R330FanControl script that only calls it if the CPU temperature is running too hot and the fans are spinning as fast as they can to keep it cool and it’s still not enough.
# Then this script is invoked to kill whatever is potentially causing the server to overheat.
# https://www.youtube.com/c/ShinyTechThings

#Get all cores, which includes virtual cores from hyperthreading
$cores = (Get-WmiObject Win32_ComputerSystem).NumberOfLogicalProcessors
#Get all process with there ID’s, excluding processes you can’t stop.
$processes = ((Get-Counter “\Process(*)\ID Process”).CounterSamples).where({$_.InstanceName -notin “idle”,”_total”,”system”})
#Get cpu time for all processes
$cputime = $processes.Path.Replace(“id process”, “% Processor Time”) | get-counter | select -ExpandProperty CounterSamples
#Get the processes with above 14% utilisation.
$highUsage = $cputime.where({[Math]::round($_.CookedValue / $cores,2) -gt 14})
# For each high usage process, grab it’s process ID from the processes list, by matching on the relevant part of the path
$highUsage |%{
$path = $_.Path
$id = $processes.where({$_.Path -like “*$($path.Split(‘(‘)[1].Split(‘)’)[0])*”}) | select -ExpandProperty CookedValue
Stop-Process -Id $id -Force -ErrorAction SilentlyContinue
}

#################################################################################

Posted in Hyper-V, PowerShell, Scripting, Tutorials, Windows Server.

4 Comments

  1. Great article. Would it be possible and/or effective to adjust the “Maximum Processor State” as opposed to killing CPU hogging processes, to bring down system temps? I see in the Windows Power Options, under advanced settings, that you can adjust both the minimum and maximum CPU%, under Processor power management.

    • Depends. If you don’t kill the process and it’s generating more heat than what can be cooled you risk damaging something. Since mine is just a home lab I just kill the process by design, but the server has never hit that high of a temperature yet with the temp switches I set so it’s more of a secondary safety switch.

  2. Hello and thank you for making this tutorial. I have been trying to quite down my home lab R720 for a long time. I keep running into the same issue.
    That is PS does not recognize ipmitool. I did confirm the application is in “C:\Program Files (x86)\Dell\SysMgt\bmc” directory.
    Now I have to admit I’m now PowerShell wiz so any help would be greatly appreciated.
    Regards.

    • You need to add as a system variable after you install the tool and pointed to the installation directory. I made a YouTube video on this however YouTube actually removed my channel although I suspect it was scalpers targeting my channel because I was showing people how to find computer parts and consoles that scalpers are snatching up. If you or anyone you know has a Twitter account please Consider retweeting my post and hopefully I will get my account restored soon. Anyways please try adding as a system variable and then open a new command window and just try running ipmitool And see if it now runs the tool. If so then you should be able to edit the powershell script as needed. Here’s my twitter post: https://twitter.com/shiny_tech/status/1379926811824455680

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.