how to configure hardware temperature

Status
Not open for further replies.

bravo444

Explorer
Joined
Dec 16, 2012
Messages
60
Hi, All,

I've just finished installation of FreeNAS 9.3. Now, I can see hardware monitors, but I would like to setup temperature of them. For instance, they are like CPU, hard disk temperature.
Is there something like configuration tool?

Thank you for your support!!

Regards,
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
I don't understand the question, can you reformulate please?
 

bravo444

Explorer
Joined
Dec 16, 2012
Messages
60
I don't understand the question, can you reformulate please?
Hi,

Thanks for your mail. I mean, I just want to show hardware temperature on MRTG monitor also.
I need to add it by manual? (log into the system)

Regards,
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
I still don't understand fully what you want to do, sorry, but if it can help I've made a script to display the CPU and drives temperatures, see the link "Useful Scripts" in my signature if you're interested.
 

bravo444

Explorer
Joined
Dec 16, 2012
Messages
60
no problem.

let me ask you a question.

Do you need to check CPU, hard disk temperature on the system. If yes, you can check with these on FreeNAS web console as default?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
You only need to check temps when you validate the thermal design of a new server, then they should stay pretty much the same. But yes, the only way I know to check the temps is to use the CLI.
 

DaveF81

Explorer
Joined
Jan 28, 2014
Messages
56
When I set-up my FreeNAS box over a year ago, I found this script and put in a cron job so it would e-mail me the status every few hours. Hope it does the trick:

Code:
#! /bin/sh
echo "CPU temp :"
sysctl -a |egrep -E "cpu\.[0-9]+\.temp"
echo
echo "HDD temp :"
for i in $(sysctl -n kern.disks)
do
        DevTemp=`smartctl -a /dev/$i | awk '/Temperature_Celsius/{print $0}' | awk '{print $10 "C"}'`
        DevSerNum=`smartctl -a /dev/$i | awk '/Serial Number:/{print $0}' | awk '{print $3}'`
        DevName=`smartctl -a /dev/$i | awk '/Device Model:/{print $0}' | awk '{print $3}'`
        echo $i $DevTemp $DevSerNum $DevName
done


It will spit out something like this:

Code:
CPU temp :
dev.cpu.0.temperature: 47.0C
dev.cpu.1.temperature: 44.0C
dev.cpu.2.temperature: 43.0C
dev.cpu.3.temperature: 39.0C

HDD temp :
ada3 32C WD-WCC4Mxxxxxxx WDC
ada2 35C WD-WCC4Mxxxxxxx WDC
ada1 35C WD-WCC4Mxxxxxxx WDC
ada0 35C WD-WCC4Mxxxxxxx WDC
da1
da0
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Waow, great job ;)

I'll test that asap :D
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
That temp graph is great - is there an easy way to install it or is Dave's script to email temps easier to install?


For the next user:

Add Daves script @ 777 in the data store directory.

Add new cron job:

/bin/sh /mnt/Pool/temps.sh | sendmail -i richtj99@testcom
 
Last edited:
Joined
Jul 13, 2013
Messages
286
For servers not in a machine-room environment, I want temp monitoring and trigger levels for reporting (and shutdown) to avoid damaging the disks. The air-conditioning in the room could go out (or not be on yet, in the spring :smile: ), a fan in the case could fail, a drive could somehow fail producing high temperatures that might hurt adjacent drives, etc. So it's not just an initial setup problem to my way of thinking.

Meanwhile, I'm going to be using the script (or just the commands in it) to help validate some things during initial setup ;) .
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
Very cool. I'll try these as soon as I get access to my machine again.
Where do the graphs show up?
 
Status
Not open for further replies.
Top