-
slacktee
slacktee is a bash script that works like tee command. Instead of writing the standard input to files, slacktee posts it to Slack.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
manualfans.sh #!/bin/bash ipmitool raw 0x30 0x30 0x01 0x00 ipmitool raw 0x30 0x30 0x02 0xff 0X5 echo "Manual fans activated"; dynamicfans.sh #!/bin/bash ipmitool raw 0x30 0x30 0x01 0x01 echo "Dynamic fans activated"; croncheck.sh #!/bin/bash # ---------------------------------------------------------------------------------- # Script for checking the temperature reported by the ambient temperature sensor, # and if deemed to high send the raw IPMI command to enable dynamic fan control. # # 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= IPMIUSER= IPMIPW= # TEMPERATURE # Change this to the temperature in celcius you are comfortable with. # If the temperature goes above the set degrees it will send raw IPMI command to enable dynamic fan control #cpu per core MAXTEMP=33 #board temp MAXCPUTEMP=50 # This variable sends a IPMI command to get the temperature, and outputs it as two digits. # Do not edit unless you know what you do. for i in {1..9} do #TEMP=$(ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW sdr type temperature |grep Ambient |grep degrees |grep -Po '\d{2}' | tail -1) TEMP=$(ipmitool sdr type temperature |grep Ambient |grep degrees |grep -Po '\d{2}' | tail -1) CORES=($(sensors | grep -oP 'Core.*?\+\K[0-9]+')) my_array_length=${#CORES[@]} echo "CoresArray has $my_array_length cpu temp values" echo "This is check $i" printf "This is check $i" | systemd-cat -t R710-IPMI-TEMP printf "CoresArray has $my_array_length cpu temp values " | systemd-cat -t R710-IPMI-TEMP for item in "${CORES[@]}"; do if [ $MAXCPUTEMP -gt $item ]; then printf "CPU CORE TEMP $item present in the array, below $MAXCPUTEMP, SAFE" | systemd-cat -t R710-IPMI-TEMP echo "CPU CORE TEMP $item present in the array, below $MAXCPUTEMP, SAFE" else printf "CPU CORE TEMP $item present in the array, over $MAXCPUTEMP" | systemd-cat -t R710-IPMI-TEMP echo "CPU CORE TEMP $item present in the array, over $MAXCPUTEMP" printf "Warning: Temperature is too high! Activating dynamic fan control! ($item C)" | systemd-cat -t R710-IPMI-TEMP echo "Warning: Temperature is too high! Activating dynamic fan control! ($item C)" ipmitool raw 0x30 0x30 0x01 0x01 fi done if [[ $TEMP > $MAXTEMP ]]; then printf "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP echo "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" ipmitool raw 0x30 0x30 0x01 0x01 else printf "Board Temperature is OK ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP echo "Board Temperature is OK ($TEMP C)" fi sleep 5; done