diff options
| author | Anton Bobov <abobov@gmail.com> | 2018-02-16 20:57:12 +0500 |
|---|---|---|
| committer | Anton Bobov <abobov@gmail.com> | 2018-02-28 23:47:25 +0500 |
| commit | a0e40445545966ffceb06e1cf809a13c105661b4 (patch) | |
| tree | ebadf946aa26803d970513eeed4060333051dde1 /dell-ipmi-fancontroll.sh | |
| parent | 88a42702cb07b56cb577e1e701a1a075486a1e30 (diff) | |
Dell PowerEdge IPMI Fan control script.
IO benchmark.
Diffstat (limited to 'dell-ipmi-fancontroll.sh')
| -rwxr-xr-x | dell-ipmi-fancontroll.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dell-ipmi-fancontroll.sh b/dell-ipmi-fancontroll.sh new file mode 100755 index 0000000..cc89d93 --- /dev/null +++ b/dell-ipmi-fancontroll.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +MAXTEMP=30 + +TEMP=$(/usr/sbin/ipmi-sensors -r 5 | tail -n 1 | cut -d '|' -f 4 | tr -d ' ') + +SP_1800=0x06 +SP_2000=0x09 +SP_3000=0x1a +SP_9000=0x46 + +SP=$SP_1800 + +if [[ $TEMP > $MAXTEMP ]] ; then + # Set auto speed + /usr/bin/ipmitool raw 0x30 0x30 0x01 0x01 +else + # Enable edit + /usr/bin/ipmitool raw 0x30 0x30 0x01 0x00 + # Set speed 2K + /usr/bin/ipmitool raw 0x30 0x30 0x02 0xff $SP +fi + |
