R710 (and probably other 11th Gen Dell servers) fan controller shell script.

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Blue)(Fusion

Active Member
Mar 1, 2017
151
56
28
Chicago
I just found out two days ago that there was a way to send raw hex code to the IPMI from another user pointing it out to me on this subreddit. I spent the next two days putting together a shell script to manage my R710 fan with multiple levels of fan speeds, user configuration CPU and HDD temp settings, and poll times. I'm pretty happy with the result.

The down side is it is only working on a bare metal OS, meaning if you're using ESXi, it probably won't work.

Requirements are:
  • ipmitool
  • MegaCLI (if a MegaRAID-based controller is in use)
  • smartmontools (if MegaCLI is unavailable or no MegaRAID-based controller in use)
  • lm_sensors
  • coretemp kernel module
I've been running it better part of a day with many tests with kernel compilations and I'm pretty sure the bugs are squashed. At this point, I'm definitely welcome to feedback, but I prefer the constructive type. I am no professional programmer. It is merely a hobby so do not expect perfection.

If you have an R610 or other 11th Generation Dell server with iDRAC, please let me know if this works for you or what tweaks need to be made.

The script can be downloaded from: richgannon.net/projects/dellfanspeed

To run it, simply save it to a location of your choice, and run it with sh r710_fan_controller.sh. You can run it in the background with screen or you can use the init system of your choice to create a way to background it as a kind of daemon script.
 

Blue)(Fusion

Active Member
Mar 1, 2017
151
56
28
Chicago
Thanks for the compliment. Glad you find it useful. If you find fan speed values that you like with some trial and error, and can document the hex code to various RPMs and what works for your T710, I'll add that info for others to use, too.


I also forgot to update this thread. It's much easier to run it as a service. On Proxmox, I added the following file.


/etc/systemd/system/multi-user.target.wants/fan-controller.service :
Code:
[Unit]
Description=Dell R510/R610/R710 IPMI Fan Controller
After=multi-user.target

[Service]
ExecStart=/usr/local/dell_fan_controller/fan_controller.sh

[Install]
WantedBy=multi-user.target

Then simply
$ systemctl enable fan-controller
$systemctl start fan-controller
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,394
512
113
Missed this when you posted it but I see you're using either megacli or smartctl commands to get the temps. I don't know if you're aware of it or not, but you can get extremely fast temp readouts if you run hddtemp as a daemon; you can then listen direct to the local socket and get the info directly. As well as being quick, it's got the added bonus of automatically ignoring any drives that don't have a temperature sensor. It comes out in a slightly awkward pipe-separated format but nothing a bit of awk-fu can't handle.

Here's what I use for my HDD temperature monitoring:
Code:
effrafax@wug:~$ nc localhost 7634|sed 's/^|//'|sed 's/|$//'|awk -F '[|][|]' -v OFS="\n" '{$1=$1}1'
/dev/sda|TOSHIBA HDWN160|35|C
/dev/sdb|TOSHIBA HDWN160|38|C
/dev/sdc|TOSHIBA HDWN160|37|C
/dev/sdd|TOSHIBA HDWN160|37|C
/dev/sde|TOSHIBA HDWN160|36|C
You can then loop through each line and extract any info you want for any field - I use that to run another script that goes off and extracts some further info and stores in an RRD database.
 

Blue)(Fusion

Active Member
Mar 1, 2017
151
56
28
Chicago
I TOTALLY forgot about hddtemp. I used to use it all the time on my laptop and desktops, too. I'll be adding that support in there, too. Keep in mind, I don't believe hddtemp works with RAID controllers, though, does it?
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,394
512
113
I've not used a RAID controller in years I'm afraid (apart from at work, and those ones have proprietary monitor things and of course no-ones gives a toss about noise in the data centre) so I've never tested it myself. But stands to reason that it wouldn't work on most RAID cards, no, since they usually break the normal command protocols.
 
Last edited:

Blue)(Fusion

Active Member
Mar 1, 2017
151
56
28
Chicago
So you see, since this script is aimed primarily towards the [T|R][2-8]10 series, they almost all use RAID cards by default (Perc6/i, H200, H700). Only going outside the usual options does one have an HBA card installed in these devices, as far as I am aware. Not to say, this shouldn't include them. Many users use these as ZFS boxes with HBA mode cards. Myself, I am looking for an R510 12-bay to run in HBA mode for Btrfs + Glusterfs.
 

tarzanbigcity

New Member
Mar 19, 2017
3
0
3
I stuck in an LSI 9201-8i in IT mode, because I want to run FreeNAS off of it. Right now the script is returning a "sensors: not found" reading. I dont have any drive hooked up yet. Any chance it would support these cards, they are very common now? Many people are even crossflashing their Dell H200 to be a LSI-9211-8i. FreeNAS works best when drives are presented as simple disks.
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,394
512
113
You likely don't have lm-sensors installed/configured which is what the script uses to ascertain temperatures from the coretemp module - although these can be extracted from sysfs directly rather than using lm-sensors.
 

Blue)(Fusion

Active Member
Mar 1, 2017
151
56
28
Chicago
Here's a good guide on FreeNAS and temperature monitoring:
CPU Temp on GIGABYTE M/B

Perhaps that may help out. I'm not at all familiar with FreeNAS so I'm of little use giving guidance.

Regarding the LSI RAID card in IT mode, change the MEGARAID=1 to MEGARAID=0 and it will use smartmontools to grab the temperature. You will need smartmontools package installed. I can't imagine FreeNAS won't support this hard drive monitoring package.
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,394
512
113
Aye I also missed the FreeNAS bit completely and was thinking with my linux hat on. The original script is linux-centric as well with the only cross-platform stuff being the smartctl/smartmontools commands - other bits of the script would need to be rewritten to work nicely with BSD/FreeNAS monitoring mechanisms.
 

tarzanbigcity

New Member
Mar 19, 2017
3
0
3
After further research the RPM values are a bit different on the T710 because the fans are larger. Here is a basic grid of the raw hex applied and the resulting RPM value of the fans. Perhaps you can update your script for anyone with a tower pc. I find these to be the most tolerable while sitting next to me in my office.

Enable manual/static fan speed
ipmitool raw 0x30 0x30 0x01 0x00

(1680 RPM)
ipmitool raw 0x30 0x30 0x02 0xff 0x08

(1800 RPM)
ipmitool raw 0x30 0x30 0x02 0xff 0x0c

(2040 RPM)
ipmitool raw 0x30 0x30 0x02 0xff 0x10

(2160 RPM)
ipmitool raw 0x30 0x30 0x02 0xff 0x14

(2280 RPM)
ipmitool raw 0x30 0x30 0x02 0xff 0x18
 

AK galaxis

New Member
Jan 9, 2019
1
0
1
This worked on my dell poweredge r410 running centos 7 glad i gave this a shot. Made my machine extremely quiet compared to how it was, totally worth scrapping esxi for quiet fans.
 
Last edited:

ViciousXUSMC

Active Member
Nov 27, 2016
271
146
43
41
I just use IPMITool on Linux and Smart for temps.
Been doing this for a couple of years.

Setup as a crontab so that it runs at startup automatically and some Plink scripts to integrate it into a GUI.

Could have swore I made a tutorial video for it once upon a time, maybe I just wrote it up and posted it somewhere instead.