Created
October 7, 2021 12:09
-
-
Save imfht/c3ca6ce1d1b6daa6e063947061aa22e3 to your computer and use it in GitHub Desktop.
dell ipmi set
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ipmi_host=idrac | |
ipmi_user=root | |
ipmi_passwd=xxxx | |
temp_threshold="60" | |
get_value=`ipmitool -I lanplus -H $ipmi_host -U $ipmi_user -P $ipmi_passwd sensor reading "Temp" | cut -d "|" -f 2 | cut -d " " -f 2` | |
if [[ $get_value > $temp_threshold ]] | |
then | |
ipmitool -I lanplus -H $ipmi_host -U $ipmi_user -P $ipmi_passwd raw 0x30 0x30 0x01 0x01 | |
echo "set fans auto " | |
else | |
ipmitool -I lanplus -H $ipmi_host -U $ipmi_user -P $ipmi_passwd raw 0x30 0x30 0x01 0x00 | |
ipmitool -I lanplus -H $ipmi_host -U $ipmi_user -P $ipmi_passwd raw 0x30 0x30 0x02 0xff 0x0a | |
echo "set fans 1000" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment