Cluster Temperature Monitor
Extract CPU temperatures
$ sensors | grep '^temp[0-9]:' | sed -e 's/.*: \+[+-]\([0-9.]\+\)°C.*$/\1/' 27.8 29.8
If one of the CPU cores on a node computing node reach +70 °C, write the node name and the temperature to file
data/$temperaFile
$ cat data/2019-05-12_13\:00\:01 71.0 node06 71.0 node06
If
data/$temperaFile
is not empty, notify the lab members by sending an email to given address with the content from filedata/$temperaFile
php temperatureWarning.php data/$temperaFile
This program will check the temperature every hour. We use
cronjob
to make the program run every hour0 * * * * sh /home/coiby/temperatureAlert/temperature.sh >>/home/coiby/temperatureAlert/tempera.log 2>&