HDD Temperature
You can usually identify which hard disks are on your system by looking in "/proc/ide" and in "/proc/scsi".
# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA &nb sp; Model: WDC WD2500YS-01S Rev: 20.0
Type: Direct-Access   ;   ;   ;   ; ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA &nb sp; Model: WDC WD2500YS-01S Rev: 20.0
Type: Direct-Access   ;   ;   ;   ; ANSI SCSI revision: 05
`fdisk -l` lists the two drives as "sda" and "sdb".
Here's the output of `smartctl -a -d ata /dev/sda`:
Device Model: WDC WD2500YS-01SHB1
Serial Number: WD-WCANY4128422
Firmware Version: 20.06C06
User Capacity: 251,000,193,024 bytes
Device is: &nb sp; Not in smartctl database [for details use: -P showall]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Wed Dec 24 23:52:19 2008 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
In order to monitor HDD temperature, edit "/etc/munin/plugin-conf.d/hddt
[hddtemp_smartctl]
user root
env.drives sda sdb
env.args_sda -d ata
env.args_sdb -d ata
Test output via:
# env drives="sda sdb" args_sda="-d ata" args_sdb="-d ata" /etc/munin/plugins/hddtemp_sma rtctl
Which should show the temperature in Celsius:
sda.value 28
sdb.value 28
Restart munin-node and wait a while for the munin graphs to show up.
Check the log, "/var/log/munin/munin-node.log
hddtemp_smartctl plugin does not send out email notification by default and has to be specified on a per host basis in "munin.conf":
[foo.example.com]
address 127.0.0.1
use_node_name yes
hddtemp_smartctl.sda.critical 55
hddtemp_smartctl.sda.critical 55
Reference: munin alert email notification
- sandip's blog
- Login or register to post comments
Comments
Below is the actual way to be testing plugins, as it automatically reads the conf file and runs as the correct user.
munin-run hddtemp_smartctl
Reference: Concise guide to plugin authoring
The big problem with smart is that it was not compatible with SATA drives for a very long time (all through CentOS 4.x for example). I believe the latest CentOS 5 now supports smart on SATA so you can once again monitor hard drive temperatures.
So if you are running an older system with a PATA drive this works, or a newer system with SATA and a recent kernel 2.6 that works too. There's just a big gap of several years in the middle where smart was generally useless due to no SATA support.