Temperatur des Servers herausfinden

Ein Server ist ja schon eine wunderbare Sache. Jedoch sollte nicht nur das Projekt auf dem Server laufen, sondern auch das Monitoring. Dazu sind z.b. auch Temperaturen der CPU Kerne oder die Geschwindigkeit der Lüfter zu überprüfen bzw. zu überwachen. Den ein ausgefallenden Lüfter könnte großen Schaden einrichten. – Überhizuung könnte die Folge sein. Wie gut, dass Linux bzw. Debian dazu von Haus aus, das Programm sensors besitzt. Sensors sammelt alle Informationen und gibt diese als Liste auf der Bash wieder aus. Unter anderem auch Temperaturen oder Lüftergeschwindigkeit. Diese Werte kann man dann weiter an einem Monitoring System überreichen. Um Sensoren zu dedektieren benutzen wir hierzu das unterprogramm lm-sensors. Fangen wir mit der evtl. nicht vorhandenen Installation an.

apt-get install lm-sensors

Nun können wir ein Scan aller Hardware Komponente machen. Dies machen wir mit dem Befehl:

sudo sensors-detect

Der Scan beginnt nun durch alle Hardwarekomponenten nach Sensoren zu suchen. Diese müssen wir immer vor dem Scannen bestätigen. Tipp: Standardmäßig ist alles auf (Yes) gesetezt, so können wir den Scan immer mit einem [ENTER] bestätigen.

root@linux:~# sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# Board: ASRock Q1900B-ITX
# Kernel: 4.9.0-6-amd64 x86_64
# Processor: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz (6/55/8)

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
Module cpuid loaded successfully.
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
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               Yes
Found `Nuvoton NCT5573D/NCT5577D/NCT6776F Super IO Sensors' Success!
    (address 0x290, driver `nct6775')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): yes
Probing for `IPMI BMC KCS' at 0xca0...                      No
Probing for `IPMI BMC SMIC' at 0xca8...                     No

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
Probing for `National Semiconductor LM78' at 0x290...       No
Probing for `National Semiconductor LM79' at 0x290...       No
Probing for `Winbond W83781D' at 0x290...                   No
Probing for `Winbond W83782D' at 0x290...                   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):
Found unknown SMBus adapter 8086:0f12 at 0000:00:1f.3.
Sorry, no supported PCI bus adapters found.
Module i2c-dev loaded successfully.

Next adapter: SMBus I801 adapter at f000 (i2c-0)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus ssc (i2c-1)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus vga (i2c-2)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus panel (i2c-3)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus dpc (i2c-4)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus dpb (i2c-5)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus dpd (i2c-6)
Do you want to scan it? (yes/NO/selectively):

Next adapter: DPDDC-B (i2c-7)
Do you want to scan it? (yes/NO/selectively):


Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `nct6775':
  * ISA bus, address 0x290
    Chip `Nuvoton NCT5573D/NCT5577D/NCT6776F Super IO Sensors' (confidence: 9)

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
nct6775
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)

Unloading i2c-dev... OK
Unloading cpuid... OK

zum Schluss werden wir gefragt, ob wir die neuen Sensoren in der /etc/modules eintragen wollen. Dies Bestätigen wir ebenfalls mit einem [ENTER]

Nachdem wir nun alle vorhanden Sensoren haben, können wir uns nun mit dem Befehl sensors alle Werte anschauen.

root@linux:~# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +26.8°C  (crit = +90.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +36.0°C  (high = +105.0°C, crit = +105.0°C)
Core 1:       +36.0°C  (high = +105.0°C, crit = +105.0°C)
Core 2:       +37.0°C  (high = +105.0°C, crit = +105.0°C)
Core 3:       +37.0°C  (high = +105.0°C, crit = +105.0°C)

Mit dem Befehl Watch können wir auch eine Live Ansicht kreieren:

watch -n1 -d sensors

Wie hilfreich war dieser Beitrag?

Klicke auf die Sterne um zu bewerten!

Durchschnittliche Bewertung 5 / 5. Anzahl Bewertungen: 1

Bisher keine Bewertungen! Sei der Erste, der diesen Beitrag bewertet.

2 Kommentare

  1. Die Überschrift des Artikels spricht von „Lüftergeschwindigkeit/Temperatur“. Es wird dann im Artikel aber nur gezeigt, wie die Temperatur ermittelt werden kann. Zur Lüftergeschwindigkeit ist nichts weiter erwähnt….
    Also: bitte Überschrift ändern oder Artikel bzgl. Thema Lüftergeschwindigkeit ergänzen.

Schreibe einen Kommentar zu Klaus Abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert