Fan Scripts for Supermicro Boards Using PID Logic

Fan Scripts for Supermicro Boards Using PID Logic 2020-08-20, previous one was missing a file

sanello

Cadet
Joined
Jun 8, 2023
Messages
4
Hmm, I see my post in your profile. Anyway, would you please try it out? I'm attaching it with config file here. You'll have to edit it with settings from your current one.
Thank you! I believe it looks good so far. Going to give it a couple of days while I tune the settings a bit.

Code:
****** SETTINGS ******
CPU zone 0; Peripheral zone 1
CPU fans min/max duty cycle: 20/100
PER fans min/max duty cycle: 40/100
CPU fans - measured RPMs at 30% and 100% duty cycle: 3700/7200
PER fans - measured RPMs at 30% and 100% duty cycle: 800/2100
Drive temperature setpoint (C): 34.8
Number of warmest drives to include in mean: 5
Kp=4, Kd=40
Drive check interval (main cycle; minutes): 6
CPU check interval (seconds): 5
CPU reference temperature (C): 40
CPU scalar: 6
Reading fan duty from board
Getting CPU temperatures via sysctl

Key to drive status symbols:  * spinning;  _ standby;  ? unknown                              Version 2023-12-01

Thursday, Nov 30                                                              CPU         New_Fan%  New_RPM_____________________
          ada0 ada1 ada2 ada3 ada4 ada5 ada6 Tmax Tmean   ERRc      P      D TEMP MODE    CPU PER   FANA  FAN1  FAN2  FAN3  FAN4
22:18:18  *39  *41  *41  *41  *40  *23  *24  ^41  40.40   5.60  22.40  37.33   34 Full     20 100   2100   ---   ---  3200   ---
 

Sumppi

Dabbler
Joined
Dec 29, 2019
Messages
14
The control script has been awesome, and I've been using it years!
I recently updgraded from X10SSL to Epyc-based H11SSL, and the script works nicely with new the system.

H11SSL has more two more FAN-headers compared to the old one (FAN5 and FANB),
so I updated the script accordingly.
In case someone is interested, here's the diff:

Code:
diff --git a/spinscripts_2020-08-20/spinpid2.sh b/spinscripts_2020-08-20/spinpid2.sh
index 7cca028..42cbcf0 100755
--- a/spinscripts_2020-08-20/spinpid2.sh
+++ b/spinscripts_2020-08-20/spinpid2.sh
@@ -41,13 +41,13 @@ function get_disk_name {
 function print_header {
    DATE=$(date +"%A, %b %d")
    let "SPACES = DEVCOUNT * 5 + 42"  # 5 spaces per drive
-   printf "\n%-*s %3s %16s %29s \n" $SPACES "$DATE" "CPU" "New_Fan%" "New_RPM_____________________"
+   printf "\n%-*s %3s %16s %29s \n" $SPACES "$DATE" "CPU" "New_Fan%" "New_RPM__________________________________"
    echo -n "          "
    while read -r LINE ; do
       get_disk_name
       printf "%-5s" "$DEVID"
    done <<< "$DEVLIST"             # while statement works on DEVLIST
-   printf "%4s %5s %6s %6s %6s %3s %-7s %s %-4s %5s %5s %5s %5s %5s" "Tmax" "Tmean" "ERRc" "P" "D" "TEMP" "MODE" "CPU" "PER" "FANA" "FAN1" "FAN2" "FAN3" "FAN4"
+   printf "%4s %5s %6s %6s %6s %3s %-7s %s %-4s %5s %5s %5s %5s %5s %5s %5s" "Tmax" "Tmean" "ERRc" "P" "D" "TEMP" "MODE" "CPU" "PER" "FANA" "FANB" "FAN1" "FAN2" "FAN3" "FAN4" "FAN5"
 }

 #################################################
@@ -82,7 +82,9 @@ function read_fan_data {
    FAN2=$(echo "$SDR" | grep "FAN2" | grep -Eo '[0-9]{3,5}')
    FAN3=$(echo "$SDR" | grep "FAN3" | grep -Eo '[0-9]{3,5}')
    FAN4=$(echo "$SDR" | grep "FAN4" | grep -Eo '[0-9]{3,5}')
+   FAN5=$(echo "$SDR" | grep "FAN5" | grep -Eo '[0-9]{3,5}')
    FANA=$(echo "$SDR" | grep "FANA" | grep -Eo '[0-9]{3,5}')
+   FANB=$(echo "$SDR" | grep "FANB" | grep -Eo '[0-9]{3,5}')

 }

@@ -462,7 +464,7 @@ while true ; do
        read_fan_data


-   printf "%7s %6s %6.6s %4s %-7s %3d %3d %6s %5s %5s %5s %5s" "${ERRc:----}" "${P:----}" "${D:----}" "$CPU_TEMP" $MODEt $DUTY_CPU $DUTY_PER "${FANA:----}" "${FAN1:----}" "${FAN2:----}" "${FAN3:----}" "${FAN4:----}"
+   printf "%7s %6s %6.6s %4s %-7s %3d %3d %6s %5s %5s %5s %5s %5s %5s" "${ERRc:----}" "${P:----}" "${D:----}" "$CPU_TEMP" $MODEt $DUTY_CPU $DUTY_PER "${FANA:----}" "${FANB:----}" "${FAN1:----}" "${FAN2:----}" "${FAN3:----}" "${FAN4:----}" "${FAN5:----}"
 
Top