Supermicro Fan Control

I’ve recently setup Truenas SCALE with a Supermicro motherboard. I discovered @Glorious1 's fan scripts, but noticed they only work on Core and not Scale with the main difference being ‘camcontrol’ isn’t available on Scale.

Could someone running Core provide the output of /sbin/camcontrol devlist ? I think lsblk could be used, but I’d like to see the exact output, but more importantly the format, that is being used by camcontrol. Thanks!

Jimbo, I’ve completely rewritten the script for SCALE, but only the script for single-fan-zone boards. It’s been bulletproof for 4 months or so.

There are other difference than camcontrol, and many improvements. Also it is now written for zsh instead of bash.

The script for double fan zones is a lot harder for me to revise, since I don’t have such a board. Which do you have?

Thank you for the response. My use case best fits with the single zone script. Is that something you’d be willing to share (assuming it isn’t already and I somehow missed it)?

No, I haven’t formally made it available because I don’t have the 2-zone version, which is what most people want. I’ll attach it here. Remove “.txt” from the zipfile name, unzip, and make spinpid.zsh executable if necessary. Of course you’ll have to go through the config file and transfer/update your config.

EDIT:
spinpid.zip.txt (9.4 KB)

This is updated with Jimbo’s suggestions. By the way, friendly warning, if you have the script start with a postinit command, don’t test the shutdown function by setting a low ShutDownLimit, as yours truly did. It’s tricky to claw your way out of that one.

1 Like

You can also try @Stux hybrid fan control script.

2 Likes

Thank you! I’ll give it a go. Really appreciate you sharing it out.

Thank you for the link! I’ll this one a look over as well.

Thank you Jimbo. Sheesh! I changed the file, and also updated the actual credentials.

1 Like

Working great!

Two small changes I’d make:
Create the LOGERR file if it doesn’t exist, or clobber it

LOGERR="/tmp/spin_err"
echo "" > $LOGERR

Change the switch to uppercase p:
/sbin/shutdown -p now/sbin/shutdown -P now

Thanks Jimbo.

  1. I’m concerned about the message in the log, “Received a response with unexpected ID 0 vs. 5” I’ve never seen such a thing. Do you have any idea where that’s coming from? I guess it is not an error that triggered the error reporting. If it happens again, please try changing your setpoint in the config to be precise to tenths instead of hundredths of a degree.

  2. I don’t quite follow the LOGERR suggestion. Early in the script LOGERR is deleted. As I recall it is created again when anything is written to it. But you seem like you know your stuff so please explain.

  3. Thanks for catching that; I’ll make that change.

Apologies for lack of explanation.

  1. It only happened once when I first ran the script. The only other time I’ve seen it was when running the original spintest.sh; even then I only ever saw it once. In both cases I was using a setpoint in the hundredths degree. I’ll try to the tenth degree. I did not see any catastrophic or odd behavior when those appeared.
  2. $LOGERR is deleted if it exists, with rm "$LOGERR". On first run the rm call will fail as it hasn’t existed yet (or was deleted). The script will continue to run, but it will log an error to std.out and/or the log file. You could use an if/else block to delete only if it existed, but echo "" > $LOGERR will create it or clear the content if it does exist.

I’ve definitely had to tinker with the setpoint, but found some values that work for my setup. Awesome work, again!

Thanks Jimbo. You definitely know your stuff. You sound like ChatGPT.
:thinking:
Hey, are you ChatGPT? :wink:

1 Like

@Glorious1, I’ve been running the script for a week now without any issues. The “Received a response with unexpected ID 0 vs. 5” issue disappeared once I removed the decimal value.

Cheers!

1 Like

To me, that’s an insult not a compliment (sound like ChatGPT). :joy:

Chatgpt routinely lies to me about the ability of whatever language I’m working in :joy:. I’m sure he meant it in a positive light :slightly_smiling_face:.