Guest_imported
New member
- Jan 1, 1970
- 0
I've had a few problems with the AC in the past month and for some reason even when the boards are registering 54 degrees the server's aren't shutting down. I thought 49 was the failsafe where the systems start panicking? Anyway I had the bright idea to write a script to monitor the temperature of the system and page me when it registers 50 or above. I figure I can put it in a crontab and have it check every minute. I started off with this for my first line
#!/bin/ksh
prtdiag -v | grep stable | awk '{print $3}' > /tmp/CURRENT_TEMP
for var in $(cat /tmp/CURRENT_TEMP)
do
if ["$var" => "50"]
then
echo warning its hot in here | mailx mypagerinformation
done
I have a problem with this. Is there a better way to get the temperature from the system? I am not sure that the board's temperature will be listed as stable. I've seen it listed as falling and rising before. I'm not sure what else it can be. Are there any helpful suggestions on my script?
#!/bin/ksh
prtdiag -v | grep stable | awk '{print $3}' > /tmp/CURRENT_TEMP
for var in $(cat /tmp/CURRENT_TEMP)
do
if ["$var" => "50"]
then
echo warning its hot in here | mailx mypagerinformation
done
I have a problem with this. Is there a better way to get the temperature from the system? I am not sure that the board's temperature will be listed as stable. I've seen it listed as falling and rising before. I'm not sure what else it can be. Are there any helpful suggestions on my script?