Added ipmi control scripts
This commit is contained in:
parent
1627d59a24
commit
78dc41b64a
4 changed files with 41 additions and 0 deletions
17
home/Scripts/ipmi-temp.sh
Normal file
17
home/Scripts/ipmi-temp.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
IPMIHOST=10.0.0.174
|
||||
IPMIUSER=ReekyMarko
|
||||
IPMIPW={{@@ env['PASS_IPMI'] @@}}
|
||||
IPMIEK=0000000000000000000000000000000000000000
|
||||
MAXTEMP=27
|
||||
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)
|
||||
|
||||
|
||||
if [[ $TEMP > $MAXTEMP ]];
|
||||
then
|
||||
printf "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)"
|
||||
ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x01 0x01
|
||||
else
|
||||
printf "Temperature is OK ($TEMP C)"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue