Home‎ > ‎Server config‎ > ‎

A/C monitoring of the server room

Supermicro provides a CLI utility, SMCIPMITool, which enables one to query their server backplanes out-of-band for various system parameters. Fortunately, this utility is built statically, so all JRE and other dependencies are included in its own path.

The package is installed on one of our publicly reachable servers, and a trusted client's public keys are installed. The script can then be called from anywhere, from a remote cronjob, and with some parsing, provide notification of suspect temperature parameters.

For this case, a server directly in the path of the A/C stream was selected, and only the System Temperature parameter is queried. This will give some indication of A/C failure. A threshold value for temperature was chosen, which will not be reached under normal conditions (even heavy CPU loads).

The script:
#############################
#!/bin/tcsh

set command='/usr/local/bin/SMCIPMITool/SMCIPMITool -filemode -i malf.bi.up.ac.za -f /usr/local/bin/SMCIPMITool/file.txt -c "ipmi\ sensor"'
set threshold=35

set temp = ` ssh wonko $command|grep System|awk '{ print $7 }'|cut -c 1-2 `

if ($temp >= $threshold) then
    printf "Server room  aircon alert\n\nTEMPERATURE THRESHOLD EXCEEDED!  %u C\n" $temp| /usr/bin/mail -s "Air conditioning failure alert" johann.swart@up.ac.za fourie.joubert@up.ac.za
endif
#############################

Cronjob: (Checks every minute from SEP server)
##########################################
MAILTO="johann.swart@up.ac.za"

* * * * * /root/check_ac.sh

##########################################