root/lm-sensors/trunk/prog/pwm/fancontrol.8 @ 5717

Revision 5717, 4.0 KB (checked in by khali, 6 years ago)

Add support for absolute path to hwmon devices.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1.TH FANCONTROL 8 "January 2009" "lm-sensors 3"
2.SH NAME
3fancontrol \- automated software based fan speed regulation
4
5.SH SYNOPSIS
6.B fancontrol
7.I [configfile]
8
9.SH DESCRIPTION
10\fBfancontrol\fP is a shell script for use with lm_sensors. It reads its
11configuration from a file, then calculates fan speeds from temperatures and
12sets the corresponding PWM outputs to the computed values.
13
14.SH WARNING
15Please be careful when using the fan control features of your mainboard, in
16addition to the risk of burning your CPU, at higher temperatures there will be
17a higher wearout of your other hardware components, too. So if you plan to use
18these components in 50 years, \fBmaybe\fP you shouldn't use fancontrol
19at all.  Also please keep in mind most fans aren't designed to be
20powered by a PWMed voltage.
21
22In practice it doesn't seem to be a major issue, the fans will get slightly
23warmer, just be sure to have a temperature alarm and/or shutdown call, in case
24some fan fails, because you probably won't hear it anymore ;)
25
26.SH CONFIGURATION
27For easy configuration, there's a script
28named \fBpwmconfig\fP(8) which lets you interactively write your
29configuration file for \fBfancontrol\fP. Alternatively you can write this
30file yourself using the information from this manpage.
31
32Since most of you are going to use \fBpwmconfig\fP(8) script, the config
33file syntax will be discussed last. First I'm going to describe the various
34variables available for changing \fBfancontrol\fP's behaviour:
35
36.TP
37.B INTERVAL
38This variable defines at which interval in seconds the main loop of
39\fBfancontrol\fP will be executed
40.TP
41.B FCTEMPS
42Maps PWM outputs to temperature sensors so \fBfancontrol\fP knows which
43temperature sensors should be used for calculation of new values for
44the corresponding PWM outputs.
45.TP
46.B FCFANS
47FCFANS records the association between a PWM and a fan.
48Then \fBfancontrol\fP can check the fan speed and restart it if it
49stops unexpectedly.
50.TP
51.B MINTEMP
52The temperature below which the fan gets switched to minimum speed.
53.TP
54.B MAXTEMP
55The temperature over which the fan gets switched to maximum speed.
56.TP
57.B MINSTART
58Sets the minimum speed at which the fan begins spinning. You should
59use a safe value to be sure it works, even when the fan gets old.
60.TP
61.B MINSTOP
62The minimum speed at which the fan still spins. Use a safe value here,
63too.
64.TP
65.B MINPWM
66The PWM value to use when the temperature is below MINTEMP.
67Typically, this will be either 0 if it is OK for the fan to plain
68stop, or the same value as MINSTOP if you don't want the fan to
69ever stop.
70If this value isn't defined, it defaults to 0 (stopped fan).
71.TP
72.B MAXPWM
73The PWM value to use when the temperature is over MAXTEMP.
74If this value isn't defined, it defaults to 255 (full speed).
75.PP
76The configuration file format is a bit strange:
77.IP
78.nf
79VARIABLE=chip/pwmdev=value chip/pwmdev2=value2
80VARIABLE2=...
81.fi
82.PP
83Each variable has its own line. The variable name is followed by an equal sign
84and the device=value pairs. These consist of the path to the pwm output for
85which the value is valid, equal sign followed by the value and are separated
86by a blank. Path can be absolute or relative (from /sys/bus/i2c/devices or
87/sys/class/hwmon depending on the kernel version). Example:
88.IP
89MINTEMP=hwmon0/device/pwm1=40 hwmon0/device/pwm2=54
90.PP
91You have to play with the temperature values a bit to get happy. For initial
92setup I recommend using the \fBpwmconfig\fP script. Small changes can be made by
93editing the config file directly following the rules above.
94
95.SH THE ALGORITHM
96
97\fBfancontrol\fP first reads its configuration, writes it to arrays and loops its
98main function.  This function gets the temperatures and fanspeeds from
99kernel driver files and calculates new speeds depending on temperature
100changes, but only if the temp is between MINTEMP and MAXTEMP. After that, the
101new values are written to the PWM outputs. Currently the speed increases
102quadratically with rising temperature. This way you won't hear your fans most
103of the time at best.
104
105.SH SEE ALSO
106pwmconfig(8), sensors(1).
107
108.SH AUTHOR
109.PP
110Marius Reiner <marius.reiner@hdev.de>
Note: See TracBrowser for help on using the browser.