can you please write a step by step guide for this script to execute via cron, in a bit Noob friendly manner. thank youi modded https://gist.github.com/fkleon/6147471#file-temperature-sh to create a log file instead of an email. in case anyone wants it you can find it here https://gist.github.com/i3luefire/242844141fde57d5cafd#file-temperature-sh
I can do that later. But have you read the manual? http://web.freenas.org/images/resources/freenas9.2.1/freenas9.2.1_guide.pdfcan you please write a step by step guide for this script to execute via cron, in a bit Noob friendly manner. thank you
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 somethingI can do that later. But have you read the manual? http://web.freenas.org/images/resources/freenas9.2.1/freenas9.2.1_guide.pdf
what user are you setting the cron job up to be? i believe that it has to be ran as root.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
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 correctwhat user are you setting the cron job up to be? i believe that it has to be ran as root.
Everything is in the topic.
I would like to make a script to report all of this monitoring.
I've found the commandfor CPU temp, but sysctl seems reporting wrong temperature (around 40°C).Code:sysctl -a |egrep -E "cpu\.[0-9]+\.temp"
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! :)
sysctl -a | grep empe
smartctl -a /dev/ada0 | grep empe
Heh, I had a 486 that DID have a heatsink (no fan though) and was actually capable of running Win95.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. ;)
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?