Bonsoir.
Ce sujet m'intéresse, ce script, il fonctionne comment ?
#!/bin/bash
# Automatic fan controller
# Tested on a eee 1005ha running Ubuntu 9.10 Karmic Koala
# Test with 'sudo eeefan background'.
# If works, 'sudo cp eeefan /etc/rc2.d/S99eeefan'
# and reboot.
temperature_reading=/sys/devices/virtual/thermal/thermal_zone0/temp
fan_control=/sys/devices/platform/eeepc/hwmon/hwmon1/pwm1
fan_manual_switch=/sys/devices/platform/eeepc/hwmon/hwmon1/pwm1_enable
# Set critical temperature
TEMP_CRITICAL=57
# Set critical temperature interval size. See figure for details
TEMP_INTERVAL_SIZE=5
# Maximum fan speed
FAN_SPEED_MAX=55
eeefanupdate() {
# Get temperature reading
TEMP=$(cat $temperature_reading)
TEMP=$(($TEMP / 1000))
# Calculate optimum fan speed
X=$(echo "$FAN_SPEED_MAX*1/(1+e(-($TEMP-$TEMP_CRITICAL)/$TEMP_INTERVAL_SIZE))" | bc -q -l)
# Workaround to convert it to nearest integer
FAN_SPEED=$(echo "scale=0; $X/1.0" | bc -q -l)
# Set fan speed
FAN_SPEED=$(($FAN_SPEED * 250 / 100))
echo $FAN_SPEED > $fan_control
}
# Turn on manual fan control
echo 1 > $fan_manual_switch
# Run eeefanu, then wait 10 seconds.
while [ 1 ]
do
eeefanupdate
sleep 10
done
Si j'ai bien compris il permait de modifié la vitesse du ventillo ?