klavsen.dk
Curriculum Vitae
Exim
Amanda
Vserver Presentation
Gentoo Presentation
AntiSpam
Via C3 stuff

Valid HTML 4.01!

Here's some tips and scripts for monitoring whatever, with programs like Cacti, Nagios and BigBrother.

Monitoring Harddisk Temperatures

Script:
#!/bin/sh
#
# this script returns the HD temperate of the selected disk - given with $1
#
sudo /usr/sbin/smartctl -a $1 | grep -i temperature | cut -c 78-80
/end script.
NB. pls. read the WARNINGS.gz file that comes with smartmontools, as there are notes about bugs in certain kernel versions etc. that makes the kernel panic or lock with certain hardware.

The script uses sudo because smartctl requires root access and you usually won't run your monitoring as root ;)
.
Here's the Sudoers info you need:
#First we disable loggin for the user you use for this - don't want logs every 5 minutes when the script is run :)
# Defaults specification - replace with .
Defaults syslog=auth
Defaults: !syslog
# then we allow the user - username to run smartctl on the selected device
username ALL = NOPASSWD:/usr/sbin/smartctl -a /dev/hdc

Have fun measuring your harddisks temperatures :)