Echo ipmi temp to /tmp for use in home assistant
This commit is contained in:
parent
f262059d82
commit
43af1e63ea
3 changed files with 13 additions and 14 deletions
9
home/Scripts/ipmi-auto.sh
Executable file
9
home/Scripts/ipmi-auto.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
IPMIHOST=10.0.0.82
|
||||
IPMIUSER=ReekyMarko
|
||||
IPMIPW={{@@ env['PASS_IPMI'] @@}}
|
||||
IPMIEK=0000000000000000000000000000000000000000
|
||||
|
||||
printf "Activating dynamic fan control."
|
||||
ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x01 0x01
|
|
@ -1,18 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ----------------------------------------------------------------------------------
|
||||
# Script for setting manual fan speed to 2160 RPM (on my R710)
|
||||
#
|
||||
# Requires:
|
||||
# ipmitool – apt-get install ipmitool
|
||||
# slacktee.sh – https://github.com/course-hero/slacktee
|
||||
# ----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# IPMI SETTINGS:
|
||||
# Modify to suit your needs.
|
||||
# DEFAULT IP: 192.168.0.120
|
||||
IPMIHOST=10.0.0.174
|
||||
IPMIHOST=10.0.0.82
|
||||
IPMIUSER=ReekyMarko
|
||||
IPMIPW={{@@ env['PASS_IPMI'] @@}}
|
||||
IPMIEK=0000000000000000000000000000000000000000
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
IPMIHOST=10.0.0.174
|
||||
IPMIHOST=10.0.0.82
|
||||
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)
|
||||
|
||||
echo $TEMP > /tmp/idrac-temp
|
||||
|
||||
|
||||
if [[ $TEMP > $MAXTEMP ]];
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue