djoole
Contributor
- Joined
- Oct 3, 2011
- Messages
- 158
Everything is in the topic.
I would like to make a script to report all of this monitoring.
I've found the command 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
But it outputs an error that i can't solve :
For mobo and GPU temp, didn't find anything.
Any help appreciated! :)
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"
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! :)