Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1371230
  • 博文数量: 244
  • 博客积分: 3321
  • 博客等级: 中校
  • 技术积分: 2704
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-26 08:17
个人简介

微信公众号:杰夫弹弹看

文章分类

全部博文(244)

文章存档

2018年(4)

2017年(32)

2016年(25)

2015年(28)

2014年(27)

2013年(34)

2012年(25)

2011年(30)

2010年(39)

分类: LINUX

2010-12-26 00:03:00

前段时间本想根据温度来调节功耗的,所以就想看看linux下给出的接口,能否方便的读取,进而调节。
刚开始在ubuntu下运行
#sensors
提示没有安装相关的驱动。
这时要运行sensors-detect
#sensors-detect
其中只要回答yes即可,最后的出现
Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): no
To load everything that is needed, add this to one of the system
initialization scripts (e.g. /etc/rc.d/rc.local):

#----cut here----
# Chip drivers
modprobe coretemp
modprobe it87
/usr/local/bin/sensors -s
#----cut here----

如果马上想用不想重启,那么就直接使用modprobe安装相关的驱动。

#modprobe coretemp
#modprobe it87

最后来验证,
#sensors

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

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

it8718-isa-0a10
Adapter: ISA adapter
in0:         +1.07 V  (min =  +0.03 V, max =  +0.02 V)   ALARM
in1:         +2.16 V  (min =  +0.00 V, max =  +4.08 V)
in2:         +2.16 V  (min =  +0.00 V, max =  +4.08 V)
in3:         +3.02 V  (min =  +0.00 V, max =  +4.08 V)
in4:         +2.16 V  (min =  +0.00 V, max =  +4.08 V)
in5:         +0.06 V  (min =  +0.00 V, max =  +4.08 V)
in6:         +0.10 V  (min =  +0.00 V, max =  +4.08 V)
in7:         +2.96 V  (min =  +0.00 V, max =  +4.08 V)
Vbat:        +3.30 V
fan1:       1391 RPM  (min =   10 RPM)
fan2:       1220 RPM  (min =    0 RPM)
fan3:          0 RPM  (min =    0 RPM)
temp1:       +19.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode
temp2:       +28.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:       -70.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode
cpu0_vid:   +0.000 V
成功,呵呵。

当然,可以参考下面的文章,也有相关的介绍。




阅读(1388) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~