Lm sensors
From ArchWiki
i18n |
---|
English |
Česky |
Русский |
Українська |
简体中文 |
This document tells you how to install, setup, and use lm_sensors so that you can monitor CPU and/or motherboard temperature and fan speeds.
Contents |
Summary
lm_sensors (Linux-monitoring sensors), a free open source software-tool for Linux, provides tools and drivers for monitoring temperatures, voltage, and fans.
Usage
Installation
Install the sensors package from the main repo
# pacman -S lm_sensors
Setting up lm_sensors
Use sensors-detect to detect and generate a list of kernel modules# sensors-detectThis will create the configuration and store it in /etc/conf.d/lm_sensors. Be sure you answer YES to the questions about probing various sensors. When the script is finished, you'll be presented with a summary of the probes, example from my system
Now follows a summary of the probes I have just done. Just press ENTER to continue: Driver `it87': * ISA bus, address 0x290 Chip `ITE IT8718F Super IO Sensors' (confidence: 9) Driver `coretemp': * Chip `Intel Core family thermal sensor' (confidence: 9)Automatically load the kernel modules at boot time by adding sensors to the DAEMONS array in /etc/rc.conf
DAEMONS=(syslog-ng crond ... sensors ...)Alternatively, manually add them to your MODULES array in /etc/rc.conf
MODULES=(coretemp it87 acpi-cpufreq)You do NOT need both the DAEMONS setting and the MODULES setting.
Testing your lm_sensors
To test your setup, load the kernel modules manually or by using the sensors init script. You do NOT have to do both. Example manually adding them
# modprobe it87 # modprobe coretemp
Example using the script
# /etc/rc.d/sensors start
You should see something like this when you run sensors
$ sensors coretemp-isa-0000 Adapter: ISA adapter Core 0: +30.0°C (high = +76.0°C, crit = +100.0°C) coretemp-isa-0001 Adapter: ISA adapter Core 1: +30.0°C (high = +76.0°C, crit = +100.0°C) coretemp-isa-0002 Adapter: ISA adapter Core 2: +32.0°C (high = +76.0°C, crit = +100.0°C) coretemp-isa-0003 Adapter: ISA adapter Core 3: +30.0°C (high = +76.0°C, crit = +100.0°C) it8718-isa-0290 Adapter: ISA adapter in0: +1.17 V (min = +0.00 V, max = +4.08 V) in1: +1.31 V (min = +1.28 V, max = +1.68 V) in2: +3.28 V (min = +2.78 V, max = +3.78 V) in3: +2.88 V (min = +2.67 V, max = +3.26 V) in4: +2.98 V (min = +2.50 V, max = +3.49 V) in5: +1.34 V (min = +0.58 V, max = +1.34 V) ALARM in6: +2.02 V (min = +1.04 V, max = +1.36 V) ALARM in7: +2.83 V (min = +2.67 V, max = +3.26 V) Vbat: +3.28 V fan1: 1500 RPM (min = 3245 RPM) ALARM fan2: 0 RPM (min = 3245 RPM) ALARM fan3: 0 RPM (min = 3245 RPM) ALARM temp1: +18.0°C (low = +127.0°C, high = +64.0°C) sensor = thermal diode temp2: +32.0°C (low = +127.0°C, high = +64.0°C) sensor = thermistor temp3: +38.0°C (low = +127.0°C, high = +64.0°C) sensor = thermistor cpu0_vid: +2.050 V acpitz-virtual-0 Adapter: Virtual device temp1: +18.0°C (crit = +64.0°C)
Reading SPD values from memory modules (Optional)
To read the SPD timing values from you memory modules, download this perl script: SPDdecodeScript Once you have downloaded it, you will need to load the eeprom kernel module
# modprobe eeprom
Now can you make the decode-dimms.pl executable and run it
$ chmod a+x decode-dimms.pl
Here is an example output from my machine
$ ./decode-dimms.pl Memory Serial Presence Detect Decoder By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner, Jean Delvare and others Version 2.10.8 Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050 Guessing DIMM is in bank 1 ---=== SPD EEPROM Information ===--- EEPROM Checksum of bytes 0-62 OK (0x0D) # of bytes written to SDRAM EEPROM 128 Total number of bytes in EEPROM 256 Fundamental Memory type DDR2 SDRAM SPD Revision 1.2 ---=== Memory Characteristics ===--- Maximum module speed 800MHz (PC2-6400) Size 2048 MB tCL-tRCD-tRP-tRAS 5-5-5-18 Supported CAS Latencies 5, 4 Minimum Cycle Time (CAS 5) 2.5 ns Maximum Access Time (CAS 5) 0.4 ns Minimum Cycle Time (CAS 4) 3.7 ns Maximum Access Time (CAS 4) 0.5 ns ---=== Manufacturing Information ===--- Manufacturer Corsair Manufacturing Location Code 0x01 Part Number CM2X2048-8500C5D Revision Code 0x2020 Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0052 Guessing DIMM is in bank 3 ---=== SPD EEPROM Information ===--- EEPROM Checksum of bytes 0-62 OK (0x0D) # of bytes written to SDRAM EEPROM 128 Total number of bytes in EEPROM 256 Fundamental Memory type DDR2 SDRAM SPD Revision 1.2 ---=== Memory Characteristics ===--- Maximum module speed 800MHz (PC2-6400) Size 2048 MB tCL-tRCD-tRP-tRAS 5-5-5-18 Supported CAS Latencies 5, 4 Minimum Cycle Time (CAS 5) 2.5 ns Maximum Access Time (CAS 5) 0.4 ns Minimum Cycle Time (CAS 4) 3.7 ns Maximum Access Time (CAS 4) 0.5 ns ---=== Manufacturing Information ===--- Manufacturer Corsair Manufacturing Location Code 0x01 Part Number CM2X2048-8500C5D Revision Code 0x2020 Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0057 Guessing DIMM is in bank 8 ---=== SPD EEPROM Information ===--- EEPROM Checksum of bytes 0-62 Bad (found 0x20, calculated 0x0A) Number of SDRAM DIMMs detected and decoded: 2
Using sensor data
Graphical Frontends
There are a variety of front-ends for sensors data. Some are listed below. The name in italicized text is the name of the package in the repo, in other words, you can install them via pacman.
- sensors-applet - an applet for the GNOME Panel to display readings from hardware sensors, including CPU temperature, fan speeds and voltage readings.
- ksensors - ksensors is nice lm_sensors frontend for KDE
- xsensors - X11 interface to lm_sensors
- xfce4-sensors-plugin - A lm_sensors plugin for the Xfce panel
- conky - Conky is an advanced, highly configurable system monitor for X based on torsmo
Sensord
There is an optional daemon logging package called sensord that can log your data to a round robin database (rrd) that you can visualize graphically. Placeholder for someone to write a wiki page on installation/configuration of sensord.