Easy way to get all HDD temps from console?

ajgnet

Explorer
Joined
Jun 16, 2020
Messages
65
Hello and Happy Holidays. Is there a recommended way to get current hdd temps from the cli? I know I can use smartctl but I'm wondering if there is a better way to get all HDD temps? Thanks.
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919

ajgnet

Explorer
Joined
Jun 16, 2020
Messages
65
Is this for TrueNAS Scale or Core? I am running scale but the scripts appear for core.
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
I would indeed assume they were written for Core. But a test should not be too dangerous ...
 
Joined
Oct 22, 2019
Messages
3,641
References to paths might differ.

I don't have a SCALE box to test, but on an Arch-based Linux distro, I get errors such as these:
Code:
get_hdd_temp.sh: line 47: /usr/local/sbin/smartctl: No such file or directory
sysctl: cannot stat /proc/sys/hw/ncpu: No such file or directory
=== CPU () ===

=== DRIVES ===

On Debian Linux, the full path is actually /usr/sbin/smartctl

Since SCALE is Debian-based, it might differ slightly.

However, the script in general needs to be adopted from a FreeBSD base to a Debian Linux base.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
It would be nice to just have a widget that would show the desired information in the GUI, but lack of that, one option is to use the Multi-Report script, located in the recourses section. It will provide an email report of your drives and pool status, which include the drive temps. Here is a snippet of the data. Also, read the last few pages of the Discussion, I posted the latest version yesterday, it's beta but I expect it to be final this week. I presently only have one change planned, to remove the word "beta" from the file. Well unless something comes up.

Screenshot 2022-12-27 140545.png
 
Last edited:

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
The Multi-Repot script is what I have using for a while now and it is a great tool. Thumbs up!!
 
Joined
Oct 22, 2019
Messages
3,641
The Multi-Repot script is what I have using for a while now and it is a great tool. Thumbs up!!
It also gave me a scare when I ran it for the first time! :eek:

Code:
Creating the new file...
 
Humm, kind of slow...
 
Do you have enough RAM? Looks like about 8KB.  Troubleshooting...
 
I found the problem, the system was identified as a Tandy TRS-80 Model 1
Wow! That was a fantastic consumer computer, in it's day.
Adjusting for the 1.774 MHz clock rate...
Success!


I can't believe I fell for it. :tongue: I must be tired...
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
LOL, some old time humor I guess. It was a hot new item that I got to play with when I was 16 and I also learned how to program in machine code using 80 column punch cards at the local community college. I was fortunate to have a science teacher who sponsored me for a special program where one student from each local high school could participate. I was one of seven.
 

ajgnet

Explorer
Joined
Jun 16, 2020
Messages
65
This multi_report script is awesome. Thanks so much - exactly what I was looking for.
 
Top