Arch: датчики тепературы

Автор: | 16/06/2017

Wiki>>>

Пришло лето, ноут иногда стоит на балконе и уже начинает перегреваться.

Что бы от слеживать температуру – устанавливаем lm_sensors:

[simterm]

$ sudo pacman -S lm_sensors

[/simterm]

Проверяем. Запускаем, при первом запуске просто везде отвечаем “yes“:

[simterm]

$ sudo sensors-detect
# sensors-detect revision $Revision$
# System: Acer Aspire 3750G [V1.04] (laptop)
# Board: Acer JE30_HR
# Kernel: 4.10.13-1-ARCH x86_64
# Processor: Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz (6/42/7)
ююю
Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 
...                                                                                                                                                                 
Intel digital thermal sensor...                             Success!                                                                                                                                                                          
...
Do you want to generate /etc/conf.d/lm_sensors? (YES/no):
Created symlink /etc/systemd/system/multi-user.target.wants/lm_sensors.service → /usr/lib/systemd/system/lm_sensors.service.
Unloading i2c-dev... OK
Unloading cpuid... OK

[/simterm]

Проверяем температуру:

[simterm]

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +58.0°C  (high = +80.0°C, crit = +85.0°C)
Core 0:        +58.0°C  (high = +80.0°C, crit = +85.0°C)
Core 1:        +54.0°C  (high = +80.0°C, crit = +85.0°C)

acpitz-virtual-0
Adapter: Virtual device
temp1:        +58.0°C  (crit = +84.0°C)

nouveau-pci-0100
Adapter: PCI adapter
GPU core:         N/A  (min =  +0.85 V, max =  +1.03 V)
temp1:            N/A  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)

[/simterm]

Последним шагом – хочется вывести данные о температуре процессора на экран.

Я пользуюсь tint2, блок, выводящий температуру выглядит так:

...
# Core0,1 temp
execp = new
#execp_command = sensors | grep "Core 0" | awk '{print $1$2" " $3}' && sensors | grep "Core 1" | awk '{print $1$2" " $3}'
execp_command = a=$(sensors | grep "Core 0" | cut -d" " -f 1,2,10) && b=$(sensors | grep "Core 1" | cut -d" " -f 1,2,10) && printf "$a $b"
execp_has_icon = 0
execp_interval = 1
execp_centered = 1
execp_font = DejaVu Sans Mono 9
execp_font_color = #FC8B32 100
execp_padding = 0 0
execp_tooltip =
...

И выглядит это следующим образом:

Готово.