You know, there are only two modes which spin the peripheral fans at 100%, Max and Heavy IO.
All the other modes spin the fans in relation the CPU temperature, which is not what you want.
If a supermicro system can only be cool enough on max, you should check what fans are connected to where, and run a custom fan controller script.
Here's mine: https://forums.freenas.org/index.php?threads/script-hybrid-cpu-hd-fan-zone-controller.46159/
Should work on x9 but will probably need a BIOS update.
I was of the understanding that fan scripts, example: Fan Scripts for Supermicro Boards Using PID Logic wouldn't work with an X9 board because they attempt to use ipmitool to set fan speed at a granular level (0 - 100%, with 64 increments), but a very brief glance at your script suggests it might work with an X9 board as you take a different approach, setting fan speed by changing the applied duty cycle. Is that a correct assertion? Sorry, I don't have time to review in more detail as I'm getting yelled out to go eat dinner. The server is almost loud enough such that I don't hear that dinner bell though. :)
$hd_fan_duty_high = 100 = "Full Speed" Profile
$hd_fan_duty_med_high = 80 = ??? "Heavy I/O" = 75%
$hd_fan_duty_med_low = 50 = "Standard Speed" Profile
$hd_fan_duty_low = 30 = "Optimal Speed Profile"
Two complications I see:
- $ipmitool = "/usr/local/bin/ipmitool" = With an ESXi install, impitool in FreeNAS shell can only be used by remote log in, i.e. ipmitool -I lanplus -H $IP -U $user -P $pass cmd and that directory don't exist.
- sysctl -a dev.cpu = Also an ESXi complication, cpu temperature is not passed through to FreeNAS. The only way to snag it that I'm aware of is by impitool, i.e. ipmitool -I lanplus -H $IP -U $user -P $pass sensor | grep "CPU1 Temp" | awk '{print $1, $4}'