You are not logged in.

#1 2015-02-17 18:04:29

kinkinkijkin
Member
Registered: 2014-07-15
Posts: 30

[solved]Using lm_sensors to read only a single temp at a time

Okay so usually one would just |grep whatever they needed to see

the issue here is that this is what running sensors returns:

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +14.9°C  (high = +70.0°C)

radeon-pci-0100
Adapter: PCI adapter
temp1:        +35.0°C  (crit = +120.0°C, hyst = +90.0°C)

f71889a-isa-0480
Adapter: ISA adapter
+3.3V:        +3.31 V  
in1:          +1.45 V  (max =  +2.04 V)
in2:          +1.10 V  
in3:          +0.89 V  
in4:          +0.62 V  
in5:          +1.36 V  
in6:          +1.67 V  
3VSB:         +3.30 V  
Vbat:         +3.31 V  
fan1:        2782 RPM
fan2:        1564 RPM
fan3:        2354 RPM
temp1:        +28.0°C  (high = +85.0°C, hyst = +81.0°C)
                       (crit = +80.0°C, hyst = +76.0°C)  sensor = transistor
temp2:        +38.0°C  (high = +85.0°C, hyst = +79.0°C)
                       (crit = +109.0°C, hyst = +103.0°C)  sensor = thermistor
temp3:        +32.0°C  (high = +70.0°C, hyst = +68.0°C)
                       (crit = +85.0°C, hyst = +83.0°C)  sensor = transistor

Might be more for using grep and cut to get only a single entry I don't know

I need this so that I can use it in my conkyrc. Could also be useful to cut everything but the temperature itself.

side note: alternative solutions to the issue causing me to need to do this would also be appreciated

EDIT: nevermind a solution is on the wiki and I hadn't searched hard enough

Last edited by kinkinkijkin (2015-02-17 18:15:03)

Offline

#2 2015-02-17 18:14:52

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [solved]Using lm_sensors to read only a single temp at a time

Presumably for starters you want a particular temp1. Did you look into running sensors with -c flag to specify particular config file? It looks like that could allow polling of only a particular adapter, then the output could be piped to awk.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2015-02-17 18:17:18

kinkinkijkin
Member
Registered: 2014-07-15
Posts: 30

Re: [solved]Using lm_sensors to read only a single temp at a time

nevermind, a solution is on the wiki, in the lm sensors page, and I hadn't googled hard enough

Offline

Board footer

Powered by FluxBB