momo zone

调核人的blog

搞定sensors 温度和转速监控

之前就了解到sensors能够显示风扇转速和温度等信息,但执行的时候提示:

No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
这两天就研究了一下原因,最终搞定。
首先按照提示执行sensors-detect 检查系统已有的传感器。
sensors-detect
# sensors-detect revision 5818 (2010-01-18 17:22:07 +0100)
# System: System manufacturer System Product Name
# Board: ASUSTeK Computer INC. P5B-Deluxe

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you’re doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
Silicon Integrated Systems SIS5595…                       No
VIA VT82C686 Integrated Sensors…                          No
VIA VT8231 Integrated Sensors…                            No
AMD K8 thermal sensors…                                   No
AMD Family 10h thermal sensors…                           No
AMD Family 11h thermal sensors…                           No
Intel Core family thermal sensor…                         Success!
    (driver `coretemp’)
Intel Atom thermal sensor…                                No
Intel AMB FB-DIMM thermal sensor…                         No
VIA C7 thermal sensor…                                    No
VIA Nano thermal sensor…                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): YES
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor’…                   No
Trying family `SMSC’…                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek’…               Yes
Found `Winbond W83627DHG Super IO Sensors’                  Success!
    (address 0x290, driver `w83627ehf’)
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor’…                   No
Trying family `SMSC’…                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek’…               No
Trying family `ITE’…                                      No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don’t find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): YES
Probing for `IPMI BMC KCS’ at 0xca0…                      No
Probing for `IPMI BMC SMIC’ at 0xca8…                     No

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (yes/NO): yes
Probing for `National Semiconductor LM78′ at 0x290…       No
Probing for `National Semiconductor LM79′ at 0x290…       No
Probing for `Winbond W83781D’ at 0x290…                   No
Probing for `Winbond W83782D’ at 0x290…                   No

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `w83627ehf’:
  * ISA bus, address 0x290
    Chip `Winbond W83627DHG Super IO Sensors’ (confidence: 9)

Driver `coretemp’:
  * Chip `Intel Core family thermal sensor’ (confidence: 9)

最终检测到了intel core CPU的内部温度传感器,那么执行modprobe coretemp ,再执行sensors 就看到了温度显示。
那么还有

Winbond W83627DHG Super IO Sensors这个未知的东西,执行modprobe w83627ehf 提示:

insmod /lib/modules/2.6.31-6-generic/kernel/drivers/hwmon/w83627ehf.ko
FATAL: Error inserting w83627ehf (/lib/modules/2.6.31-6-generic/kernel/drivers/hwmon/w83627ehf.ko): Device or resource busy

dmesg :

[10910.136417] w83627ehf: Found W83627DHG chip at 0x290
[10910.136481] ACPI: I/O resource w83627ehf [0x295-0x296] conflicts with ACPI region HWRE [0x290-0x299]
[10910.136484] ACPI: Device needs an ACPI driver

好像是ACPI I/O 冲突, 只能google 一下了,结果发现同样问题的还真多(估计大部分都是asus的主板),解决方法是添加内核启动参数 acpi_enforce_resources=lax 

重启然后重新加载这个模块竟然显示出了风扇的转速和cpu电压了: 

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +66.0°C  (high = +84.0°C, crit = +100.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +65.0°C  (high = +84.0°C, crit = +100.0°C)

w83627dhg-isa-0290
Adapter: ISA adapter
VCore:       +1.18 V  (min =  +0.00 V, max =  +1.74 V)
in1:        +12.25 V  (min =  +1.85 V, max =  +8.87 V)   ALARM
AVCC:        +3.23 V  (min =  +2.11 V, max =  +0.10 V)   ALARM
3VCC:        +3.23 V  (min =  +0.34 V, max =  +0.42 V)   ALARM
in4:         +1.68 V  (min =  +1.93 V, max =  +0.31 V)   ALARM
in5:         +1.56 V  (min =  +1.80 V, max =  +1.46 V)   ALARM
in6:         +5.25 V  (min =  +6.45 V, max =  +1.51 V)   ALARM
VSB:         +3.25 V  (min =  +2.27 V, max =  +1.38 V)   ALARM
VBAT:        +3.23 V  (min =  +1.25 V, max =  +2.34 V)   ALARM
Case Fan:   5720 RPM  (min = 15000 RPM, div = 2)  ALARM
CPU Fan:    1527 RPM  (min = 2205 RPM, div = 4)  ALARM
Aux Fan:       0 RPM  (min = 7031 RPM, div = 32)  ALARM
fan4:          0 RPM  (min = 4687 RPM, div = 32)  ALARM
fan5:       3792 RPM  (min = 3857 RPM, div = 2)  ALARM
Sys Temp:    +43.0°C  (high = +70.0°C, hyst = +87.0°C)  sensor = thermistor
CPU Temp:    +52.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = diode
AUX Temp:   +124.5°C  (high = +80.0°C, hyst = +75.0°C)  ALARM  sensor = thermistor

sensors 这个软件包中还包括另外两个比较重要的程序:
pwmconfig 检查系统各个测速风扇,并生成设定档 。
fancontrol 依据pwmconfig  生成的设定档控制个测速风扇的速度。3

这里有个文章可以参考 : http://wiki.archlinux.org/index.php/Fan_Speed_Control

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: