mirror of
https://git.korhonen.cc/FunctionalHacker/dotfiles.git
synced 2024-11-04 18:00:20 +00:00
Added ipmi control scripts
This commit is contained in:
parent
107a7b5b1d
commit
07d72f06d5
22
home/Scripts/ipmi-static.sh
Executable file
22
home/Scripts/ipmi-static.sh
Executable file
@ -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
|
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
|
@ -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_ARIA2="$(pass linux/aria2 | head -n 1)"
|
||||||
export PASS_MPD="$(pass linux/mpd | 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_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_FULLNAME="$(pass me | head -n 1)"
|
||||||
export ME_ADDRESS="$(pass me | rg 'address' | cut -d' ' -f2-)"
|
export ME_ADDRESS="$(pass me | rg 'address' | cut -d' ' -f2-)"
|
||||||
|
@ -10,6 +10,7 @@ export PASS_MUSPY="$PASS_MUSPY"
|
|||||||
export PASS_ARIA2="$PASS_ARIA2"
|
export PASS_ARIA2="$PASS_ARIA2"
|
||||||
export PASS_MPD="$PASS_MPD"
|
export PASS_MPD="$PASS_MPD"
|
||||||
export PASS_MPD_ADMIN="$PASS_MPD_ADMIN"
|
export PASS_MPD_ADMIN="$PASS_MPD_ADMIN"
|
||||||
|
export PASS_IPMI="$PASS_IPMI"
|
||||||
|
|
||||||
export ME_FULLNAME="$ME_FULLNAME"
|
export ME_FULLNAME="$ME_FULLNAME"
|
||||||
export ME_ADDRESS="$ME_ADDRESS"
|
export ME_ADDRESS="$ME_ADDRESS"
|
||||||
|
Loading…
Reference in New Issue
Block a user