This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Temperatur check on hard drives

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
b
brra
Voice
Posts: 4
Joined: Sat Oct 08, 2005 10:08 am

Temperatur check on hard drives

Post by brra »

Hi

I have searched after a script for some days now but cant find it.

I am looking for a eggdrop script that checks temperaturs on hardrives (linux systems).

Multiple harddrives not only one drive.

I think hddtemp would be the best application to use.

output from hddtemp:

hddtemp /dev/hda
/dev/hda: WDC WD800JB-00CRA1: drive supported, but it doesn't have a temperature sensor.

ddtemp /dev/hde
/dev/hde: Maxtor 6Y120L0: 30 C

hddtemp /dev/sdc
/dev/sdc: Maxtor 6L300S0: 42 C

hddtemp /dev/hdb
/dev/hdb: WDC WD2000BB-00GUA0: 44 C

The best would be if ther was a setting for alert temp for each harddrive (as use see diffrent hds have diffrent max temp).
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Code: Select all

set drives {"hda" "hde" "hdb" "sdc"}
bind time * * * * * hd:check
proc hd:check {m h dd mm yy} {
   foreach drive $::drives {
      set tmp [exec "hddtemp /dev$drive"]
   }
}
Then, you can do what you want after the set tmp line...

P.S.: I'm not really sure of my exec command, neither the set, but this is juste the idea :)
b
brra
Voice
Posts: 4
Joined: Sat Oct 08, 2005 10:08 am

Post by brra »

Tanx crazycat

The only thing that is missing is a alert if temp is over 60 on one of the disk.

then is should msg out the disk name. something like this.
Alert hd temp on hdc is now 65 C. Cool it down.

or what ever :D
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

you can get the value with a regexp: (.*)\ :\ ([0-9]{1,})\ C
Post Reply