egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Temperatur check on hard drives

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
brra
Voice


Joined: 08 Oct 2005
Posts: 4

PostPosted: Sat Nov 24, 2007 8:41 am    Post subject: Temperatur check on hard drives Reply with quote

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).
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sat Nov 24, 2007 12:15 pm    Post subject: Reply with quote

Code:
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 Smile
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
brra
Voice


Joined: 08 Oct 2005
Posts: 4

PostPosted: Sat Nov 24, 2007 12:56 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sat Nov 24, 2007 7:15 pm    Post subject: Reply with quote

you can get the value with a regexp: (.*)\ :\ ([0-9]{1,})\ C
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber