Linux Memo/lm-sensors
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
*lm-sensors [#v55d14a1]
RIGHT:更新日&lastmod();
lm-sensorsはPCのハードウェア状況を表示するプログラムであ...
**ドライバのロード [#nbae31b1]
sensors-detectで見つかったモジュールを/sbin/modprobeでLoa...
コマンドを実行しなくてもOK
sensors-detectを実行すると/etc/sysconfig/lm_sensorsに
ODULE_0=coretemp~
MODULE_1=w83627ehf
のように入るので
# /sbin/modprobe coretemp
のようにする。
うまくLoadできないのもあるようだ。
**最新のセンサーを利用する [#gece037e]
最新のsensors-detect
# cd /usr/local/sbin
# wget http://dl.lm-sensors.org/lm-sensors/files/sensors...
# chmod 755 sensors-detect
# /usr/local/sbin/sensors-detect
** lm_sensorsの3.3.1 インストール[Vine 6.x ] [#ub0fe5de]
# apt-get install lm-sensors
rpmでのインストールでもソースからのコンパイルでも動作した...
# cp prog/init/lm_sensors.init /etc/rc.d/init.d/lm_sensors
をする必要あり。
ただし、i5 P67(H67)ではいろんなパラメータが出なかった(ま...
# /usr/bin/sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +38.0°C (high = +80.0°C, crit = +99.0°C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +32.0°C (high = +80.0°C, crit = +99.0°C)
coretemp-isa-0002
Adapter: ISA adapter
Core 2: +40.0°C (high = +80.0°C, crit = +99.0°C)
coretemp-isa-0003
Adapter: ISA adapter
Core 3: +35.0°C (high = +80.0°C, crit = +99.0°C)
**事前準備[Vin4.0 kernel2.6.16] [#w5d13484]
Vine4.0ではi2cは不要だが、sysfsutilsが必要なので[[ここ:ht...
$ tar xvfz sysfsutils-2.1.0.tar.gz
$ cd sysfsutils-2.1.0
$ ./configure
$ make
$ su
# make install
/usr/local/lib,/usr/local/bin,/usr/local/include/sysfsに...
**事前準備 [#d39f76c8]
flex&bisonを入れる必要があるのでrpm等でインストールしてお...
また、Kernelソースも必要なのでインストールしておき、コン...
環境に以下のようにしておく。Vine3.2ではKernelの再構築の必...
# cd /usr/src/linux-2.6.xx
# cp configs/kernel-2.4.31-i686.config .config
***lm-sensorsのインストール [#zff7846a]
[[ここ:http://www.lm-sensors.org/]]からi2c-2.10.0.tar.gz(...
***シリアル通信インターフェイスデバイス(i2c)のインストー...
$ tar zxvf i2c-2.10.0.tar.gz
$ cd i2c-2.10.0
$ make
Makefile:191: kernel/i2c-core.d: そのようなファイルやデ...
Makefile:191: kernel/i2c-dev.d: そのようなファイルやディ...
Makefile:191: kernel/i2c-algo-bit.d: そのようなファイル...
Makefile:191: kernel/i2c-philips-par.d: そのようなファイ...
(略)
-DEXPORT_SYMTAB -fno-strict-aliasing -c kernel/i2c-proc...
gcc -I/lib/modules/2.4.31-0vl1.12/build/include -nostdin...
i386-vine-linux/3.3.2/include -Wall -O2 -D__KERNEL__ -DM...
pointer -DEXPORT_SYMTAB -fno-strict-aliasing -c kernel/i...
$ su
# make install
(略)
/sbin/depmod -a
*** Installation successful! [#q3e04c67]
*** Important notes: [#f740ae0c]
*** 1* Compatibility with the Linux 2.4 kernel has been ...
*** 2* The i2c-elektor and i2c-pcf-epp modules were not ...
*** need them, you have to use compilation option 3 a...
*** the INSTALL file. [#z4e9fc58]
# exit
***lm_sensorsのインストール[Vine4.0 kernel2.6.16] [#s6052...
$ tar zxvf lm_sensors-2.10.1.tar.gz
$ cd lm_sensors-2.10.1
$ make user
(略)
-O2 -c prog/dump/isaset.c -o prog/dump/isaset.ro
gcc -Wl,-rpath,/usr/local/lib -o prog/dump/isaset prog/d...
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -Wl,-rpath,/usr/local/lib -o prog/sensors/sensors pr...
$ su
# make user_install
(略)
if [ ! -e /etc/sensors.conf ] ; then \
install -m 644 etc/sensors.conf.eg /etc/sensors.conf; \
fi
*** Important note:
*** * The libsensors configuration file (/etc/sensors.c...
*** overwritten by our installation process, so that ...
*** your personal settings in that file. You still ca...
*** default config file in etc/sensors.conf.eg and ma...
*** /etc/sensors.conf if you want. You will then want...
*** to fit your needs again.
&color(red){注)sysfsutilsインストールを忘れて以下のよう...
$ make user
make: *** `lib/sysfs.ad' に必要なターゲット `sysfs/libsy...
sysfsutilsインストールして
$ make clean
をしてからmake userを行う
***lm_sensorsのインストール [#z7827228]
$ cd ..
$ tar zxvf lm_sensors-2.10.0.tar.gz
$ cd lm_sensors-2.10.0
$ make
(略)
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -Wl,-rpath,/usr/local/lib -o prog/sensors/sensors pr...
$ su
# make install
(略)
if [ ! -e /etc/sensors.conf ] ; then \
install -m 644 etc/sensors.conf.eg /etc/sensors.conf; \
fi
*** Important note:
*** * The libsensors configuration file (/etc/sensors.c...
*** overwritten by our installation process, so that ...
*** your personal settings in that file. You still ca...
*** default config file in etc/sensors.conf.eg and ma...
*** /etc/sensors.conf if you want. You will then want...
*** to fit your needs again.
/sbin/depmod -a
***lm_sensorsの設定 [#tb97d547]
センサーの検出等の設定を以下のようにする(インストール後...
/etc/sysconfig/lm_sensorsに検出結果が格納される
# cd lm_sensors-2.10.0/prog/detect
# ./sensors-detect
# sensors-detect revision 1.413 (2006/01/19 20:28:00)
This program will help you determine which I2C/SMBus mod...
load to use lm_sensors most effectively. You need to hav...
lm_sensors installed before running this program.
Also, you need to be `root', or at least have access to ...
files, for most things.
(略)
We can start with probing for (PCI) I2C or SMBus adapte...
You do not need any special privileges for this.
Do you want to probe now? (YES/no): <---(Enter)
Probing for PCI bus adapters...
Use driver `i2c-i801' for device 00:1f.3: Intel 82801FB ...
Probe succesfully concluded.
We will now try to load each adapter module in turn.
Load `i2c-i801' (say NO if built into your kernel)? (YES...
Module loaded succesfully.
If you have undetectable or unsupported adapters, you ca...
scanned by manually loading the modules before running t...
To continue, we need module `i2c-dev' to be loaded.
If it is built-in into your kernel, you can safely skip ...
i2c-dev is not loaded. Do you want to load it now? (YES/...
Module loaded succesfully.
We are now going to do the adapter probings. Some adapte...
through; we can't really help that. Also, some chips wil...
we choose the one with the highest confidence value in t...
If you found that the adapter hung after probing a certa...
specify that address to remain unprobed. That often
includes address 0x69 (clock chip).
Next adapter: SMBus I801 adapter at 5000
Do you want to scan it? (YES/no/selectively):<---(Enter)
Client found at address 0x08
Client found at address 0x44
Probing for `Maxim MAX6633/MAX6634/MAX6635'... Failed!
Client found at address 0x50
Probing for `SPD EEPROM'... Success!
(confidence 8, driver `eeprom')
Probing for `DDC monitor'... Failed!
Probing for `Maxim MAX6900'... Failed!
Client found at address 0x69
Some chips are also accessible through the ISA bus. ISA ...
typically a bit more dangerous, as we have to write to I...
this. This is usually safe though.
Do you want to scan the ISA bus? (YES/no): <---no
Some Super I/O chips may also contain sensors. Super I/O...
typically a bit more dangerous, as we have to write to I...
this. This is usually safe though.
Do you want to scan for Super I/O sensors? (YES/no):<---...
Probing for `ITE 8702F Super IO Sensors'
Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83627HF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83627THF Super IO Sensors'
Success... found at address 0x0290
Probing for `Winbond W83637HF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83687THF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83697HF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83697SF/UF Super IO PWM'
Failed! (0x82)
Probing for `Winbond W83L517D Super IO'
Failed! (0x82)
Probing for `Fintek F71805F/FG Super IO Sensors'
Failed! (0x8285)
Probing for `Winbond W83627EHF/EHG Super IO Sensors'
Failed! (0x8285)
Do you want to scan for secondary Super I/O sensors? (YE...
Probing for `ITE 8702F Super IO Sensors'
Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
Failed! (skipping family)
Probing for `Winbond W83627EHF/EHG Super IO Sensors'
Failed! (skipping family)
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `eeprom' (should be inserted):
Detects correctly:
* Bus `SMBus I801 adapter at 5000'
Busdriver `i2c-i801', I2C address 0x50
Chip `SPD EEPROM' (confidence: 8)
Driver `w83627hf' (should be inserted):
Detects correctly:
* ISA bus address 0x0290 (Busdriver `i2c-isa')
Chip `Winbond W83627THF Super IO Sensors' (confidenc...
I will now generate the commands needed to load the I2C ...
To make the sensors modules behave correctly, add these ...
/etc/modules.conf:
#----cut here----
# I2C module options
alias char-major-89 i2c-dev <---/etc/modules.confに追...
#----cut here----
To load everything that is needed, add this to some /etc...
#----cut here----
# I2C adapter drivers
modprobe i2c-i801
modprobe i2c-isa
# I2C chip drivers
modprobe eeprom
modprobe w83627hf
# sleep 2 # optional
/usr/local/bin/sensors -s # recommended
#----cut here----
WARNING! If you have some things built into your kernel,...
will contain too many modules. Skip the appropriate ones...
try these commands right now to make sure everything is ...
Monitoring programs won't work until it's done.
Do you want to generate /etc/sysconfig/lm_sensors? (YES/...
Copy prog/init/lm_sensors.init to /etc/rc.d/init.d/lm_se...
for initialization at boot time.
以下のファイルを修正
/etc/modules.confに
alias char-major-89 i2c-dev
を追加。
''Vine4.0''では/etc/modprobe.confに
# I2C module options
alias char-major-89 i2c-dev
を追加。
***モジュールのload / プログラムの実行 [#h9606e3a]
以下で確認(モジュールのload / プログラムの実行)
# /sbin/modprobe i2c-i801
# /sbin/modprobe i2c-isa
# /sbin/modprobe eeprom
# /sbin/modprobe w83627hf
***実行 [#g03f226a]
# /usr/local/bin/sensors
eeprom-i2c-0-50
Adapter: SMBus I801 adapter at 5000
Memory type: DDR2 SDRAM DIMM
Memory size (MB): 512
w83627thf-isa-0290
Adapter: ISA adapter
VCore: +1.29 V (min = +0.70 V, max = +0.70 V) ...
+12V: +11.93 V (min = +10.83 V, max = +13.19 V)
+3.3V: +3.26 V (min = +3.14 V, max = +3.46 V)
+5V: +4.98 V (min = +4.75 V, max = +5.25 V)
-12V: -5.71 V (min = -13.16 V, max = -10.90 V) ...
V5SB: +5.02 V (min = +4.74 V, max = +5.24 V)
VBat: +3.30 V (min = +2.40 V, max = +3.60 V)
fan1: 0 RPM (min = 664 RPM, div = 8) ...
CPU Fan: 4326 RPM (min = 664 RPM, div = 8)
fan3: 0 RPM (min = 664 RPM, div = 8) ...
M/B Temp: +62°C (high = +44°C, hyst = -32°C) s...
CPU Temp: +66.0°C (high = +80°C, hyst = +75°C) s...
temp3: -48.0°C (high = +80°C, hyst = +75°C) s...
vid: +0.000 V (VRM Version 9.0)
alarms:
beep_enable:
Sound alarm enabled
***起動時起動するように設定 [#i36ebbc9]
# cp prog/init/lm_sensors.init /etc/rc.d/init.d/lm_sensors
# /sbin/chkconfig --add lm_sensors
**Vine5.x + lm_sensors-3.x [#j8a8a023]
Atomマシン(G945チップセット)にインストール
基本はVine4.xと同じ
$ tar zxvf lm_sensors-3.1.1.tar.bz2
$ cd lm_sensors-3.1.1
$ su
# make user
(略)
a - lib/data.ao
a - lib/general.ao
a - lib/error.ao
a - lib/access.ao
a - lib/init.ao
a - lib/sysfs.ao
a - lib/conf-parse.ao
a - lib/conf-lex.ao
gcc -DETCDIR="\"/etc\"" -I. -Wall -O2 -Wstrict-prototyp...
arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-...
Wmissing-prototypes -Wundef -c prog/sensors/main.c -o p...
prog/sensors/main.c: In function ‘set_degstr’:
prog/sensors/main.c:128: 警告: initialization discards q...
(略)
gcc -DETCDIR="\"/etc\"" -I. -Wall -O2 -Wstrict-prototyp...
arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-...
Wmissing-prototypes -Wundef -c lib/test/test-scanner.c ...
scanner.ro
gcc -Wl,-rpath,/usr/local/lib -o lib/test/test-scanner l...
scanner.ro lib/conf-lex.ao lib/error.ao lib/general.ao -...
# make user_install
''設定''
# cd prog/detect
# ./sensors-detect
# sensors-detect revision 5729 (2009-06-02 15:51:29 +0200)
# System: O.E.M O.E.M
# Board: FOXCONN 45CTP/45CTD
This program will help you determine which kernel module...
to load to use lm_sensors most effectively. It is genera...
and recommended to accept the default answers to all que...
unless you know what you're doing.
Some south bridges, CPUs or memory controllers contain e...
Do you want to scan for them? This is totally safe. (YES...
Silicon Integrated Systems SIS5595... ...
VIA VT82C686 Integrated Sensors... ...
VIA VT8231 Integrated Sensors... ...
AMD K8 thermal sensors... ...
AMD K10 thermal sensors... ...
Intel Core family thermal sensor... ...
Intel AMB FB-DIMM thermal sensor... ...
VIA C7 thermal and voltage sensors... ...
Some Super I/O chips contain embedded sensors. We have t...
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor'... ...
Trying family `SMSC'... ...
Trying family `VIA/Winbond/Fintek'... ...
Trying family `ITE'... ...
Found `ITE IT8718F Super IO Sensors' ...
(address 0xa10, driver `it87')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor'... ...
Trying family `SMSC'... ...
Trying family `VIA/Winbond/Fintek'... ...
Trying family `ITE'... ...
Some systems (mainly servers) implement IPMI, a set of c...
through which system health data may be retrieved, among...
We first try to get the information from SMBIOS. If we d...
there, we have to read from arbitrary I/O ports to probe...
interfaces. This is normally safe. Do you want to scan f...
interfaces? (YES/no):
Probing for `IPMI BMC KCS' at 0xca0... ...
Probing for `IPMI BMC SMIC' at 0xca8... ...
Some hardware monitoring chips are accessible through th...
We have to write to arbitrary I/O ports to probe them. T...
safe though. Yes, you do have ISA I/O ports even if you ...
ISA slots! Do you want to scan the ISA I/O ports? (yes/N...
Lastly, we can probe the I2C/SMBus adapters for connecte...
monitoring devices. This is the most risky part, and whi...
reasonably well on most systems, it has been reported to...
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no):
Using driver `i2c-i801' for device 0000:00:1f.3: Intel 8...
Module i2c-dev loaded successfully.
Next adapter: SMBus I801 adapter at 0400 (i2c-0)
Do you want to scan it? (yes/NO/selectively):
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `it87': <== Driver 名(1)
* ISA bus, address 0xa10
Chip `ITE IT8718F Super IO Sensors' (confidence: 9)
Do you want to generate /etc/sysconfig/lm_sensors? (YES/...
Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors
for initialization at boot time.
You should now start the lm_sensors service to load the ...
kernel modules.
Unloading i2c-dev... OK
''ドライバのロード''
# /sbin/modprobe i2c-i801
# /sbin/modprobe eeprom
# /sbin/modprobe it87 <== (1)のDriver名
''確認''
# /usr/local/bin/sensors
it8718-isa-0a10
Adapter: ISA adapter
in0: +1.14 V (min = +0.00 V, max = +4.08 V)
in1: +1.76 V (min = +0.00 V, max = +4.08 V)
in2: +3.42 V (min = +0.00 V, max = +4.08 V)
in3: +2.98 V (min = +0.00 V, max = +4.08 V)
in4: +3.01 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.91 V (min = +0.00 V, max = +4.08 V)
Vbat: +3.06 V
fan1: 1622 RPM (min = 0 RPM) <=ケースFanの...
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
temp1: +37.0°C (low = +127.0°C, high = +112.0°C)...
temp2: +24.0°C (low = +127.0°C, high = +112.0°C)...
temp3: -128.0°C (low = +127.0°C, high = +112.0°C)...
cpu0_vid: +2.050 V
''tempラベル''
以下のファイルを編集するとCPUとMBの温度表示にラベルが付く...
/etc/sensors3.conf
chip "it87-*" "it8712-*" "it8716-*" "it8718-*" "it8720-*"
# 以下を追加
label temp1 "CPU Temp"
label temp2 "M/B Temp"
label in8 "Vbat"
# /usr/local/bin/sensors
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
CPU Temp: +37.0°C (low = +127.0°C, high = +112.0°C)...
M/B Temp: +24.0°C (low = +127.0°C, high = +112.0°C)...
temp3: -128.0°C (low = +127.0°C, high = +112.0°C)...
**MRTGで結果を表示する [#cf5df54e]
rpmでapache1+phpを利用するときはgd-develも必要なのでapt-g...
文字コードはEUCなのでUTF-8の場合はEUCに変更して仕様
MRTGでは以下のように起動する
# export LANG=ja_JP.eucJP
# /usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/lib/mrtg....
スクリプトを作成しておくといいかも
/usr/local/mrtg-2/lib/mrtg.cfgに以下を追加
#-------------------------------------------------------...
# CPU/MB温度状況
#-------------------------------------------------------...
Target[cputemp]: `/usr/local/bin/sensors | grep Temp | a...
MaxBytes[cputemp]: 100
Title[cputemp]: CPUとマザーボードの温度
PageTop[cputemp]: <h1>CPUとマザーボードの温度</h1>
Options[cputemp]: absolute,gauge,nopercent,noinfo
#WithPeak[cputemp]: ymw
unscaled[cputemp]: dwmy
YLegend[cputemp]: Temperature
ShortLegend[cputemp]: C
LegendI[cputemp]: M/B
LegendO[cputemp]: CPU
Legend1[cputemp]: M/B
Legend2[cputemp]: CPU
#-------------------------------------------------------...
# CPU FUN 回転数
#-------------------------------------------------------...
Target[cpufun]: `/usr/local/bin/sensors | grep 'CPU Fan:...
}'` <--出力結果が2行になる必要があるようなのでダミーに0...
MaxBytes[cpufun]: 6000
Title[cpufun]: CPU FAN 回転数
PageTop[cpufun]: <h1>CPU FAN 回転数</h1>
Options[cpufun]: gauge
#WithPeak[cpufun]: ymw
unscaled[cpufun]: dwmy
YLegend[cpufun]: RPM
ShortLegend[cpufun]: RPM
LegendI[cpufun]: CPU FUN
LegendO[cpufun]: CPU FUN
**携帯でも表示 [#ee9d2ba2]
以下のようなScriptを作成しCronで実行
cputemp.shを作成
#!/bin/sh
export LANG=ja_JP.eucJP
cputemp=`/usr/local/bin/sensors | awk '{if($2 == "Temp:"...
date0=`/bin/date`
echo "<html>"
echo "<head>"
echo "<meta http-equiv=\"Content-Type\" content=\"text/h...
echo "</head>"
echo "<body>"
echo "<Center> CPU M/B Status(Mini-PC) </Center><Br>"
echo "<HR>"
echo $date0
echo "<Br>"
echo $cputemp
echo "<Br>"
echo "</body>"
echo "</html>"
crontabに以下のように記入(一般ユーザでOK)
*/10 * * * * /home/okada/script/cputemp.sh > /usr/local/...
---------------------------------------------------------...
RIGHT:[[元ページ:https://wwwism.dyndns.org/hp/linux/lm_se...
終了行:
*lm-sensors [#v55d14a1]
RIGHT:更新日&lastmod();
lm-sensorsはPCのハードウェア状況を表示するプログラムであ...
**ドライバのロード [#nbae31b1]
sensors-detectで見つかったモジュールを/sbin/modprobeでLoa...
コマンドを実行しなくてもOK
sensors-detectを実行すると/etc/sysconfig/lm_sensorsに
ODULE_0=coretemp~
MODULE_1=w83627ehf
のように入るので
# /sbin/modprobe coretemp
のようにする。
うまくLoadできないのもあるようだ。
**最新のセンサーを利用する [#gece037e]
最新のsensors-detect
# cd /usr/local/sbin
# wget http://dl.lm-sensors.org/lm-sensors/files/sensors...
# chmod 755 sensors-detect
# /usr/local/sbin/sensors-detect
** lm_sensorsの3.3.1 インストール[Vine 6.x ] [#ub0fe5de]
# apt-get install lm-sensors
rpmでのインストールでもソースからのコンパイルでも動作した...
# cp prog/init/lm_sensors.init /etc/rc.d/init.d/lm_sensors
をする必要あり。
ただし、i5 P67(H67)ではいろんなパラメータが出なかった(ま...
# /usr/bin/sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +38.0°C (high = +80.0°C, crit = +99.0°C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +32.0°C (high = +80.0°C, crit = +99.0°C)
coretemp-isa-0002
Adapter: ISA adapter
Core 2: +40.0°C (high = +80.0°C, crit = +99.0°C)
coretemp-isa-0003
Adapter: ISA adapter
Core 3: +35.0°C (high = +80.0°C, crit = +99.0°C)
**事前準備[Vin4.0 kernel2.6.16] [#w5d13484]
Vine4.0ではi2cは不要だが、sysfsutilsが必要なので[[ここ:ht...
$ tar xvfz sysfsutils-2.1.0.tar.gz
$ cd sysfsutils-2.1.0
$ ./configure
$ make
$ su
# make install
/usr/local/lib,/usr/local/bin,/usr/local/include/sysfsに...
**事前準備 [#d39f76c8]
flex&bisonを入れる必要があるのでrpm等でインストールしてお...
また、Kernelソースも必要なのでインストールしておき、コン...
環境に以下のようにしておく。Vine3.2ではKernelの再構築の必...
# cd /usr/src/linux-2.6.xx
# cp configs/kernel-2.4.31-i686.config .config
***lm-sensorsのインストール [#zff7846a]
[[ここ:http://www.lm-sensors.org/]]からi2c-2.10.0.tar.gz(...
***シリアル通信インターフェイスデバイス(i2c)のインストー...
$ tar zxvf i2c-2.10.0.tar.gz
$ cd i2c-2.10.0
$ make
Makefile:191: kernel/i2c-core.d: そのようなファイルやデ...
Makefile:191: kernel/i2c-dev.d: そのようなファイルやディ...
Makefile:191: kernel/i2c-algo-bit.d: そのようなファイル...
Makefile:191: kernel/i2c-philips-par.d: そのようなファイ...
(略)
-DEXPORT_SYMTAB -fno-strict-aliasing -c kernel/i2c-proc...
gcc -I/lib/modules/2.4.31-0vl1.12/build/include -nostdin...
i386-vine-linux/3.3.2/include -Wall -O2 -D__KERNEL__ -DM...
pointer -DEXPORT_SYMTAB -fno-strict-aliasing -c kernel/i...
$ su
# make install
(略)
/sbin/depmod -a
*** Installation successful! [#q3e04c67]
*** Important notes: [#f740ae0c]
*** 1* Compatibility with the Linux 2.4 kernel has been ...
*** 2* The i2c-elektor and i2c-pcf-epp modules were not ...
*** need them, you have to use compilation option 3 a...
*** the INSTALL file. [#z4e9fc58]
# exit
***lm_sensorsのインストール[Vine4.0 kernel2.6.16] [#s6052...
$ tar zxvf lm_sensors-2.10.1.tar.gz
$ cd lm_sensors-2.10.1
$ make user
(略)
-O2 -c prog/dump/isaset.c -o prog/dump/isaset.ro
gcc -Wl,-rpath,/usr/local/lib -o prog/dump/isaset prog/d...
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -Wl,-rpath,/usr/local/lib -o prog/sensors/sensors pr...
$ su
# make user_install
(略)
if [ ! -e /etc/sensors.conf ] ; then \
install -m 644 etc/sensors.conf.eg /etc/sensors.conf; \
fi
*** Important note:
*** * The libsensors configuration file (/etc/sensors.c...
*** overwritten by our installation process, so that ...
*** your personal settings in that file. You still ca...
*** default config file in etc/sensors.conf.eg and ma...
*** /etc/sensors.conf if you want. You will then want...
*** to fit your needs again.
&color(red){注)sysfsutilsインストールを忘れて以下のよう...
$ make user
make: *** `lib/sysfs.ad' に必要なターゲット `sysfs/libsy...
sysfsutilsインストールして
$ make clean
をしてからmake userを行う
***lm_sensorsのインストール [#z7827228]
$ cd ..
$ tar zxvf lm_sensors-2.10.0.tar.gz
$ cd lm_sensors-2.10.0
$ make
(略)
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -DETCDIR="\"/etc\"" -I. -Ikernel/include -I/usr/loca...
gcc -Wl,-rpath,/usr/local/lib -o prog/sensors/sensors pr...
$ su
# make install
(略)
if [ ! -e /etc/sensors.conf ] ; then \
install -m 644 etc/sensors.conf.eg /etc/sensors.conf; \
fi
*** Important note:
*** * The libsensors configuration file (/etc/sensors.c...
*** overwritten by our installation process, so that ...
*** your personal settings in that file. You still ca...
*** default config file in etc/sensors.conf.eg and ma...
*** /etc/sensors.conf if you want. You will then want...
*** to fit your needs again.
/sbin/depmod -a
***lm_sensorsの設定 [#tb97d547]
センサーの検出等の設定を以下のようにする(インストール後...
/etc/sysconfig/lm_sensorsに検出結果が格納される
# cd lm_sensors-2.10.0/prog/detect
# ./sensors-detect
# sensors-detect revision 1.413 (2006/01/19 20:28:00)
This program will help you determine which I2C/SMBus mod...
load to use lm_sensors most effectively. You need to hav...
lm_sensors installed before running this program.
Also, you need to be `root', or at least have access to ...
files, for most things.
(略)
We can start with probing for (PCI) I2C or SMBus adapte...
You do not need any special privileges for this.
Do you want to probe now? (YES/no): <---(Enter)
Probing for PCI bus adapters...
Use driver `i2c-i801' for device 00:1f.3: Intel 82801FB ...
Probe succesfully concluded.
We will now try to load each adapter module in turn.
Load `i2c-i801' (say NO if built into your kernel)? (YES...
Module loaded succesfully.
If you have undetectable or unsupported adapters, you ca...
scanned by manually loading the modules before running t...
To continue, we need module `i2c-dev' to be loaded.
If it is built-in into your kernel, you can safely skip ...
i2c-dev is not loaded. Do you want to load it now? (YES/...
Module loaded succesfully.
We are now going to do the adapter probings. Some adapte...
through; we can't really help that. Also, some chips wil...
we choose the one with the highest confidence value in t...
If you found that the adapter hung after probing a certa...
specify that address to remain unprobed. That often
includes address 0x69 (clock chip).
Next adapter: SMBus I801 adapter at 5000
Do you want to scan it? (YES/no/selectively):<---(Enter)
Client found at address 0x08
Client found at address 0x44
Probing for `Maxim MAX6633/MAX6634/MAX6635'... Failed!
Client found at address 0x50
Probing for `SPD EEPROM'... Success!
(confidence 8, driver `eeprom')
Probing for `DDC monitor'... Failed!
Probing for `Maxim MAX6900'... Failed!
Client found at address 0x69
Some chips are also accessible through the ISA bus. ISA ...
typically a bit more dangerous, as we have to write to I...
this. This is usually safe though.
Do you want to scan the ISA bus? (YES/no): <---no
Some Super I/O chips may also contain sensors. Super I/O...
typically a bit more dangerous, as we have to write to I...
this. This is usually safe though.
Do you want to scan for Super I/O sensors? (YES/no):<---...
Probing for `ITE 8702F Super IO Sensors'
Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83627HF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83627THF Super IO Sensors'
Success... found at address 0x0290
Probing for `Winbond W83637HF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83687THF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83697HF Super IO Sensors'
Failed! (0x82)
Probing for `Winbond W83697SF/UF Super IO PWM'
Failed! (0x82)
Probing for `Winbond W83L517D Super IO'
Failed! (0x82)
Probing for `Fintek F71805F/FG Super IO Sensors'
Failed! (0x8285)
Probing for `Winbond W83627EHF/EHG Super IO Sensors'
Failed! (0x8285)
Do you want to scan for secondary Super I/O sensors? (YE...
Probing for `ITE 8702F Super IO Sensors'
Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
Failed! (skipping family)
Probing for `Winbond W83627EHF/EHG Super IO Sensors'
Failed! (skipping family)
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `eeprom' (should be inserted):
Detects correctly:
* Bus `SMBus I801 adapter at 5000'
Busdriver `i2c-i801', I2C address 0x50
Chip `SPD EEPROM' (confidence: 8)
Driver `w83627hf' (should be inserted):
Detects correctly:
* ISA bus address 0x0290 (Busdriver `i2c-isa')
Chip `Winbond W83627THF Super IO Sensors' (confidenc...
I will now generate the commands needed to load the I2C ...
To make the sensors modules behave correctly, add these ...
/etc/modules.conf:
#----cut here----
# I2C module options
alias char-major-89 i2c-dev <---/etc/modules.confに追...
#----cut here----
To load everything that is needed, add this to some /etc...
#----cut here----
# I2C adapter drivers
modprobe i2c-i801
modprobe i2c-isa
# I2C chip drivers
modprobe eeprom
modprobe w83627hf
# sleep 2 # optional
/usr/local/bin/sensors -s # recommended
#----cut here----
WARNING! If you have some things built into your kernel,...
will contain too many modules. Skip the appropriate ones...
try these commands right now to make sure everything is ...
Monitoring programs won't work until it's done.
Do you want to generate /etc/sysconfig/lm_sensors? (YES/...
Copy prog/init/lm_sensors.init to /etc/rc.d/init.d/lm_se...
for initialization at boot time.
以下のファイルを修正
/etc/modules.confに
alias char-major-89 i2c-dev
を追加。
''Vine4.0''では/etc/modprobe.confに
# I2C module options
alias char-major-89 i2c-dev
を追加。
***モジュールのload / プログラムの実行 [#h9606e3a]
以下で確認(モジュールのload / プログラムの実行)
# /sbin/modprobe i2c-i801
# /sbin/modprobe i2c-isa
# /sbin/modprobe eeprom
# /sbin/modprobe w83627hf
***実行 [#g03f226a]
# /usr/local/bin/sensors
eeprom-i2c-0-50
Adapter: SMBus I801 adapter at 5000
Memory type: DDR2 SDRAM DIMM
Memory size (MB): 512
w83627thf-isa-0290
Adapter: ISA adapter
VCore: +1.29 V (min = +0.70 V, max = +0.70 V) ...
+12V: +11.93 V (min = +10.83 V, max = +13.19 V)
+3.3V: +3.26 V (min = +3.14 V, max = +3.46 V)
+5V: +4.98 V (min = +4.75 V, max = +5.25 V)
-12V: -5.71 V (min = -13.16 V, max = -10.90 V) ...
V5SB: +5.02 V (min = +4.74 V, max = +5.24 V)
VBat: +3.30 V (min = +2.40 V, max = +3.60 V)
fan1: 0 RPM (min = 664 RPM, div = 8) ...
CPU Fan: 4326 RPM (min = 664 RPM, div = 8)
fan3: 0 RPM (min = 664 RPM, div = 8) ...
M/B Temp: +62°C (high = +44°C, hyst = -32°C) s...
CPU Temp: +66.0°C (high = +80°C, hyst = +75°C) s...
temp3: -48.0°C (high = +80°C, hyst = +75°C) s...
vid: +0.000 V (VRM Version 9.0)
alarms:
beep_enable:
Sound alarm enabled
***起動時起動するように設定 [#i36ebbc9]
# cp prog/init/lm_sensors.init /etc/rc.d/init.d/lm_sensors
# /sbin/chkconfig --add lm_sensors
**Vine5.x + lm_sensors-3.x [#j8a8a023]
Atomマシン(G945チップセット)にインストール
基本はVine4.xと同じ
$ tar zxvf lm_sensors-3.1.1.tar.bz2
$ cd lm_sensors-3.1.1
$ su
# make user
(略)
a - lib/data.ao
a - lib/general.ao
a - lib/error.ao
a - lib/access.ao
a - lib/init.ao
a - lib/sysfs.ao
a - lib/conf-parse.ao
a - lib/conf-lex.ao
gcc -DETCDIR="\"/etc\"" -I. -Wall -O2 -Wstrict-prototyp...
arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-...
Wmissing-prototypes -Wundef -c prog/sensors/main.c -o p...
prog/sensors/main.c: In function ‘set_degstr’:
prog/sensors/main.c:128: 警告: initialization discards q...
(略)
gcc -DETCDIR="\"/etc\"" -I. -Wall -O2 -Wstrict-prototyp...
arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-...
Wmissing-prototypes -Wundef -c lib/test/test-scanner.c ...
scanner.ro
gcc -Wl,-rpath,/usr/local/lib -o lib/test/test-scanner l...
scanner.ro lib/conf-lex.ao lib/error.ao lib/general.ao -...
# make user_install
''設定''
# cd prog/detect
# ./sensors-detect
# sensors-detect revision 5729 (2009-06-02 15:51:29 +0200)
# System: O.E.M O.E.M
# Board: FOXCONN 45CTP/45CTD
This program will help you determine which kernel module...
to load to use lm_sensors most effectively. It is genera...
and recommended to accept the default answers to all que...
unless you know what you're doing.
Some south bridges, CPUs or memory controllers contain e...
Do you want to scan for them? This is totally safe. (YES...
Silicon Integrated Systems SIS5595... ...
VIA VT82C686 Integrated Sensors... ...
VIA VT8231 Integrated Sensors... ...
AMD K8 thermal sensors... ...
AMD K10 thermal sensors... ...
Intel Core family thermal sensor... ...
Intel AMB FB-DIMM thermal sensor... ...
VIA C7 thermal and voltage sensors... ...
Some Super I/O chips contain embedded sensors. We have t...
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor'... ...
Trying family `SMSC'... ...
Trying family `VIA/Winbond/Fintek'... ...
Trying family `ITE'... ...
Found `ITE IT8718F Super IO Sensors' ...
(address 0xa10, driver `it87')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor'... ...
Trying family `SMSC'... ...
Trying family `VIA/Winbond/Fintek'... ...
Trying family `ITE'... ...
Some systems (mainly servers) implement IPMI, a set of c...
through which system health data may be retrieved, among...
We first try to get the information from SMBIOS. If we d...
there, we have to read from arbitrary I/O ports to probe...
interfaces. This is normally safe. Do you want to scan f...
interfaces? (YES/no):
Probing for `IPMI BMC KCS' at 0xca0... ...
Probing for `IPMI BMC SMIC' at 0xca8... ...
Some hardware monitoring chips are accessible through th...
We have to write to arbitrary I/O ports to probe them. T...
safe though. Yes, you do have ISA I/O ports even if you ...
ISA slots! Do you want to scan the ISA I/O ports? (yes/N...
Lastly, we can probe the I2C/SMBus adapters for connecte...
monitoring devices. This is the most risky part, and whi...
reasonably well on most systems, it has been reported to...
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no):
Using driver `i2c-i801' for device 0000:00:1f.3: Intel 8...
Module i2c-dev loaded successfully.
Next adapter: SMBus I801 adapter at 0400 (i2c-0)
Do you want to scan it? (yes/NO/selectively):
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `it87': <== Driver 名(1)
* ISA bus, address 0xa10
Chip `ITE IT8718F Super IO Sensors' (confidence: 9)
Do you want to generate /etc/sysconfig/lm_sensors? (YES/...
Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors
for initialization at boot time.
You should now start the lm_sensors service to load the ...
kernel modules.
Unloading i2c-dev... OK
''ドライバのロード''
# /sbin/modprobe i2c-i801
# /sbin/modprobe eeprom
# /sbin/modprobe it87 <== (1)のDriver名
''確認''
# /usr/local/bin/sensors
it8718-isa-0a10
Adapter: ISA adapter
in0: +1.14 V (min = +0.00 V, max = +4.08 V)
in1: +1.76 V (min = +0.00 V, max = +4.08 V)
in2: +3.42 V (min = +0.00 V, max = +4.08 V)
in3: +2.98 V (min = +0.00 V, max = +4.08 V)
in4: +3.01 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.91 V (min = +0.00 V, max = +4.08 V)
Vbat: +3.06 V
fan1: 1622 RPM (min = 0 RPM) <=ケースFanの...
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
temp1: +37.0°C (low = +127.0°C, high = +112.0°C)...
temp2: +24.0°C (low = +127.0°C, high = +112.0°C)...
temp3: -128.0°C (low = +127.0°C, high = +112.0°C)...
cpu0_vid: +2.050 V
''tempラベル''
以下のファイルを編集するとCPUとMBの温度表示にラベルが付く...
/etc/sensors3.conf
chip "it87-*" "it8712-*" "it8716-*" "it8718-*" "it8720-*"
# 以下を追加
label temp1 "CPU Temp"
label temp2 "M/B Temp"
label in8 "Vbat"
# /usr/local/bin/sensors
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
CPU Temp: +37.0°C (low = +127.0°C, high = +112.0°C)...
M/B Temp: +24.0°C (low = +127.0°C, high = +112.0°C)...
temp3: -128.0°C (low = +127.0°C, high = +112.0°C)...
**MRTGで結果を表示する [#cf5df54e]
rpmでapache1+phpを利用するときはgd-develも必要なのでapt-g...
文字コードはEUCなのでUTF-8の場合はEUCに変更して仕様
MRTGでは以下のように起動する
# export LANG=ja_JP.eucJP
# /usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/lib/mrtg....
スクリプトを作成しておくといいかも
/usr/local/mrtg-2/lib/mrtg.cfgに以下を追加
#-------------------------------------------------------...
# CPU/MB温度状況
#-------------------------------------------------------...
Target[cputemp]: `/usr/local/bin/sensors | grep Temp | a...
MaxBytes[cputemp]: 100
Title[cputemp]: CPUとマザーボードの温度
PageTop[cputemp]: <h1>CPUとマザーボードの温度</h1>
Options[cputemp]: absolute,gauge,nopercent,noinfo
#WithPeak[cputemp]: ymw
unscaled[cputemp]: dwmy
YLegend[cputemp]: Temperature
ShortLegend[cputemp]: C
LegendI[cputemp]: M/B
LegendO[cputemp]: CPU
Legend1[cputemp]: M/B
Legend2[cputemp]: CPU
#-------------------------------------------------------...
# CPU FUN 回転数
#-------------------------------------------------------...
Target[cpufun]: `/usr/local/bin/sensors | grep 'CPU Fan:...
}'` <--出力結果が2行になる必要があるようなのでダミーに0...
MaxBytes[cpufun]: 6000
Title[cpufun]: CPU FAN 回転数
PageTop[cpufun]: <h1>CPU FAN 回転数</h1>
Options[cpufun]: gauge
#WithPeak[cpufun]: ymw
unscaled[cpufun]: dwmy
YLegend[cpufun]: RPM
ShortLegend[cpufun]: RPM
LegendI[cpufun]: CPU FUN
LegendO[cpufun]: CPU FUN
**携帯でも表示 [#ee9d2ba2]
以下のようなScriptを作成しCronで実行
cputemp.shを作成
#!/bin/sh
export LANG=ja_JP.eucJP
cputemp=`/usr/local/bin/sensors | awk '{if($2 == "Temp:"...
date0=`/bin/date`
echo "<html>"
echo "<head>"
echo "<meta http-equiv=\"Content-Type\" content=\"text/h...
echo "</head>"
echo "<body>"
echo "<Center> CPU M/B Status(Mini-PC) </Center><Br>"
echo "<HR>"
echo $date0
echo "<Br>"
echo $cputemp
echo "<Br>"
echo "</body>"
echo "</html>"
crontabに以下のように記入(一般ユーザでOK)
*/10 * * * * /home/okada/script/cputemp.sh > /usr/local/...
---------------------------------------------------------...
RIGHT:[[元ページ:https://wwwism.dyndns.org/hp/linux/lm_se...
ページ名: