Echo ipmi temp to /tmp for use in home assistant

main
Marko Korhonen 4 years ago
parent ea69ecbcf7
commit e973f9dceb

@ -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…
Cancel
Save