TrueNAS Scale on WD PR4100

SuperDupe

Cadet
Joined
Mar 19, 2024
Messages
3
Hello, I have been using TrueNAS Core on my three WD PR4100's for years now. I found a bash hardware control script that has worked great. That script allowed control of the LCD and fans. Last night, I decided to upgrade to Scale. That process was easy and I really like the new features Scale offers. However, the old bash script isn't fully working. It still controls the LCD, but the fan is running at 100% and is pretty loud. Any chance someone out there has come up with or found a new script to control hardware in the PR4100 with Scale? This is the script I have been using. I get it is related to BSD, but hoping someone smarter than me has figured this out. :)

 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Hey @SuperDupe

Looks like that script is written for/depends on a few FreeBSD modules and behaviors for monitoring temperatures; since SCALE is based on Debian Linux, it would need to be ported over to Debian. I don't have the hardware myself to test, but at a quick glance it should be possible as it looks like the control is based on echoing commands to a serial device enumerated under /dev/tty.
 

SuperDupe

Cadet
Joined
Mar 19, 2024
Messages
3
Hey @SuperDupe

Looks like that script is written for/depends on a few FreeBSD modules and behaviors for monitoring temperatures; since SCALE is based on Debian Linux, it would need to be ported over to Debian. I don't have the hardware myself to test, but at a quick glance it should be possible as it looks like the control is based on echoing commands to a serial device enumerated under /dev/tty.
Thanks @HoneyBadger !

I scoured around on the internet and found the answer. To access the serial device on the NAS, the original FreeBSD script used tty=/dev/cuau3. I found some things referring to the command or location in Linux as being different. I replaced the cucau3 with tty=/dev/ttyS2, and the script was able to communicate with the serial device!

Furthermore for anyone with this hardware and using TrueNAS, I found a newer version of the script listed above by a programmer who is continuing to refine it... In fact, we have talked and he is working on making it neutral between FreeBSD and Linux... Thank link to his work is here.

 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I recently updated my fan control script for scale. This may come in handy because it uses similar code for determining cpu and disk temperature as per the one you are using, but I've added scale/core compatibility.


ie

Code:
my $core_temps = $platform eq "FreeBSD" ?
		`sysctl -a dev.cpu | egrep -E \"dev.cpu\.[0-9]+\.temperature\" | awk '{print \$2}' | sed 's/.\$//'`
	:
		`sensors -A | egrep 'Core [0-9]+:' | awk '{print \$3}' | sed 's/[^0-9\.]*//g'`
	;
 
Top