Changeset 5330
- Timestamp:
- 09/09/08 18:18:27 (2 months ago)
- Files:
-
- lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol (modified) (8 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol.8 (modified) (1 diff)
- lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig (modified) (9 diffs)
- lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig.8 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol
r5271 r5330 65 65 MINPWM=`egrep '^MINPWM=.*$' $1 | sed -e 's/MINPWM=//g'` 66 66 MAXPWM=`egrep '^MAXPWM=.*$' $1 | sed -e 's/MAXPWM=//g'` 67 67 68 68 # Check whether all mandatory settings are set 69 69 if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]] … … 80 80 81 81 # write settings to arrays for easier use and print them 82 echo82 echo 83 83 echo "Common settings:" 84 84 echo " INTERVAL=$INTERVAL" 85 85 86 86 let fcvcount=0 87 87 for fcv in $FCTEMPS … … 154 154 155 155 if [ -f "$1" ] 156 then 156 then 157 157 LoadConfig $1 158 158 else … … 178 178 SYSFS=1 179 179 DIR=$SDIR 180 fi 180 fi 181 181 fi 182 182 cd $DIR … … 274 274 minpwm=${AFCMINPWM[$fcvcount]} 275 275 maxpwm=${AFCMAXPWM[$fcvcount]} 276 276 277 277 read tval < ${tsens} 278 278 if [ $? -ne 0 ] … … 298 298 pwmpval=`echo ${pwmpval} | cut -d' ' -f1` 299 299 fi 300 300 301 301 # If fanspeed-sensor output shall be used, do it 302 302 if [[ -n ${fan} ]] … … 315 315 fanval=1 # set it to a non zero value, so the rest of the script still works 316 316 fi 317 317 318 318 # debug info 319 319 if [ "$DEBUG" != "" ] … … 332 332 echo "fanval=$fanval" 333 333 fi 334 334 335 335 if (( $tval <= $mint )) 336 336 then pwmval=$minpwm # below min temp, use defined min pwm 337 337 elif (( $tval >= $maxt )) 338 338 then pwmval=$maxpwm # over max temp, use defined max pwm 339 else 339 else 340 340 # calculate the new value from temperature and settings 341 341 pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol.8
r4699 r5330 26 26 .SH CONFIGURATION 27 27 For easy configuration, there's a script 28 named \fBpwmconfig\fP(8) which lets you interactively write your 29 configuration file for \fBfancontrol\fP. Alternatively you can write this 28 named \fBpwmconfig\fP(8) which lets you interactively write your 29 configuration file for \fBfancontrol\fP. Alternatively you can write this 30 30 file yourself using the information from this manpage. 31 31 lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig
r5329 r5330 72 72 echo $0: 'No sensors found! (modprobe sensor modules?)' 73 73 exit 1 74 fi 74 fi 75 75 fi 76 76 … … 332 332 if [ "$X" = "y" -o "$X" = "Y" -o "$X" = "" ] 333 333 then 334 PLOT=y 334 PLOT=y 335 335 fi 336 336 else … … 359 359 while [ $pwm -ge 0 ] 360 360 do 361 pwmset $P $pwm 361 pwmset $P $pwm 362 362 sleep $PDELAY 363 363 if [ $? -ne 0 ] 364 364 then 365 pwmdisable $P 365 pwmdisable $P 366 366 echo '^C received, aborting...' 367 367 rm -f $TMP1 $TMP2 368 368 exit 1 369 fi 369 fi 370 370 # this will return the first field if there's only one (sysfs) 371 371 S=`cat $F | cut -d' ' -f2` … … 385 385 if [ "$S" = "0" -o "$S" = "-1" ] 386 386 then 387 pwmdisable $P 387 pwmdisable $P 388 388 echo " Fan Stopped at PWM = $pwm" 389 389 if [ $pwm -eq $MAX ] … … 406 406 fi 407 407 done 408 pwmdisable $P 408 pwmdisable $P 409 409 if [ "$PLOT" = "y" ] 410 410 then … … 431 431 echo '^C received, restoring PWM and aborting...' 432 432 exit 1 433 fi 433 fi 434 434 let pwmactivecount=0 435 435 let count=1 … … 464 464 echo '^C received, aborting...' 465 465 exit 1 466 fi 466 fi 467 467 # this will return the first field if there's only one (sysfs) 468 468 S=`cat $j | cut -d' ' -f2` … … 766 766 if [ "$tempss" = "None (Do not affect this PWM output)" ] 767 767 then 768 768 769 769 break; 770 770 else … … 892 892 done 893 893 break ;; 894 894 895 895 *) 896 896 echo "No such option. Enter a number." lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig.8
r4699 r5330 15 15 It attempts to briefly stop each fan using the PWM controls. It then 16 16 attempts to restore each fan to full speed after testing. However, it 17 is \fBvery important\fP that you physically verify that the fans have 17 is \fBvery important\fP that you physically verify that the fans have 18 18 been returned to full speed after the program has completed. 19 19 20 20 .SH WARNING 21 21 This program will stop your fans, one at a time, for approximately 5 seconds each. 22 This may cause your processor temperature to rise. Verify that all fans are running 22 This may cause your processor temperature to rise. Verify that all fans are running 23 23 at normal speed after this program has exited. 24 24
