博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

dogfox个人空间

机会就是放弃
  dogfox.cublog.cn

关于作者
姓名:dogfox
职业:工程师
年龄:33
位置:西环路中段
个性介绍:好色,内向
|| << >> ||
我的分类


安装lm-sensor检测cpu
  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了。

发表于: 2008-03-05,修改于: 2008-03-05 09:57,已浏览367次,有评论0条 推荐 投诉


网友评论
 发表评论