Banana Pi + OMV : 温度管理

OMV には温度管理項目がない

OpenMediaVault では標準でグラフィカルなWeb管理画面が用意されており、直感的な操作が可能です。

ただ、ダッシュボードには CPU使用率やメモリ使用率などの項目がある一方、CPU温度の項目はありません。
ミドルレンジ以上でも空冷ファンが付かないことのある SBC では、少し心配です。
※SBCでは、ローエンドではヒートシンクすら付かないこともザラです。
かの有名な Raspberry Pi 3 Model B も標準ではチップ丸見えです(Raspberry Pi3 Model BのSoC「BCM43438」も意外と発熱する)。

確認方法

追加パッケージ無しで確認できる方法は以下の2つです。

ターミナルログイン

ログイン時に温度が表示されます。

] ____                                  ____  _ 
| __ )  __ _ _ __   __ _ _ __   __ _  |  _ \(_)
|  _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | |
| |_) | (_| | | | | (_| | | | | (_| | |  __/| |
|____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_|   |_|


Welcome to ARMBIAN 5.46 user-built Debian GNU/Linux 9 (stretch) 4.14.44-sunxi   
System load:   1.31 0.78 0.51   Up time:       47 min       
Memory usage:  10 % of 998MB    IP:            192.168.2.210
CPU temp:      50°C             
Usage of /:    87% of 920M      storage/:      16% of 19G       

シェル

$ sudo cat /sys/class/thermal/thermal_zone0/temp
45800

1000で割ると温度になります。
45.8度 = 45800。

どんなツールが良いか

OMV はファイルサーバ・アプライアンスで Web管理画面があります。
ツールを追加導入するなら、わざわざログインしなければならない GUI のツールは避け、コマンドベースのツールが相性が良いのではないでしょうか。

  • GUI
    ちなみに、システムモニターの様な GUI版であれば xsensors がシンプルでお薦めです。

base on Debian -- sid の xsensors パッケージに関する詳細

xsensors reads data from the libsensors library regarding hardware health such as temperature, voltage and fan speed and displays the information in a digital read-out.

xsensorsは、温度、電圧、ファン速度などのハードウェアの状態に関するデータをlibsensorsライブラリから読み取り、その情報をデジタル読み出しで表示します。

Linux monitoring sensors

今回は、コマンドで温度取得が出来るパッケージ lm_sensors を使うことにしました。

base on lm_sensors - ArchWiki

lm_sensors (Linux monitoring sensors) は温度・電圧・ファンを監視するためのツールやドライバーを提供するフリーなオープンソースアプリケーションです。このドキュメントでは lm_sensors をインストール・設定・使用する方法を説明します。

導入

$ sudo apt-get install lm-sensors

以下のパッケージが新たにインストールされます:
  lm-sensors
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。

センサの検出

lm-sensors パッケージ導入後に sensors-detect コマンドを用いてハードウェアの検出を行います。

$ sudo sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# Kernel: 4.14.44-sunxi armv7l
# Processor: ARMv7 Processor rev 4 (v7l) (//)

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/4.14.44-sunxi
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 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: mv64xxx_i2c adapter (i2c-0)
Do you want to scan it? (YES/no/selectively): 

Next adapter: mv64xxx_i2c adapter (i2c-1)
Do you want to scan it? (YES/no/selectively): 

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
http://www.lm-sensors.org/wiki/Devices for driver status.

Banana Pi は未対応

物の見事に未検出となりました。
ハードウェアの検出が成功(Success!)すると、モジュールのロードを促すメッセージが表示されます。

Driver `k10temp' (autoloaded):

必要に応じてドライバをロードします。

実行

$ sensors
iio_hwmon-isa-0000
Adapter: ISA adapter
temp1:        +45.6°C