From 5a828b496f94c04667fae9065a09385d91d55cbc Mon Sep 17 00:00:00 2001 From: NoLooseEnds Date: Thu, 19 Oct 2017 10:10:10 +0200 Subject: [PATCH] Initial commit Added readme files and my R710 IPMI temperature monitor script. --- .gitignore | 1 + R710-IPMI-TEMP/R710-IPMITemp.sh | 24 ++++++++++++++++++ R710-IPMI-TEMP/readme.md | 45 +++++++++++++++++++++++++++++++++ readme.md | 5 ++++ 4 files changed, 75 insertions(+) create mode 100644 .gitignore create mode 100755 R710-IPMI-TEMP/R710-IPMITemp.sh create mode 100644 R710-IPMI-TEMP/readme.md create mode 100644 readme.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/R710-IPMI-TEMP/R710-IPMITemp.sh b/R710-IPMI-TEMP/R710-IPMITemp.sh new file mode 100755 index 0000000..8e20ebf --- /dev/null +++ b/R710-IPMI-TEMP/R710-IPMITemp.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Requires ipmitool – apt-get install ipmitool +# Tested on ubuntu + +# IPMI +IPMIHOST=192.168.0.120 +IPMIUSER=root +IPMIPW=calvin + +# TEMPERATURE +MAXTEMP=27 +TEMP=$(ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW sdr type temperature |grep Ambient |grep -Po '\d{2}') + + +if [[ $TEMP > $MAXTEMP ]]; + then + printf "Temperature is too high! ($TEMP C) Activating dynamic fan control!" | systemd-cat -t R710-IPMI-TEMP + echo "Temperature is too high! ($TEMP C) Activating dynamic fan control!" + ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW raw 0x30 0x30 0x01 0x01 + else + printf "Temperature is OK ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP + echo "Temperature is OK ($TEMP C)" +fi diff --git a/R710-IPMI-TEMP/readme.md b/R710-IPMI-TEMP/readme.md new file mode 100644 index 0000000..1769967 --- /dev/null +++ b/R710-IPMI-TEMP/readme.md @@ -0,0 +1,45 @@ +# 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 + + +1. Enable IPMI in iDrac +2. Install ipmitool on linux, win or mac os +3. Run the following command to issue IPMI commands `ipmitool -I lanplus -H -U root -P ` + +**Enable manual/static fan speed:** + +`raw 0x30 0x30 0x01 0x00` + + +**Set fan speed:** + +(Use i.e http://www.hexadecimaldictionary.com/hexadecimal/0x14/ to calculate speed) + +*3000 RPM*: `raw 0x30 0x30 0x02 0xff 0x10` + +*2160 RPM*: `raw 0x30 0x30 0x02 0xff 0x0a` + + +**Disable / Return to automatic fan control:** + +`raw 0x30 0x30 0x01 0x01` + +**Other: List all output from IPMI** + +`sdr elist all` + +**Example of a command:** +`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. + +Script [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 bash scripting or regex, etc. but it seems to work fine for me. + +TLDR; I take _NO_ responsibility if you mess up anything. \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..b172331 --- /dev/null +++ b/readme.md @@ -0,0 +1,5 @@ +# INFO + +This is my personal scripts. Feel free to modify and improve. + +They are provided "as is", and I take no responsibility if they break something on your end. \ No newline at end of file