Friday, June 19, 2009

Home Server Project - Remote management and configuring alets about system/hdd temperature

The box is back in its final place - my personal-data centre. As observed before, closed cabinet adds warmth to the cabinet and adds almost 10 degree Celsius in the temperature reading. For now, it would remain uncovered and temperature lies between 50-60C

This rack is 8 feet above the ground hence turning the machine on is a challenge. WOL came to rescue. The onboard NIC supports wake on lan so I got one wol utility from internet. There are plenty available. I tried with two and both worked well.

Sendmail for google apps has been already configured for this box. The box is able to mail whenever apache has been started or stopped. To extend this further, I am trying to schedule cron jobs to mail me temperature status of various components. A quick tutorial and hddtemp package is now able to send me HDD temperature over mail, every 15 mins. Following command has been scheduled for it

mail -s `hddtemp /dev/sda | awk '{print $2$3}'` < /dev/null

I am still trying to get sensor temperature but not able to get HTML mail out. It looks like a permission issue. The script works fine when ran as root, but not when through crontab.