2

My server supports IPMI, so I can run a script like this:

fanspeed() {
    # 0 C => 10, 55 C => 10, 65 C => 100
    sensors -j |
        jq '[.[]["temp1"]["temp1_input"]] |                                                   
              (max-55)*(100/(65-55)) |                                                        
               if . < 10 then 10 else if . > 100 then 100 else .|floor end end';
}

autofan() {
    setspeed() {
        ipmitool -I lanplus -H drac -U root -P password raw 0x30 0x30 0x02 0xff $@
    }
    while true; do
        fanspeed=`fanspeed`
        printf "$fanspeed "$(setspeed $fanspeed)
        sleep 1
    done
}

This keeps the CPU temp < 65 C by increasing the fanspeed when the CPU temp > 55 C.

But this sounds like a job for fancontrol. Can fancontrol use IPMI to control the fan?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.