Ubuntu'da Lm-sensor yapılandırılması

From Lapis Wiki

Jump to: navigation, search

Giriş

Ubuntu lm-sensor adı verilen bir yazılımla (hem lm-sensorle hemde lm-sensorun sağladığı bilgiyle başka bir yazılım aracılığı ile) fan devri , işlemci ısısı ve diğer sensor verilerini görüntüleyebilir.

Uyarı: IBM Thinkpad kullanıcıları lm-sensoru kullanmamalı.

Not: Her ne kadar makalede Ubuntu desek de, Debian Etch, ve Debian temelli E-live , Dream Linux altında da çalışmaktadır.

Lm-sensor'u Kurma ve Yapılandırma

İlk olarak Lm-sensor paketini kurun.

sudo aptitude lm-sensors

Şimdi, /usr/share/lm-sensors dizininde mkdev.sh adlı bir dosya oluşturun (bunu yapmanız için root haklarına sahip olmalısınız: sudo kullanın)

Aşağıdaki kod düzenini, herhangi bir metin düzenliyicisi ile mkdev.sh adı altında açtığımız dosyanın içerisine yapıştırın ve kaydedin.


 #!/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

Daha sonra dosyayı çalıştırılabilir hale getirin:

chmod 755 mkdev.sh

Ve sonra mkdev.sh betiği çalıştırın:

sudo ./mkdev.sh

3. sensors-detect komutunu verin ve sorulan sorulara YES/NO şeklinde cevap verin.

sudo sensors-detect

Aşağıdaki örnekte sensors-detect komutunun bir çıktısı mevcuttur:

 #************************************************* *****************************
 To make the sensors modules behave correctly, add these lines to
 /etc/modules:

 #----cut here----
 # I2C adapter drivers
 i2c-viapro
 i2c-isa
 # I2C chip drivers
 eeprom
 it87
 #----cut here---- 


Ve, /etc/init.d/module-init-tools komutunu çalıştırın...

Sensors modullarını doğru bir şekilde yüklenebilmesi için aşağıdaki satırları /etc/modprobe.d/local dosyasının içine ekleyin ve sonra update-modules komutunu çalıştırın:



Kod: Eklenecek satırlar
 
    # I2C module options
    alias char-major-89 i2c-dev
    
	


Bu örnekte,Bizim /etc/modules içerisine eklemiş olduğumuz sürücüler vardır


 #*************************************************************** 
 # /etc/modules: kernel modules to load at boot time.
 #
 # This file should contain the names of kernel modules that are
 # to be loaded at boot time, one per line. Comments begin with
 # a "#", and everything on the line after them are ignored. 

 psmouse
 mousedev
 ide-cd
 ide-disk
 ide-generic
 lp

 #For lm-sensors, i2c modules
 it87
 i2c-viapro
 i2c-isa

 #end of file!
 #*****************************************


İpucu! Eğer /etc/modprobe.d/local dosyasını bulamadıysanız ve alias char-major-89 i2c-dev satırı /etc/modprobe.d/aliases dosyasının içinde ayarlanmış/tanımlanmış ise, bu durumda birşey yapmanıza gerek yok.

Şimdi sürücüleri elle modprope kullanarak çalışır hale getirelim

sudo modprobe i2c-sensor
sudo modprobe i2c-viapro
sudo modprobe i2c-isa
sudo modprobe it87
sudo depmod -a <Gerekmeye bilir!>
sudo update-modules <Gerekmeye bilir!>

Şimdi sensors komutunu kullanarak lm-sensors aracının çıktısını görebilirsiniz

 sensors

 ************************************************** *****************
 w83627thf-isa-0290
Adapter: ISA adapter
VCore:     +1.63 V  (min =  +1.94 V, max =  +1.94 V)       ALARM
+12V:      +5.72 V  (min = +10.82 V, max = +13.19 V)       ALARM
+3.3V:     +1.65 V  (min =  +3.14 V, max =  +3.47 V)       ALARM
+5V:       +4.99 V  (min =  +4.75 V, max =  +5.25 V)
-12V:      -0.68 V  (min = -10.80 V, max = -13.18 V)       ALARM
V5SB:      +5.00 V  (min =  +4.76 V, max =  +5.24 V)
VBat:      +3.15 V  (min =  +2.40 V, max =  +3.60 V)
fan1:        0 RPM  (min = 16875 RPM, div = 8)              ALARM
CPU Fan:  2860 RPM  (min = 1318 RPM, div = 8)
fan3:        0 RPM  (min = 2636 RPM, div = 8)              ALARM
M/B Temp:    +37°C  (high =   +16°C, hyst =    +0°C)   sensor = diode   ALARM
CPU Temp:  +36.5°C  (high =   +70°C, hyst =   +65°C)   sensor = diode (beep)
temp3:     +22.0°C  (high =   +70°C, hyst =   +65°C)   sensor = diode
vid:      +0.275 V  (VRM Version 9.0)
alarms:
beep_enable:
          Sound alarm enabled

 ************************************************** ********************

Ubuntumuzu yeniden başlatığımızda sensorler boot sırasında düzgünce ayarlanacaktır.

Değerleri panelde görmek için [1]

Lm-sensor ANASAYFASI [2]

Ubuntu forumlarındaki topic [3]

xsensors[4]