script: verifica temperatura en discos / check hard disk temperature


Script para verificar la temperatura de los discos. De consulta frecuente para los servidores físicos. Puede modificarse facilmente para enviar un mail de alarma.

#!/bin/sh
#hvivani. 20131128
#Verifica temperatura en discos de servidor.
#Lista todos los dispositivos /dev/sd*
#Requiere instalado smartctl (yum install smartmontools)

for f in `fdisk -l |grep 'Disk /dev/sd' | cut -c6-13`
do
        echo $f "(ºC):"
        smartctl -a $f |grep Temperature |cut -c81-90
done

Salida:

# ./chkTemperaturaDiscos.sh 
/dev/sda (ºC):
       28
/dev/sdb (ºC):
       26
/dev/sdd (ºC):
       26
/dev/sdc (ºC):
       26

6 thoughts on “script: verifica temperatura en discos / check hard disk temperature

Leave a Reply to diego Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s