Chinaunix首页 | 论坛 | 博客
  • 博客访问: 172254
  • 博文数量: 55
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 620
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-04 14:13
文章分类
文章存档

2009年(1)

2008年(54)

我的朋友

分类: LINUX

2008-03-05 09:57:12

  1. sudo apt-get install lm-sensors
  2. 运行mkdev.sh脚本
    1. 用vi或者gedit建立文件mkdev.sh,内容如下:
      #!/bin/bash
      # Here you can set several defaults.
      # The number of devices to create (max: 256)
      NUMBER=32
      # The owner and group of the devices
      OUSER=root
      OGROUP=root
      # The mode of the devices
      MODE=600

      # This script doesn't need to be run if devfs is used
      if [ -r /proc/mounts ] ; then
      if grep -q "/dev devfs" /proc/mounts ; then
      echo "You do not need to run this script as your system uses devfs."
      exit;
      fi
      fi

      i=0;

      while [ $i -lt $NUMBER ] ; do
      echo /dev/i2c-$i
      mknod -m $MODE /dev/i2c-$i c 89 $i || exit
      chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
      i=$[$i + 1]
      done
      #end of file

  1. 并使文件可执行,sudo chmod 755 mkdev.sh
  2. 运行mkdev.sh,sudo ./mkdev.sh
     4.   sudo sensors-detect,回答一些问题,基本全是按默认来的。只有最后选择ISA bus还是SMBus Bus时可以凭个人喜好,不过我还是选的ISA。最后会有一个需加载的模块列表,类似于

#----cut here----
# Chip drivers
w83627hf
#----cut here----


      5. 记住这些,然后 sudo /etc/init.d/module-init-tools把以上列表中模块逆序添加进/etc/modules文件中

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
mousedev
psmouse

# For Im-sensors, i2c modules
w83627hf


       6. 手动加载模块并更新依赖关系

sudo modprobe w83627hf
sudo depmod -a <并非必需>
sudo update-modules <并非必需>


        7. 最后,测试sensor输出

truth@dogfox:~$ sudo sensors
w83627hf-isa-0290
Adapter: ISA adapter
VCore 1:   +1.54 V  (min =  +0.00 V, max =  +4.08 V)              
VCore 2:   +1.33 V  (min =  +0.00 V, max =  +4.08 V)              
+3.3V:     +2.74 V  (min =  +2.82 V, max =  +3.79 V)       ALARM  
+5V:       +5.21 V  (min =  +4.49 V, max =  +6.85 V)              
+12V:     +11.98 V  (min =  +4.50 V, max = +15.50 V)              
-12V:     -11.78 V  (min =  -9.73 V, max =  +1.04 V)       ALARM  
-5V:       -5.05 V  (min =  -5.05 V, max =  -7.71 V)       ALARM  
V5SB:      +5.24 V  (min =  +5.03 V, max =  +5.43 V)              
VBat:      +3.25 V  (min =  +2.64 V, max =  +2.06 V)       ALARM  
fan1:        0 RPM  (min = 1854 RPM, div = 8)              ALARM  
fan2:        0 RPM  (min =  675 RPM, div = 8)              ALARM  
fan3:     2556 RPM  (min = 5273 RPM, div = 8)              ALARM  
temp1:       +19°C  (high =    +8°C, hyst =   -87°C)   sensor = thermistor   ALARM   
temp2:     +38.0°C  (high =  +100°C, hyst =   +95°C)   sensor = diode           
temp3:     +23.0°C  (high =  +100°C, hyst =   +95°C)   sensor = thermistor           
vid:      +0.000 V  (VRM Version 10.0)
alarms:   
beep_enable:
          Sound alarm enabled


         8.  重启


         9.    如果是debian,可以sudo apt-get install sensors-apple,我现在使的Ubuntu Breezy的库里竟然没有这个包,只好从Debian站点上下载.deb文件用sudo dpkg -i xxxx.deb安装的。重启X后,Gnome的“添加到面板”里就应该有个叫“hardware sensors monitor”的Applet了。
阅读(3100) | 评论(0) | 转发(0) |
0

上一篇:升级compiz 到0.6.99

下一篇:天女散花

给主人留下些什么吧!~~