Hagex-day info

紅茶とお菓子について書いているほっこりブログです

姐さんmakeがうまくいきません

MRTGが上手く設定でき、念願のケース内・CPUの温度をチェックしたい! ということでlm_sensorsをインストール。
# apt-get -y install lm_sensors
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
lm_sensors
0 upgraded, 1 newly installed, 0 removed and 86 not upgraded.
Need to get 415kB of archives.
After unpacking 1453kB of additional disk space will be used.
Get:1 http://ayo.freshrpms.net fedora/linux/2/i386/core lm_sensors 2.8.6-1 [415kB]
Fetched 415kB in 7s (53.1kB/s)
Committing changes...
Preparing... ################################### [100%]
1:lm_sensors ##################################### [100%]
Done.

とパッケージを使って無事にインストール完了。で、さっそく
# usr/sbin/sensors-detect
とタイプすると。
# usr/sbin/sensors-detect
とタイプすると。
This program will help you determine which I2C/SMBus modules you need to
load to use lm_sensors most effectively. You need to have i2c and
lm_sensors installed before running this program.
Also, you need to be `root', or at least have access to the /dev/i2c-*
files, for most things.
If you have patched your kernel and have some drivers built in, you can
safely answer NO if asked to load some modules. In this case, things may
seem a bit confusing, but they will still work.

It is generally safe and recommended to accept the default answers to all
questions, unless you know what you're doing.

We can start with probing for (PCI) I2C or SMBus adapters.
You do not need any special privileges for this.
Do you want to probe now? (YES/no):
Probing for PCI bus adapters...
Use driver `i2c-viapro' for device 00:11.4: VIA Technologies VT8231 South Bridge
Probe succesfully concluded.

We will now try to load each adapter module in turn.
Load `i2c-viapro' (say NO if built into your kernel)? (YES/no):
Module loaded succesfully.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.

To continue, we need module `i2c-dev' to be loaded.
If it is built-in into your kernel, you can safely skip this.
i2c-dev is not loaded. Do you want to load it now? (YES/no):
Module loaded succesfully.

We are now going to do the adapter probings. Some adapters may hang halfway
through; we can't really help that. Also, some chips will be double detected;
we choose the one with the highest confidence value in that case.
If you found that the adapter hung after probing a certain address, you can
specify that address to remain unprobed. That often
includes address 0x69 (clock chip).
Can't exec "i2cdetect": そのようなファイルやディレクトリはありません at /usr/sbin/sensors-detect line 4366, line 3.
Couldn't find i2cdetect program!! at /usr/sbin/sensors-detect line 4366, line 3.

途中まで上手くいっているのに、最後に「i2cdetect」が足りないと怒られる。
調べれてみると「i2c」を一式いれると「i2cdetect」も入るらしいので、
# wget http://www2.lm-sensors.nu/~lm78/archive/i2c-2.8.8.tar.gz
# tar -zxvf i2c-2.8.8.tar.gz
# cd i2c-2.8.8
# make

とmakeしたところ
grep: /usr/src/linux/Makefile: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/include/linux/autoconf.h: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-core.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-dev.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-algo-bit.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-algo-biths.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-elv.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-velleman.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-algo-pcf.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-proc.d: そのようなファイルやディレクトリはありません
Makefile:170: kernel/i2c-pport.d: そのようなファイルやディレクトリはありません
grep: /usr/src/linux/.config: そのようなファイルやディレクトリはありません

Error - missing file /usr/src/linux/.config !!
Verify kernel source is in /usr/src/linux and then
cd to /usr/src/linux and run 'make config' !!

Exception: if you're using a stock RedHat/Fedora kernel...
(1) Install the appropriate kernel-source RPM.
(2) Copy the appropriate config...
from /usr/src/linux/configs/<...>
to /usr/src/linux/.config
(3) Do *NOT* 'make dep' or 'make config'.

make: *** [/usr/src/linux/.config] エラー 1


というエラーの連続で行き詰まる。ドキュメントをみたり調べてみると「/usr/src/linux/」をチェックしろ〜じゃ、make menuconfigが××と色々書かれてあったが、試しても上手いかず(涙)。ディストリビューションはFedora2 カーネルは2.6.6-1.383となっております。

※参考サイト
稼動状況をモニタする MB温度からCPU使用率まで1
みんなが一番参考にしているサイト。わかりやすいけど、makeのエラーがでた時に「エラーメッセージが出力された場合,適時問題を FIX してください」という一言のみで悲しい。

温度とか監視
そつなくまとめられているが、makeがあっさりと通っていて羨ましい。

lm_sensors マザーボード/CPUの温度、ファン回転数、各種電圧の表示
シンプルにまとめられていて見やすい

ひWeb / ひ日誌
実は一番参考になるサイトかもしれない。Webでもよく引っかかるし。

DebianWoodyメモ1 I2C 温度センサー
よくまとまっているけど、Debianだった。

Linux 機のCPU 温度監視

alectrope
これが決定打? と思いきや当該のファイルがなしでがっかり。

Lm_sensors でマザーボードをモニターする

nadare.net保守日記

気流の彼方
これを見ているとカーネルにパッチをあてなければいけないのかな?

HotSaNIC の pingグラフ
かなり近い症例。「make menuconfig」がキーワード?