diff --git a/home/Scripts/ipmi-static.sh b/home/Scripts/ipmi-static.sh new file mode 100755 index 0000000..f06d66b --- /dev/null +++ b/home/Scripts/ipmi-static.sh @@ -0,0 +1,22 @@ +#!/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 +IPMIUSER=ReekyMarko +IPMIPW={{@@ env['PASS_IPMI'] @@}} +IPMIEK=0000000000000000000000000000000000000000 + +printf "Activating manual fan speeds! (2160 RPM)" +ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x01 0x00 +ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x02 0xff 0x09 diff --git a/home/Scripts/ipmi-temp.sh b/home/Scripts/ipmi-temp.sh new file mode 100644 index 0000000..fb693ae --- /dev/null +++ b/home/Scripts/ipmi-temp.sh @@ -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 diff --git a/secrets/env b/secrets/env index c9e35d7..1883ef6 100755 --- a/secrets/env +++ b/secrets/env @@ -6,6 +6,7 @@ export PASS_MUSPY="$(pass entertainment/muspy.com | head -n 1)" export PASS_ARIA2="$(pass linux/aria2 | head -n 1)" export PASS_MPD="$(pass linux/mpd | head -n 1)" export PASS_MPD_ADMIN="$(pass linux/mpd-admin | head -n 1)" +export PASS_IPMI="$(pass reekynet/idrac | head -n 1)" export ME_FULLNAME="$(pass me | head -n 1)" export ME_ADDRESS="$(pass me | rg 'address' | cut -d' ' -f2-)" diff --git a/secrets/secrets.sh b/secrets/secrets.sh index 2de5945..c1ae535 100755 --- a/secrets/secrets.sh +++ b/secrets/secrets.sh @@ -10,6 +10,7 @@ export PASS_MUSPY="$PASS_MUSPY" export PASS_ARIA2="$PASS_ARIA2" export PASS_MPD="$PASS_MPD" export PASS_MPD_ADMIN="$PASS_MPD_ADMIN" +export PASS_IPMI="$PASS_IPMI" export ME_FULLNAME="$ME_FULLNAME" export ME_ADDRESS="$ME_ADDRESS"