mirror of
https://github.com/That-Guy-Jack/HP-ILO-Fan-Control.git
synced 2025-04-26 12:32:28 +00:00
Added EXSI Support
Merged altered Scripts from PR8, added instructions from thomaswilbur's fork Co-Authored-By: Thomas Wilbur <thomaswilbur@adaclare.com>
This commit is contained in:
parent
05b7d7bfa6
commit
2b3b5a1607
149
Files/autofan-dl360p-g8-EXSI.sh
Normal file
149
Files/autofan-dl360p-g8-EXSI.sh
Normal file
@ -0,0 +1,149 @@
|
||||
#!/bin/bash
|
||||
# 1U
|
||||
# crontab -l > mycron
|
||||
# echo "#" >> mycron
|
||||
# echo "# At every 2nd minute" >> mycron
|
||||
# echo "*/1 * * * * /bin/bash /autofan.sh >> /tmp/cron.log" >> mycron
|
||||
# crontab mycron
|
||||
# rm mycron
|
||||
# chmod +x /autofan.sh
|
||||
#
|
||||
PASSWORD="your password"
|
||||
USERNAME="your username"
|
||||
ILOIP="your ilo ip"
|
||||
|
||||
FILE="/usr/bin/sshpass"
|
||||
if [ -f "$FILE" ]; then
|
||||
echo "sshpass already loaded."
|
||||
else
|
||||
esxcli network firewall ruleset set -e true -r httpClient
|
||||
pwdlocation=$(pwd)
|
||||
cd /tmp
|
||||
wget https://github.com/thomaswilbur/HP-ILO-Fan-Control/blob/main/Files/sshpass?raw=true --no-check-certificate
|
||||
mv sshpass?raw=true /usr/bin/sshpass
|
||||
chmod +x sshpass
|
||||
cd pwdlocation
|
||||
echo "sshpass loaded."
|
||||
fi
|
||||
|
||||
esxcli network firewall ruleset set -e true -r sshClient
|
||||
#T1="$(sensors -Aj coretemp-isa-0000 | jq '.[][] | to_entries[] | select(.key | endswith("input")) | .value' | sort -rn | head -n1)"
|
||||
#T2="$(sensors -Aj coretemp-isa-0001 | jq '.[][] | to_entries[] | select(.key | endswith("input")) | .value' | sort -rn | head -n1)"
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP show /system1/sensor2 > temp.txt
|
||||
T1CLEAN=$(grep -Ihr "CurrentReading" temp.txt)
|
||||
T1=$(echo "${T1CLEAN/ CurrentReading=/}" | xargs)
|
||||
rm -rf temp.txt
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP show /system1/sensor3 > temp.txt
|
||||
T2CLEAN=$(grep -Ihr "CurrentReading" temp.txt)
|
||||
T2=$(echo "${T2CLEAN/ CurrentReading=/}" | xargs)
|
||||
rm -rf temp.txt
|
||||
T1=${T1//$'\n'/}
|
||||
T2=${T2//$'\n'/}
|
||||
T1=${T1%$'\n'}
|
||||
T2=${T2%$'\n'}
|
||||
|
||||
|
||||
echo "CPU 1 Temp $T1 C"
|
||||
|
||||
|
||||
if [[ $T1 > 87 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 80'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 80'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 80'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 80'
|
||||
elif [[ $T1 > 77 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 70'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 70'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 70'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 70'
|
||||
elif [[ $T1 > 67 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 39'
|
||||
elif [[ $T1 > 58 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 30'
|
||||
elif [[ $T1 > 54 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 28'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 28'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 28'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 28'
|
||||
elif [[ $T1 > 52 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 24'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 24'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 24'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 24'
|
||||
elif [[ $T1 > 50 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 22'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 22'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 22'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 22'
|
||||
else
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 20'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 20'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 6 max 20'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 7 max 20'
|
||||
fi
|
||||
|
||||
|
||||
echo "CPU 2 Temp $T2 C"
|
||||
|
||||
|
||||
if [[ $T2 > 87 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 80'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 80'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 80'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 80'
|
||||
elif [[ $T2 > 77 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 70'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 70'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 70'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 70'
|
||||
elif [[ $T1 > 67 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 39'
|
||||
elif [[ $T2 > 58 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 30'
|
||||
elif [[ $T2 > 54 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 28'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 28'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 28'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 28'
|
||||
elif [[ $T2 > 52 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 24'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 24'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 24'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 24'
|
||||
elif [[ $T2 > 50 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 22'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 22'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 22'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 22'
|
||||
else
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 20'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 20'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 20'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 20'
|
||||
fi
|
148
Files/autofan-dl380p-g8-EXSI.sh
Normal file
148
Files/autofan-dl380p-g8-EXSI.sh
Normal file
@ -0,0 +1,148 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# crontab -l > mycron
|
||||
# echo "#" >> mycron
|
||||
# echo "# At every 2nd minute" >> mycron
|
||||
# echo "*/1 * * * * /bin/bash /autofan.sh >> /tmp/cron.log" >> mycron
|
||||
# crontab mycron
|
||||
# rm mycron
|
||||
# chmod +x /autofan.sh
|
||||
#
|
||||
|
||||
PASSWORD="YOURILOPASSWORD"
|
||||
USERNAME="YOURILOUSER"
|
||||
ILOIP="YOURILOIP"
|
||||
|
||||
FILE="/usr/bin/sshpass"
|
||||
if [ -f "$FILE" ]; then
|
||||
echo "sshpass already loaded."
|
||||
else
|
||||
esxcli network firewall ruleset set -e true -r httpClient
|
||||
pwdlocation=$(pwd)
|
||||
cd /tmp
|
||||
wget https://github.com/thomaswilbur/HP-ILO-Fan-Control/blob/main/Files/sshpass?raw=true --no-check-certificate
|
||||
mv sshpass?raw=true /usr/bin/sshpass
|
||||
chmod +x sshpass
|
||||
cd pwdlocation
|
||||
echo "sshpass loaded."
|
||||
fi
|
||||
|
||||
esxcli network firewall ruleset set -e true -r sshClient
|
||||
#T1="$(sensors -Aj coretemp-isa-0000 | jq '.[][] | to_entries[] | select(.key | endswith("input")) | .value' | sort -rn | head -n1)"
|
||||
#T2="$(sensors -Aj coretemp-isa-0001 | jq '.[][] | to_entries[] | select(.key | endswith("input")) | .value' | sort -rn | head -n1)"
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP show /system1/sensor2 > temp.txt
|
||||
T1CLEAN=$(grep -Ihr "CurrentReading" temp.txt)
|
||||
T1=$(echo "${T1CLEAN/ CurrentReading=/}" | xargs)
|
||||
rm -rf temp.txt
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP show /system1/sensor3 > temp.txt
|
||||
T2CLEAN=$(grep -Ihr "CurrentReading" temp.txt)
|
||||
T2=$(echo "${T2CLEAN/ CurrentReading=/}" | xargs)
|
||||
rm -rf temp.txt
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP show /system1/sensor25 > temp.txt
|
||||
T2CLEAN=$(grep -Ihr "CurrentReading" temp.txt)
|
||||
RAID=$(echo "${T2CLEAN/ CurrentReading=/}" | xargs)
|
||||
rm -rf temp.txt
|
||||
T1=${T1//$'\n'/}
|
||||
T2=${T2//$'\n'/}
|
||||
RAID=${RAID//$'\n'/}
|
||||
T1=${T1%$'\n'}
|
||||
T2=${T2%$'\n'}
|
||||
RAID=${RAID%$'\n'}
|
||||
|
||||
echo "CPU 1 Temp $T1 C"
|
||||
|
||||
|
||||
if [[ $T1 > 67 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 255'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 255'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 255'
|
||||
elif [[ $T1 > 58 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 39'
|
||||
|
||||
elif [[ $T1 > 54 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 38'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 38'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 38'
|
||||
elif [[ $T1 > 52 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 34'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 34'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 34'
|
||||
elif [[ $T1 > 50 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 32'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 32'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 32'
|
||||
else
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 3 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 4 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 30'
|
||||
fi
|
||||
|
||||
echo "CPU 2 Temp $T2 C"
|
||||
|
||||
if [[ $T2 > 67 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 255'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 255'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 255'
|
||||
|
||||
elif [[ $T2 > 58 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 39'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 39'
|
||||
elif [[ $T2 > 54 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 38'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 38'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 38'
|
||||
elif [[ $T2 > 52 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 34'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 34'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 34'
|
||||
elif [[ $T2 > 50 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 32'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 32'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 32'
|
||||
else
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 0 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 1 max 30'
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 2 max 30'
|
||||
fi
|
||||
|
||||
echo "RAID Temp $RAID C"
|
||||
if [[ $RAID > 97 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 255'
|
||||
elif [[ $RAID > 95 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 90'
|
||||
elif [[ $RAID > 94 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 85'
|
||||
elif [[ $RAID > 93 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 60'
|
||||
elif [[ $RAID > 92 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 55'
|
||||
elif [[ $RAID > 91 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 50'
|
||||
elif [[ $RAID > 90 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 45'
|
||||
elif [[ $RAID > 89 ]]
|
||||
then
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 40'
|
||||
else
|
||||
sshpass -p $PASSWORD ssh -oStrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group14-sha1 $USERNAME@$ILOIP 'fan p 5 max 35'
|
||||
fi
|
BIN
Files/sshpass
Normal file
BIN
Files/sshpass
Normal file
Binary file not shown.
30
Install.sh
30
Install.sh
@ -17,6 +17,36 @@ if [ $input = yes ] ; then
|
||||
cd /etc/systemd/system/
|
||||
wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan.service
|
||||
echo "Finished making autofan.service"
|
||||
echo "Is Your host based on EXSI? (uses ILO temps over lm-sensors) [Y]/[N]"
|
||||
read exsi
|
||||
if [ $exsi = Y ]
|
||||
echo "Which server are you running? DL360p G8 (1) or DL380p G8 (2) [1] or [2] :"
|
||||
read server
|
||||
if [ $server = 1 ] ; then
|
||||
echo "Preping autofan.sh for DL360p G8"
|
||||
cd /
|
||||
echo "Downloading latest autofan.sh"
|
||||
wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan-dl360p-g8-EXSI.sh
|
||||
echo "Downloaded autofan.sh, please change the placeholders with correct info"
|
||||
echo "Please cisit the GitHub page to follow the instructions!"
|
||||
echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control"
|
||||
exit 1
|
||||
elif [ $server = 2 ] ; then
|
||||
echo "Preping autofan.sh for DL380p G8"
|
||||
cd /
|
||||
echo "Downloading latest autofan.sh for DL380p G8"
|
||||
wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Files/autofan-dl380p-g8-EXSI.sh
|
||||
echo "Renaming file"
|
||||
mv autofan-dl380p-g8.sh autofan.sh
|
||||
echo "Downloaded autofan.sh, please change the placeholders with correct info"
|
||||
echo "Please cisit the GitHub page to follow the instructions!"
|
||||
echo "https://github.com/That-Guy-Jack/HP-ILO-Fan-Control"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo " :( exitting"
|
||||
exit 1
|
||||
else
|
||||
echo "Which server are you running? DL360p G8 (1) or DL380p G8 (2) [1] or [2] :"
|
||||
read server
|
||||
if [ $server = 1 ] ; then
|
||||
|
27
README-EXSI.md
Normal file
27
README-EXSI.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Originaly From
|
||||
|
||||
https://github.com/thomaswilbur/HP-ILO-Fan-Control
|
||||
|
||||
# HP ILO FAN CONTROL ESXI EDITION
|
||||
TESTED ESXI 7 WITH THIS MOD
|
||||
Uses a Custom ROM for The Hp ILO adapter
|
||||
|
||||
### Reddit Post
|
||||
|
||||
https://www.reddit.com/r/homelab/comments/hix44v/silence_of_the_fans_pt_2_hp_ilo_4_273_now_with/
|
||||
|
||||
### Original Repo
|
||||
|
||||
https://github.com/That-Guy-Jack/HP-ILO-Fan-Control
|
||||
|
||||
|
||||
### Steps
|
||||
|
||||
1. Create Ubuntu ISO
|
||||
2. Ensure ILO Security is Disabled via dipswitch on mobo
|
||||
3. Flash new ILO
|
||||
4. Write ILO creds down & ensure ssh is enabled
|
||||
5. Reboot into ESXI
|
||||
6. Run both of these commands
|
||||
```esxcli network firewall ruleset set -e true -r httpClient```
|
||||
```esxcli network firewall ruleset set -e true -r sshClient```
|
@ -5,7 +5,7 @@ This repo contains all of the required files! :)
|
||||
All you need to run is the commands below.
|
||||
|
||||
### Currently, the scripts are only for Linux!
|
||||
ESXi Support is in the works!
|
||||
~~ESXi Support is in the works!~~ Thanks to @thomaswilbur For making the ESXI verstion of the script! - see EXSI readme
|
||||
|
||||
## STEPS:
|
||||
|
||||
@ -17,7 +17,9 @@ ESXi Support is in the works!
|
||||
3. Run the `prep.sh` in the `ilo_250` folder. If this errors it may be beacuse the ILO isnt it maintainance mode. (You may need to run this script as root.)
|
||||
>
|
||||
|
||||
./flash_ilo4 --direct (When flashing the fans spin up to 100%, so be prepared)
|
||||
./flash_ilo4 --direct
|
||||
|
||||
(When flashing the fans spin up to 100%, so be prepared)
|
||||
|
||||
|
||||
4. Once the flash has completed, shut down your system and unplug it. Make sure to switch ILO back out of maintainance mode.
|
||||
|
Loading…
x
Reference in New Issue
Block a user