Kodi Community Forum
Linux Getting to the correct sensors for temperature monitoring - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux Getting to the correct sensors for temperature monitoring (/showthread.php?tid=243409)



Getting to the correct sensors for temperature monitoring - dcrdev - 2015-10-12

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?


RE: Getting to the correct sensors for temperature monitoring - ironic_monkey - 2015-10-12

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 +'.


RE: Getting to the correct sensors for temperature monitoring - dcrdev - 2015-10-12

Brilliant thank you.