lm-sensorsは、Linux用のハードウェアヘルスモニタリングドライバーを提供します。 これは、システム管理者がハードウェアの状態を確認するために使用します。 また、サーバーのハードウェアインフラストラクチャを監視するためにも使用され、ミッションクリティカルなアプリケーションで非常に役立ちます。 ただし、使用するように構成するのは比較的簡単です。 以下に、Ubuntu / Debianにlmセンサーツールをインストールする方法と Fedora Linuxディストリビューション。
1)インストール
UbuntuおよびDebianディストリビューションの場合
# apt install lm-sensors
の上 Fedora 26およびRPMLinuxディストリビューション
# dnf install lm_sensors
インストールが完了したら、次のコマンドを実行して、現在のハードウェア仕様を確認します。
# sudo sensors-detect
それはあなたにいくつかの質問をします。 それらすべてについて「はい」と答えてください。
```
[root@localhost bin]# sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# System: ASUSTeK COMPUTER INC. X540LA [1.0] (laptop)
# Kernel: 4.11.11-300.fc26.x86_64 x86_64
# Processor: Intel(R) Core(TM) i3-5020U CPU @ 2.20GHz (6/61/4)
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): yes
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... Success!
(driver `coretemp')
Intel AMB FB-DIMM thermal sensor... No
Intel 5500/5520/X58 thermal sensor... No
VIA C7 thermal sensor... No
VIA Nano thermal sensor... No
Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): yes
/dev/port: Operation not permitted
Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): yes
/dev/port: Operation not permitted
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): yes
Found unknown SMBus adapter 8086:9ca2 at 0000:00:1f.3.
Sorry, no supported PCI bus adapters found.
Module i2c-dev loaded successfully.
Next adapter: i915 gmbus vga (i2c-0)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: i915 gmbus dpc (i2c-1)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: i915 gmbus dpb (i2c-2)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: i915 gmbus dpd (i2c-3)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: DPDDC-A (i2c-4)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: DPDDC-B (i2c-5)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: SMBus I801 adapter at 4040 (i2c-6)
Do you want to scan it? (YES/no/selectively): yes
Client found at address 0x52
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Yes
(confidence 8, not a hardware monitoring chip)
Next adapter: Synopsys DesignWare I2C adapter (i2c-7)
Do you want to scan it? (YES/no/selectively): yes
Adapter doesn't support all probing functions.
Some addresses won't be probed.
Next adapter: Synopsys DesignWare I2C adapter (i2c-8)
Do you want to scan it? (YES/no/selectively): yes
Adapter doesn't support all probing functions.
Some addresses won't be probed.
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `coretemp':
* Chip `Intel digital thermal sensor' (confidence: 9)
Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): yes
Unloading i2c-dev... OK
[root@localhost bin]#
```
lmセンサーのテスト
最後に、CPU温度タイプを取得します sensors
ターミナルで。 これは、 lm-sensors
ツールは正しく機能します。 また、CPU温度、ファン速度、およびその他のデータを確認するには、次のコマンドを実行します。
[root@localhost bin]# sensors
asus-isa-0000
Adapter: ISA adapter
cpu_fan: 2100 RPM
temp1: +49.0°C
acpitz-virtual-0
Adapter: Virtual device
temp1: +49.0°C (crit = +108.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +50.0°C (high = +105.0°C, crit = +105.0°C)
Core 0: +49.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +50.0°C (high = +105.0°C, crit = +105.0°C)
pch_wildcat_point-virtual-0
Adapter: Virtual device
temp1: +47.0°C
このセンサーの出力には、asus-isa-0000(マザーボードセンサー)とccoretemp-isa-0000(Intel Coreセンサー)の2つのデバイスが表示されます。 マザーボードセンサーデバイスには、マザーボードが電源ユニットから受け取った電圧(in1-6)、ファン速度(RPMを使用したエントリ)、およびさまざまな内部温度に関する情報があります。
2)lm-sensor GUIをインストールしてカスタマイズします:Psensor
a)psensorをインストールします
ターミナルでlm-sensorを使用したくない場合は、lm-sensorsのGUIであるpsensorをインストールできます。
Debianシステムの場合
# apt install psensor
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libappindicator3-1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libindicator3-7 libjson-c3 libxnvctrl0 psensor-common
The following NEW packages will be installed:
libappindicator3-1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libindicator3-7 libjson-c3 libxnvctrl0 psensor psensor-common
Redhatシステムでは、psensorはデフォルトのシステムリポジトリから利用できないため、ソースからコンパイルする必要があります。 最初にwgetをインストールする必要があります
# dnf install wget
Last metadata expiration check: 0:24:13 ago on Wed 23 Aug 2017 03:54:38 AM UTC.
Dependencies resolved.
======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
wget x86_64 1.19.1-3.fc26 fedora 725 k
次に、コンパイルに必要なパッケージをインストールします
# dnf group install 'Development Tools'
Last metadata expiration check: 0:50:12 ago on Wed 23 Aug 2017 03:54:38 AM UTC.
Dependencies resolved.
これで、ソースからこの記事を書くときに、psensorの最新バージョン(1.2.0)をダウンロードできます。
# wget https://wpitchoune.net/psensor/files/psensor-1.2.0.tar.gz
--2017-08-23 04:31:01-- https://wpitchoune.net/psensor/files/psensor-1.2.0.tar.gz
Resolving wpitchoune.net (wpitchoune.net)... 92.243.29.231
今、あなたはそれを解凍することができます
# tar xvf psensor-1.2.0.tar.gz
psensor-1.2.0/
psensor-1.2.0/test-driver
psensor-1.2.0/ar-lib
これで、psensorをコンパイルできます
# cd psensor-1.2.0
# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
# make install
Making install in doc
make[1]: Entering directory '/root/psensor-1.2.0/doc'
make[2]: Entering directory '/root/psensor-1.2.0/doc'
b)psensorを起動してカスタマイズします
psensorがインストールされたので、グラフィカルメニューからpsensorを起動して、次のような結果を得ることができます。
temp1、Core1、およびST500LT012-1DG142の選択を解除した場合、以下のように右側の要素を外すことで、グラフに表示する要素を選択できます。
psensorプリファレンスを編集する可能性があります。 編集できます
- 環境設定: ツールの起動方法、そのインターフェイス、またはグラフの表示を以下のように変更できます。 Pセンサー->設定
- センサー設定: ここでは、アラームなどの監視対象サービスでpsensorツールがどのように動作するかを編集して、通知を送信したり、サービスの名前を以下のように変更したりできます。 Pセンサー->センサー設定
次に、以下のように表示される通知を見ることができます
The lm-sensors
ハードウェアヘルスチェックを実行するための非常に便利なツールです。 ただし、CLIインターフェイスが貧弱なため、ほとんどのユーザーはGUIベースのアプリケーションを好みます。 ただし、lm-sensorは、次のようなGUIツールを使用するように構成できます。 sensors-applet
、 psensor
これは、CPU、HDDの温度、ファンの速度などのグラフを表示するGTKアプリケーションです。 lm-sensors
を使用してシステムファンを制御するようにさらに構成できます fancontrol
脚本。 これは、を実行して簡単に行うことができます sudo pwmconfig
コマンドを実行し、指示に注意深く従ってください。