Updated script and readme
- Modified the "get temperature" IPMI command to work with both R610 and R710 - Added better explanation to script - Added CRON info to readme
This commit is contained in:
parent
076ba87118
commit
28e477294b
2 changed files with 40 additions and 14 deletions
|
|
@ -1,16 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ----------------------------------------------------------------------------------
|
||||
# Script for checking the temperature reported by the ambient temperature sensor,
|
||||
# and if deemed to high send the raw IPMI command to enable dynamic fan control.
|
||||
#
|
||||
# Requires ipmitool – apt-get install ipmitool
|
||||
# Tested on ubuntu
|
||||
# Tested on Ubuntu 17.04
|
||||
# ----------------------------------------------------------------------------------
|
||||
|
||||
# IPMI
|
||||
|
||||
# IPMI DEFAULT R710 SETTINGS
|
||||
# Modify to suit your needs.
|
||||
IPMIHOST=192.168.0.120
|
||||
IPMIUSER=root
|
||||
IPMIPW=calvin
|
||||
|
||||
# TEMPERATURE
|
||||
# Change this to the temperature in celcius you are comfortable with.
|
||||
# If it goes above it will send raw IPMI command to enable dynamic fan control
|
||||
MAXTEMP=27
|
||||
TEMP=$(ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW sdr type temperature |grep Ambient |grep -Po '\d{2}')
|
||||
|
||||
# This variable sends a IPMI command to get the temperature, and outputs it as two digits.
|
||||
# Do not edit unless you know what you do.
|
||||
TEMP=$(ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW sdr type temperature |grep Ambient |grep degrees |grep -Po '\d{2}' | tail -1)
|
||||
|
||||
|
||||
if [[ $TEMP > $MAXTEMP ]];
|
||||
|
|
@ -21,4 +33,4 @@ if [[ $TEMP > $MAXTEMP ]];
|
|||
else
|
||||
printf "Temperature is OK ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP
|
||||
echo "Temperature is OK ($TEMP C)"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1,6 +1,17 @@
|
|||
# Howto: Setting the fan speed of the Dell R610/R710
|
||||
Inspired by [this Reddit post](https://www.reddit.com/r/homelab/comments/72qust/r510_noise/dnkofsv/) by /u/whitekidney
|
||||
# Safety BASH script
|
||||
I made a BASH script to check the temperature, and if it's higher than XX (27 degrees C in my case) it sends a raw command to restore automatic fan control.
|
||||
|
||||
I'm running this on an Ubuntu VM on ESXi (on the R710 box), but it should be able to run as long as you have ipmitools. It could be you need to modify the logging, to make it work with whatever your system use.
|
||||
|
||||
I run the script via CRON every 5 minutes from my Ubuntu 17.04 VM running on ESXi.
|
||||
|
||||
`*/5 * * * * /bin/bash /path/to/script/R710-IPMITemp.sh >/dev/null 2>&1`
|
||||
|
||||
The Scripts [Reddit thread](https://www.reddit.com/r/homelab/comments/779cha/manual_fan_control_on_r610r710_including_script/)
|
||||
|
||||
*****
|
||||
|
||||
# Howto: Setting the fan speed of the Dell R610/R710
|
||||
|
||||
1. Enable IPMI in iDrac
|
||||
2. Install ipmitool on linux, win or mac os
|
||||
|
|
@ -15,12 +26,16 @@ Inspired by [this Reddit post](https://www.reddit.com/r/homelab/comments/72qust/
|
|||
|
||||
**Set fan speed:**
|
||||
|
||||
(Use i.e http://www.hexadecimaldictionary.com/hexadecimal/0x14/ to calculate speed)
|
||||
(Use i.e http://www.hexadecimaldictionary.com/hexadecimal/0x14/ to calculate speed from decimal to hex)
|
||||
|
||||
*3000 RPM*: `raw 0x30 0x30 0x02 0xff 0x10`
|
||||
|
||||
*2160 RPM*: `raw 0x30 0x30 0x02 0xff 0x0a`
|
||||
|
||||
*2160 RPM*: `raw 0x30 0x30 0x02 0xff 0x09`
|
||||
|
||||
_Note: The RPM may differ from model to model_
|
||||
|
||||
|
||||
**Disable / Return to automatic fan control:**
|
||||
|
||||
|
|
@ -36,15 +51,14 @@ Inspired by [this Reddit post](https://www.reddit.com/r/homelab/comments/72qust/
|
|||
`ipmitool -I lanplus -H 192.168.0.120 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x10`
|
||||
|
||||
|
||||
# Safety BASH script
|
||||
I made a BASH script to check the temperature, and if it's higher than XX (27 degrees C in my case) it sends a raw command to restore automatic fan control.
|
||||
*****
|
||||
|
||||
The Scripts [Reddit thread](https://www.reddit.com/r/homelab/comments/779cha/manual_fan_control_on_r610r710_including_script/)
|
||||
**Disclaimer**
|
||||
|
||||
I'm by no means good at IPMI, BASH scripting or regex, etc. but it seems to work fine for me.
|
||||
|
||||
TLDR; I take _NO_ responsibility if you mess up anything.
|
||||
|
||||
*****
|
||||
**Disclaimer:**
|
||||
|
||||
I'm by no means good at bash scripting or regex, etc. but it seems to work fine for me.
|
||||
|
||||
TLDR; I take _NO_ responsibility if you mess up anything.
|
||||
All of this was inspired by [this Reddit post](https://www.reddit.com/r/homelab/comments/72qust/r510_noise/dnkofsv/) by /u/whitekidney
|
||||
Loading…
Reference in a new issue