How to monitor system (CPU, HDD, mobo, GPU) temperatures on FreeNAS 8?

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Uhm, just remembered that it might be necessary to add your user to group wheel to be able to use su. Not sure if you can freely configure sudo, that would be the alternative.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You do realize that FreeNAS already has the ability to email you if disk temps exceed your threshold value?

Iif you setup the SMART functions the system will monitor for any time you hit or exceed the value for "critical". See the FreeNAS manual for setup of email and SMART(assuming your hardware is compatible with SMART).
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
I've mentioned that twice in my last posts already - but I guess one can never point out SMART reports too often ;)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Oh, sorry. I thought I refreshed this thread before my post since there was a large gap in time. Oh well. :P
 

i3luefire

Explorer
Joined
Jan 4, 2014
Messages
69
I have. but i dont know whether its issue with freenas 9.2.1.6 or i am making some mistake whenever i try to get a script running via cron. i always get error. file not found it gives correct path in the error message but it cannot execute . i am missing something
what user are you setting the cron job up to be? i believe that it has to be ran as root.
 

MuneebMufti

Dabbler
Joined
May 5, 2014
Messages
36
what user are you setting the cron job up to be? i believe that it has to be ran as root.
Yup I ran as root. it didnt work for me. thats why I was asking if someone can write a step by step for the script to be run as cron. I always get the error file not found. even though the path to file is correct
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Did you use a valid path for the LOGFILE, ie:

LOGFILE=/path/to/temp.log
 

pechkin000

Explorer
Joined
Jan 24, 2014
Messages
59
Would it be possible for someone to post the script in the format so that it DOES NOT filter out da* devices? I dont have any experience with scripting so I am not sure how to follow directions from earlier post regarding filtering out the da* drives.
I would appreciate any help on this.
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Everything is in the topic.
I would like to make a script to report all of this monitoring.

I've found the command
Code:
sysctl -a |egrep -E "cpu\.[0-9]+\.temp"
for CPU temp, but sysctl seems reporting wrong temperature (around 40°C).
I'm pretty sure that my CPU (i3 2100) is more than 40°C, being that it's fanless cooled (Thermalright HR-02)


For HDD temp i found the command
Code:
for i in $(sysctl -n kern.disks)
do printf "%s\t%s\t%s\n" $i $(smartctl -a /dev/$i | awk '/Serial Number/{x=$NF}$2~^Temperature/&&x{print $10"C",x}')
done

But it outputs an error that i can't solve :
Code:
awk: syntax error at source line 1
context is
        /Serial >>>  Number/{x(NF)}$2~^ <<< Temperature/&&x{print $10"C",x}
awk: bailing out at source line 1
ada3


For mobo and GPU temp, didn't find anything.


Any help appreciated! :)

Your scripts seem a little overkill, any reason you don't just ue
Code:
sysctl -a |  grep empe
and
Code:
smartctl -a /dev/ada0 | grep empe
?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If your i3 is idle, even if fanless, if the case has a couple of fans I think its very reasonable to expect 40C to be a good temp. Some CPUs use less than 10 watts idle. Keep in mind that 386s of the 1980s were 1-3watts and didn't even have a heatsink. Hopefully that puts things in perspective. ;)
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
If your i3 is idle, even if fanless, if the case has a couple of fans I think its very reasonable to expect 40C to be a good temp. Some CPUs use less than 10 watts idle. Keep in mind that 386s of the 1980s were 1-3watts and didn't even have a heatsink. Hopefully that puts things in perspective. ;)
Heh, I had a 486 that DID have a heatsink (no fan though) and was actually capable of running Win95.
 

simulant

Cadet
Joined
Sep 14, 2014
Messages
2
Could anyone explain me this please?
EjsRgJ.png


Why can I see 4 cores when I have dual core processor? I have intel atom d510 so it has 4 threads, but i don't believe, that it could be possible to measure temperature on thing which isn't physical.
And what means these things "194 0x0022 111 091 000 Old_age Always" which you can see on the picture please?
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
The Old_Age is just the type of value being monitored, it doesn't mean that the disk is old, that field will still say that on day 1, that's just a type.

On the processor since 0 and 1 are the same and 2 and 3 are the same I would assume it's just treating the other threads as actual cores to the system. Are 0 and 1 or 2 and 3 ever different?
 

simulant

Cadet
Joined
Sep 14, 2014
Messages
2
The Old_Age is just the type of value being monitored, it doesn't mean that the disk is old, that field will still say that on day 1, that's just a type.

On the processor since 0 and 1 are the same and 2 and 3 are the same I would assume it's just treating the other threads as actual cores to the system. Are 0 and 1 or 2 and 3 ever different?

Yes, the temperatures are usually different. Not for much degrees but they are
ckWAj4.png
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
"Hyper-Threading" exposes an extra "logical core (per each core)" to the OS as if it was an actual physical core.
They make it sound all fancy, but really it's just an extra scheduler that shares the same execution unit.
I don't think there's any way the OS can distinguish which is real, which is "fake" core.
 
Top