Skip to content

Instantly share code, notes, and snippets.

@imfht
Created October 7, 2021 12:09
Show Gist options
  • Save imfht/c3ca6ce1d1b6daa6e063947061aa22e3 to your computer and use it in GitHub Desktop.
Save imfht/c3ca6ce1d1b6daa6e063947061aa22e3 to your computer and use it in GitHub Desktop.
dell ipmi set
#!/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