Now it's possible to increase room temperature by donating unused CPU cycles (and get money rewards) to distributed_computing project when room is to cold

Hot processor means hot room, cold processor means colder room. Turning processor hot with distributed computing will slightly control room temperature.
This bash code for crontab needs installed mprime script as described here
############################################
Control Temperatures using Distributed Computing
######################
######################
a=$(cat /proc/acpi/thermal_zone/*/temperature | grep C | awk '{
print $2 }'| sed -n 1p )
b=$(cat /proc/acpi/thermal_zone/*/temperature | grep C | awk '{
print $2 }'| sed -n 2p )
echo current cpu temperature: $a
echo current disk temperature: $b
#when to turn distributed computing on and off
#a range 68 degrees on, off at 90
#b range: on at 54, off at 59
#turning off
if [[ $a -gt 90 && $b -gt 59 ]]; then
echo killing distributed_computing
/usr/bin/notify-send -u normal -t 4000 \
'ending distributed computing to decrease room&cpu&disk temperature and compute'
killall mprime
fi
#turning on
if [[ $a -lt 68 && $b -lt 54 ]]; then
echo starting distributed computing to increase room temperature and compute
/opt/mprime/mprime&
/usr/bin/notify-send -u normal -t 4000 \
'starting distributed computing to increase room&cpu&disk temperature and compute'
fi
0 comments:
Post a Comment