sysstat 温度ロギングの有効化

sysstat 温度ロギングの有効化

過去の温度情報を使用して将来のホストエラーを診断できるように、sysstatが温度を読み取るように設定しようとしています。

温度情報を取得するには、次のコマンドを使用しようとします。

$ sar -m TEMP
Requested activities not available in file /var/log/sysstat/sa22

これに関するsarのマニュアルページの内容は次のとおりです。

-m { keyword [,...] | ALL }
       Report power management statistics.  Note that these statistics depend on sadc's option "-S  POWER"  to
       be collected.

       Possible keywords are CPU, FAN, FREQ, IN, TEMP and USB.

       [...]

       With  the  TEMP  keyword,  statistics about devices temperature are reported.  The following values are
       displayed:

したがって、電源管理情報はデフォルトでは記録されません(温度はこの情報のサブセットです)。だからファイルをアクティブ/etc/sysstat/sysstatにするように変更しました。私はこれを変更しました:

# Parameters for the system activity data collector (see sadc(8) manual page)
# which are used for the generation of log files.
# By default contains the `-S DISK' option responsible for generating disk
# statisitcs. Use `-S XALL' to collect all available statistics.
SADC_OPTIONS="-S DISK"

以下を入力してください:

SADC_OPTIONS="-S DISK,POWER"

もう一つの質問はsysstat 問題トラッカーsysstatを実行するにはlm-sensorが必要なので、そのパッケージもインストールしました。出力は次のとおりですsensors

$ sensors
acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +119.0°C)
temp2:        +29.8°C  (crit = +119.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +89.0°C  (high = +82.0°C, crit = +100.0°C)
Core 0:        +86.0°C  (high = +82.0°C, crit = +100.0°C)
Core 1:        +88.0°C  (high = +82.0°C, crit = +100.0°C)
Core 2:        +89.0°C  (high = +82.0°C, crit = +100.0°C)
Core 3:        +89.0°C  (high = +82.0°C, crit = +100.0°C)
Core 4:        +88.0°C  (high = +82.0°C, crit = +100.0°C)
Core 5:        +87.0°C  (high = +82.0°C, crit = +100.0°C)

nvme-pci-0800
Adapter: PCI adapter
Composite:    +38.9°C  (low  = -273.1°C, high = +84.8°C)
                       (crit = +84.8°C)
Sensor 1:     +38.9°C  (low  = -273.1°C, high = +65261.8°C)
Sensor 2:     +37.9°C  (low  = -273.1°C, high = +65261.8°C)

だから、これは私の温度センサーを正しく検出するようです。

別のコレクションのために10分ほど待ってみました。 (私のシステムは、10分ごとに05、15、25などの時間にログを記録するように構成されています。)

残念ながら、これをすべて実行した後も同じエラーが発生します。

$ sar -m TEMP
Requested activities not available in file /var/log/sysstat/sa22

ベストアンサー1

私は次の3つのステップを経てこの作業を成功させました。

  1. 上記の質問のすべての設定を完了してください。

  2. 現在の日付のsysstatログファイルを削除します。

    root@host:~# sar -m TEMP
    Requested activities not available in file /var/log/sysstat/sa30
    root@host:~# rm /var/log/sysstat/sa30
    
  3. スクリプトの実行/usr/lib/sysstat/debian-sa1 1 1(Debian / Ubuntu以外のシステムでは異なる場合があります)

その後はsar -m TEMP実行してください。

おすすめ記事