shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Capturar temperatura de processador.


From: Ricardo Klein
Subject: Re: [shell-script] Capturar temperatura de processador.
Date: Sat, 25 Feb 2017 18:21:52 -0300

Não é uma solução "bonita", mas se tu colocar um | tail -1 no final, vai printar apenas o último registro.


2017-02-25 13:05 GMT-03:00 address@hidden [shell-script] <address@hidden>:
 

Caros,


Boa Tarde a todos,


Estou utilizando o pacote lm-sensors para detectar a temperatura de meus processadores porém tenho 3 valores iguais ao utilizar o script que estou criando (onde travei)


[cleal@xxxxxxxxxx]$ sensors

radeon-pci-0100

Adapter: PCI adapter

temp1:        +54.0°C  (crit = +120.0°C, hyst = +90.0°C)


k10temp-pci-00c3

Adapter: PCI adapter

temp1:        +29.0°C  (high = +70.0°C)

                       (crit = +80.0°C, hyst = +77.0°C)


fam15h_power-pci-00c4

Adapter: PCI adapter

power1:       58.93 W  (crit = 125.19 W)


it8728-isa-0228

Adapter: ISA adapter

in0:          +0.90 V  (min =  +0.00 V, max =  +3.06 V)

in1:          +1.51 V  (min =  +0.00 V, max =  +3.06 V)

in2:          +2.06 V  (min =  +0.00 V, max =  +3.06 V)

in3:          +1.99 V  (min =  +0.00 V, max =  +3.06 V)

in4:          +2.02 V  (min =  +0.00 V, max =  +3.06 V)

in5:          +0.80 V  (min =  +0.00 V, max =  +3.06 V)

in6:          +2.22 V  (min =  +0.00 V, max =  +3.06 V)

3VSB:         +3.31 V  (min =  +0.00 V, max =  +6.12 V)

Vbat:         +3.14 V  

fan1:        1147 RPM  (min =    0 RPM)

fan2:         940 RPM  (min =    0 RPM)

fan3:        1278 RPM  (min =    0 RPM)

fan4:           0 RPM  (min =    0 RPM)

fan5:           0 RPM  (min =    0 RPM)

temp1:        +47.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor

temp2:        +51.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode

temp3:        +29.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = Intel PECI

intrusion0:  ALARM



quando digito o comando abaixo tenho a saída:


#sensors | grep 'temp1' | awk -F" " {' print $$3 '} | sed 's/+//g' | awk -F"." {' print $$1 '}

temp1:        53.0°C  (crit = 120.0°C, hyst = 90.0°C)

temp1:        28.4°C  (high = 70.0°C)

temp1:        47.0°C  (low  = 127.0°C, high = 127.0°C)  sensor = thermistor



Nesse cenário preciso apenas do primeiro valor mas ele me traz a mesma informação 3 vezes. 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]