Ubuntu métriques matériel

De EjnTricks

Le paquet lm-sensors va permettre d'interroger un ensemble de capteurs pourvu qu'ils soient installés sur la machine.


Command-icon.png Exécution avant configuration

Le paquet fourni le binaire sensors, dans /usr/bin, qui permet d'afficher les données des capteurs. Dans le cadre de cette installation, la commande fourni le résultat suivant.

#sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +44.0°C  (high = +70.0°C)
                       (crit = +100.0°C, hyst = +95.0°C)

Dans cet exemple, seul un capteur est disponible et indique une température de 44°C, avec un maximum à 70°.


File-find-icon.png Recherche de capteurs

Le binaire sensors-detect va permettre d'explorer la machine et de détecter les capteurs disponibles. Comme indiqué sur la page officielle Ubuntu, il est préférable de répondre favorablement à toutes les questions.

#sudo sensors-detect
# sensors-detect revision 6085 (2012-10-30 18:18:45 +0100)
# System: Dell Inc. Inspiron 410
# Board: Dell Inc. 0THJX5

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...                           Success!
    (driver `k10temp')
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 15h power sensors...                             No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM 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'...               No
Trying family `ITE'...                                      Yes
Found `ITE IT8721F/IT8758E Super IO Sensors'                Success!
    (address 0xa10, driver `it87')
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): YES
Using driver `i2c-piix4' for device 0000:00:14.0: ATI Technologies Inc SB600/SB700/SB800 SMBus
Module i2c-dev loaded successfully.

Next adapter: Radeon i2c bit bus 0x90 (i2c-0)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x91 (i2c-1)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x92 (i2c-2)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x93 (i2c-3)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x14 (i2c-4)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: SMBus PIIX4 adapter at 0b00 (i2c-5)
Do you want to scan it? (yes/NO/selectively): yes
Client found at address 0x50
Probing for `Analog Devices ADM1033'...                     No
Probing for `Analog Devices ADM1034'...                     No
Probing for `SPD EEPROM'...                                 Yes
    (confidence 8, not a hardware monitoring chip)
Probing for `EDID EEPROM'...                                No
Client found at address 0x51
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: SMBus PIIX4 adapter at 0b20 (i2c-6)
Do you want to scan it? (yes/NO/selectively): yes

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

Driver `it87':
  * ISA bus, address 0xa10
    Chip `ITE IT8721F/IT8758E Super IO Sensors' (confidence: 9)

Driver `k10temp' (autoloaded):
  * Chip `AMD Family 10h thermal sensors' (confidence: 9)

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
it87
#----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)yes
Successful!

Monitoring programs won't work until the needed modules are
loaded. You may want to run 'service kmod start'
to load them.

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

A noter qu'un capteur a été détecté avec le driver k10temp, qui a été mentionné lors de l'exécution de sensors.

Ayant accepter la modification du fichier /etc/modules, celui-ci contient les drivers détectés. Dans le cadre de cet article, le contenu est le suivant.

#cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
rtc

# Generated by sensors-detect on Mon Apr 14 19:27:13 2014
# Chip drivers
it87

Les lignes ajoutées sont facilement identifiables par le commentaire ajouté par l'outil. Pour être pris en compte, l'utilisateur a été invité à exécuter la commande service kmod start.

#sudo service kmod start
kmod stop/waiting

Pour s'assurer que le module est bien chargé, il suffit d'utiliser le binaire kmod. Dans le cadre de cet exemple, le driver it87 a été ajouté. La recherche est donc naturellement orienté sur celui-ci.

#kmod list | grep it87
it87                   43113  0
hwmon_vid              12783  1 it87


Command-icon.png Exécution après configuration

Après avoir effectué cette recherche, la commande sensors va présenter beaucoup plus d'informations.

#sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +43.0°C  (high = +70.0°C)
                       (crit = +100.0°C, hyst = +95.0°C)

it8721-isa-0a10
Adapter: ISA adapter
in0:          +3.06 V  (min =  +3.05 V, max =  +2.03 V)  ALARM
in1:          +3.02 V  (min =  +2.44 V, max =  +1.57 V)  ALARM
in2:          +2.22 V  (min =  +2.87 V, max =  +1.08 V)  ALARM
+3.3V:        +3.29 V  (min =  +3.05 V, max =  +5.30 V)
in4:          +1.99 V  (min =  +2.23 V, max =  +2.71 V)  ALARM
in5:          +0.72 V  (min =  +1.48 V, max =  +1.16 V)  ALARM
in6:          +1.82 V  (min =  +3.04 V, max =  +3.02 V)  ALARM
3VSB:         +3.26 V  (min =  +2.86 V, max =  +4.58 V)
Vbat:         +3.10 V
fan1:           0 RPM  (min =   25 RPM)  ALARM
fan2:        1739 RPM  (min =   12 RPM)
temp1:        +43.0°C  (low  = -54.0°C, high = +119.0°C)  sensor = thermal diode
temp2:        +86.0°C  (low  = -93.0°C, high =  -2.0°C)  ALARM  sensor = Intel PECI
temp3:       -128.0°C  (low  = +127.0°C, high = +99.0°C)  sensor = disabled
intrusion0:  ALARM


Viewer icon.png Voir aussi

Documentation officielle: http://doc.ubuntu-fr.org/lm-sensors