Linux Getting to the correct sensors for temperature monitoring
#1
I have an AMD processor which only reports thermal margin through lm-sensors. I have to use the motherboard's onboard monitoring chip to get the correct values. I'd like to display these values in Kodi, but am having trouble putting together a command that will always report the correct values. My sensors output is this:

Code:
k10temp-pci-00c3
Adapter: PCI adapter
temp1:         +5.5°C  (high = +70.0°C)
                       (crit = +70.0°C, hyst = +69.0°C)

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:           N/A  (crit =  65.19 W)

f71808a-isa-0a00
Adapter: ISA adapter
+3.3V:        +3.31 V  
in1:          +0.96 V  
in2:          +0.94 V  
in3:          +1.10 V  
3VSB:         +3.30 V  
Vbat:         +3.22 V  
fan1:           0 RPM  ALARM
fan2:           0 RPM  ALARM
fan3:           0 RPM  ALARM
temp1:        +33.0°C  (high = +85.0°C, hyst = +81.0°C)
                       (crit = +100.0°C, hyst = +96.0°C)  sensor = thermistor
temp2:        +37.0°C  (high = +85.0°C, hyst = +81.0°C)
                       (crit = +100.0°C, hyst = +96.0°C)  sensor = transistor

I'd like to get to the second temp1 reading.

Can anyone help?
Reply
#2
not exactly proud, but it works.

Code:
sensorinput | tail -n 10 | grep ^temp1 | cut -d '.' -f1 | cut -d'+' -f2

'take the last then lines of the output, look for a line starting with temp1, then print all chars before a '.' (line is now temp1: +33) then print all chars behind the +'.
Reply
#3
Brilliant thank you.
Reply

Logout Mark Read Team Forum Stats Members Help
Getting to the correct sensors for temperature monitoring0