├── .gitignore ├── R710-IPMI-TEMP ├── R710-IPMIStatic.sh ├── R710-IPMITemp.sh └── readme.md └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /R710-IPMI-TEMP/R710-IPMIStatic.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # ---------------------------------------------------------------------------------- 4 | # Script for setting manual fan speed to 2160 RPM (on my R710) 5 | # 6 | # Requires: 7 | # ipmitool – apt-get install ipmitool 8 | # slacktee.sh – https://github.com/course-hero/slacktee 9 | # ---------------------------------------------------------------------------------- 10 | 11 | 12 | # IPMI SETTINGS: 13 | # Modify to suit your needs. 14 | # DEFAULT IP: 192.168.0.120 15 | IPMIHOST=10.0.100.20 16 | IPMIUSER=root 17 | IPMIPW=calvin 18 | IPMIEK=0000000000000000000000000000000000000000 19 | 20 | printf "Activating manual fan speeds! (2160 RPM)" | systemd-cat -t R710-IPMI-TEMP 21 | echo "Activating manual fan speeds! (2160 RPM)" | slacktee.sh -t "R710-IPMI-TEMP [$(hostname)]" 22 | ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x01 0x00 23 | ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x02 0xff 0x09 -------------------------------------------------------------------------------- /R710-IPMI-TEMP/R710-IPMITemp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ---------------------------------------------------------------------------------- 4 | # Script for checking the temperature reported by the ambient temperature sensor, 5 | # and if deemed too high send the raw IPMI command to enable dynamic fan control. 6 | # 7 | # Requires: 8 | # ipmitool – apt-get install ipmitool 9 | # slacktee.sh – https://github.com/course-hero/slacktee 10 | # ---------------------------------------------------------------------------------- 11 | 12 | 13 | # IPMI SETTINGS: 14 | # Modify to suit your needs. 15 | # DEFAULT IP: 192.168.0.120 16 | IPMIHOST=10.0.100.20 17 | IPMIUSER=root 18 | IPMIPW=calvin 19 | IPMIEK=0000000000000000000000000000000000000000 20 | 21 | # TEMPERATURE 22 | # Change this to the temperature in celcius you are comfortable with. 23 | # If the temperature goes above the set degrees it will send raw IPMI command to enable dynamic fan control 24 | MAXTEMP=27 25 | 26 | # This variable sends a IPMI command to get the temperature, and outputs it as two digits. 27 | # Do not edit unless you know what you do. 28 | TEMP=$(ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK sdr type temperature |grep Ambient |grep degrees |grep -Po '\d{2}' | tail -1) 29 | 30 | 31 | if [[ $TEMP > $MAXTEMP ]]; 32 | then 33 | printf "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP 34 | echo "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" | /usr/bin/slacktee.sh -t "R710-IPMI-TEMP [$(hostname)]" 35 | ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x01 0x01 36 | else 37 | # healthchecks.io 38 | curl -fsS --retry 3 https://hchk.io/XXX >/dev/null 2>&1 39 | printf "Temperature is OK ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP 40 | echo "Temperature is OK ($TEMP C)" 41 | fi 42 | -------------------------------------------------------------------------------- /R710-IPMI-TEMP/readme.md: -------------------------------------------------------------------------------- 1 | # _**Notice:** This script is not maintained any more._ 2 | 3 | **_If you want a more advanced Perl script with more functionality, check out [@spacelama's fork](https://github.com/spacelama/Scripts)._** 4 | 5 | 6 | 7 | ***** 8 | 9 | ***** 10 | 11 | ***** 12 | 13 | **Old README:** 14 | 15 | # Safety BASH script 16 | 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. 17 | 18 | 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. 19 | 20 | I run the script via CRON every 5 minutes from my Ubuntu Server VM running on ESXi. 21 | 22 | `*/5 * * * * /bin/bash /path/to/script/R710-IPMITemp.sh > /dev/null 2>&1` 23 | 24 | Notice that I use [healthchecks.io](https://healthchecks.io) in the script to notify if the temp goes to high (it would also trigger if the internet goes down for some reason). Remember to get your own check URL if you want it, or else just remove the curl command. 25 | 26 | I'm also currently testing out [slacktee.sh](https://github.com/course-hero/slacktee) to get notifications in my slack channel. 27 | 28 | 29 | The Scripts [Reddit thread](https://www.reddit.com/r/homelab/comments/779cha/manual_fan_control_on_r610r710_including_script/) 30 | 31 | # Howto: Setting the fan speed of the Dell R610/R710 32 | 33 | 1. Enable IPMI in iDrac 34 | 2. Install ipmitool on linux, win or mac os 35 | 3. Run the following command to issue IPMI commands: 36 | `ipmitool -I lanplus -H -U root -P ` 37 | 38 | 39 | **Enable manual/static fan speed:** 40 | 41 | `raw 0x30 0x30 0x01 0x00` 42 | 43 | 44 | **Set fan speed:** 45 | 46 | (Use i.e http://www.hexadecimaldictionary.com/hexadecimal/0x14/ to calculate speed from decimal to hex) 47 | 48 | *3000 RPM*: `raw 0x30 0x30 0x02 0xff 0x10` 49 | 50 | *2160 RPM*: `raw 0x30 0x30 0x02 0xff 0x0a` 51 | 52 | *1560 RPM*: `raw 0x30 0x30 0x02 0xff 0x09` 53 | 54 | _Note: The RPM may differ from model to model_ 55 | 56 | 57 | **Disable / Return to automatic fan control:** 58 | 59 | `raw 0x30 0x30 0x01 0x01` 60 | 61 | 62 | **Other: List all output from IPMI** 63 | 64 | `sdr elist all` 65 | 66 | 67 | **Example of a command:** 68 | 69 | `ipmitool -I lanplus -H 192.168.0.120 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x10` 70 | 71 | 72 | ***** 73 | 74 | **Disclaimer** 75 | 76 | I'm by no means good at IPMI, BASH scripting or regex, etc. but it seems to work fine for me. 77 | 78 | TLDR; I take _NO_ responsibility if you mess up anything. 79 | 80 | ***** 81 | 82 | All of this was inspired by [this Reddit post](https://www.reddit.com/r/homelab/comments/72qust/r510_noise/dnkofsv/) by /u/whitekidney 83 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # INFO 2 | 3 | This is my personal scripts. Feel free to modify and improve. 4 | 5 | They are provided "as is", and I take no responsibility if they break something on your end. --------------------------------------------------------------------------------