====== ハードウエア監視 (lm-sensors) ====== 本家: [[https://hwmon.wiki.kernel.org/lm_sensors|lm_sensors [HWMon Wiki]]]\\ ソースコード: [[https://github.com/lm-sensors/lm-sensors|GitHub - lm-sensors/lm-sensors: lm-sensors repository]]\\ ===== 監視ソフトのインストール ===== [[linux:commands:package_management|apt-get]]で lm-sensors をインストールする。 $ sudo apt-get install lm-sensors パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 提案パッケージ: fancontrol 以下のパッケージが新たにインストールされます: lm-sensors アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。 104 kB のアーカイブを取得する必要があります。 この操作後に追加で 364 kB のディスク容量が消費されます。 取得:1 http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian buster/main armhf lm-sensors armhf 1:3.5.0-3 [104 kB] 104 kB を 2秒 で取得しました (44.9 kB/s) 以前に未選択のパッケージ lm-sensors を選択しています。 (データベースを読み込んでいます ... 現在 149399 個のファイルとディレクトリがインストールされています。) .../lm-sensors_1%3a3.5.0-3_armhf.deb を展開する準備をしています ... lm-sensors (1:3.5.0-3) を展開しています... lm-sensors (1:3.5.0-3) を設定しています ... Created symlink /etc/systemd/system/multi-user.target.wants/lm-sensors.service → /lib/systemd/system/lm-sensors.service. man-db (2.8.5-2) のトリガを処理しています ... systemd (241-7~deb10u4+rpi1) のトリガを処理しています ===== sensors-detect コマンドでセンサーを検出 ===== 問い合わせはすべて Enter で答える。 $ sudo sensors-detect # sensors-detect revision $Revision$ # Kernel: 5.4.79+ armv6l # Processor: ARMv6-compatible processor rev 7 (v6l) (//) This program will help you determine which kernel modules you need to load to use lm_sensors most effectively. It is generally safe and recommended to accept the default answers to all questions, unless you know what you're doing. Some south bridges, CPUs or memory controllers contain embedded sensors. Do you want to scan for them? This is totally safe. (YES/no): modprobe: FATAL: Module cpuid not found in directory /lib/modules/5.4.79+ Failed to load module cpuid. Silicon Integrated Systems SIS5595... No VIA VT82C686 Integrated Sensors... No VIA VT8231 Integrated Sensors... No AMD K8 thermal sensors... No AMD Family 10h thermal sensors... No AMD Family 11h thermal sensors... No AMD Family 12h and 14h thermal sensors... No AMD Family 15h thermal sensors... No AMD Family 16h thermal sensors... No AMD Family 17h thermal sensors... No AMD Family 15h power sensors... No AMD Family 16h power sensors... No Intel digital thermal sensor... No Intel AMB FB-DIMM thermal sensor... No Intel 5500/5520/X58 thermal sensor... No VIA C7 thermal sensor... No VIA Nano thermal sensor... No Lastly, we can probe the I2C/SMBus adapters for connected hardware monitoring devices. This is the most risky part, and while it works reasonably well on most systems, it has been reported to cause trouble on some systems. Do you want to probe the I2C/SMBus adapters now? (YES/no): Sorry, no supported PCI bus adapters found. Next adapter: bcm2835 (i2c@7e804000) (i2c-1) Do you want to scan it? (YES/no/selectively): Client found at address 0x1a Handled by driver `rt5645' (already loaded), chip type `rt5645' (note: this is probably NOT a sensor chip!) Client found at address 0x52 Handled by driver `aiy_io_i2c' (already loaded), chip type `aiy-io-i2c' (note: this is probably NOT a sensor chip!) Sorry, no sensors were detected. Either your system has no sensors, or they are not supported, or they are connected to an I2C or SMBus adapter that is not supported. If you find out what chips are on your board, check https://hwmon.wiki.kernel.org/device_support_status for driver status. ===== モジュールロード確認 ===== lsmod コマンドでモジュールが読み込まれているかどうかを確認する。 $ lsmod | grep i2c aiy_io_i2c 16384 3 aiy_adc,gpio_aiy_io,pwm_aiy_io regmap_i2c 16384 3 rt5645,leds_ktd202x,aiy_io_i2c i2c_bcm2835 16384 0 i2c_dev 16384 0 p ===== sensorsコマンドで表示 ===== $ sensors cpu_thermal-virtual-0 Adapter: Virtual device temp1: +43.3°C rpi_volt-isa-0000 Adapter: ISA adapter in0: N/A **rpi_volt-isa-0000**\\ Raspberry Pi Zero WH 以外では低電圧センサーの低電圧状態が返る❓ 確認できていません。\\ [[https://patchwork.kernel.org/project/linux-arm-kernel/patch/1526477827-10859-4-git-send-email-stefan.wahren@i2se.com/|[RFC,3/6] hwmon: Add support for RPi voltage sensor - Patchwork]]\\ [[https://github.com/raspberrypi/linux/issues/2367|Under-voltage messages in the kernel log? · Issue #2367 · raspberrypi/linux · GitHub]]\\ [[https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/README.md|Power Supply - Raspberry Pi Documentation]]\\ Power Supply Warnings On all models of Raspberry Pi since the Raspberry Pi B+ (2014) except the Zero range, there is low-voltage detection circuitry that will detect if the supply voltage drops below 4.63V (+/- 5%). This will result in a warning icon being displayed on all attached displays and an entry being added to the kernel log.