Hddtemp: differenze tra le versioni

Da Guide@Debianizzati.Org.
Vai alla navigazione Vai alla ricerca
m (testata con stretch- no verifica Superkaramba/Conky)
 
(3 versioni intermedie di 2 utenti non mostrate)
Riga 1: Riga 1:
{{Versioni compatibili}}
{{Versioni compatibili|Squeeze|Wheezy|Jessie|Testing_2016}}
__TOC__
__TOC__
=Descrizione=
=Descrizione=
Riga 16: Riga 16:
</pre>
</pre>
{{Suggerimento|Per avere l'output di tutti i dischi con un solo comando:
{{Suggerimento|Per avere l'output di tutti i dischi con un solo comando:
<pre>$ hddtemp /dev/sd?                                                                                                                                                    
<pre>$ hddtemp /dev/sd?
/dev/sda: ST31000528AS: 43°C                                                                                                                                                        
/dev/sda: ST31000528AS: 43°C
/dev/sdb: WDC WD5000AAKS-00YGA0: 46°C                                                                                                                                                
/dev/sdb: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc: WDC WD5000AAKS-00YGA0: 46°C
</pre>
</pre>
oppure di tutte le partizioni
oppure di tutte le partizioni:
<pre>$ hddtemp /dev/sd*
<pre>$ hddtemp /dev/sd*
/dev/sda: ST31000528AS: 43°C
/dev/sda: ST31000528AS: 43°C
Riga 36: Riga 36:
/dev/sdc2: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc2: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc3: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc3: WDC WD5000AAKS-00YGA0: 46°C
 
</pre>
</pre>}}
}}


=Demone=
=Demone=
hddtemp ha anche un demone con un file di configurazione in ''/etc/default/hddtemp'' :
hddtemp ha anche un [[demone]] con un file di configurazione in ''/etc/default/hddtemp'' :
<pre>
<pre>
# Defaults for hddtemp initscript (/etc/init.d/hddtemp)
# Defaults for hddtemp initscript (/etc/init.d/hddtemp)
Riga 84: Riga 84:
dopo le modifiche potrebbe essere necessario riavviare il demone.
dopo le modifiche potrebbe essere necessario riavviare il demone.


Per ottenere un' output utile
Per ottenere un output utile:
<pre>
<pre>
$ nc localhost 7634
$ nc localhost 7634
Riga 106: Riga 106:


=Applicazioni=
=Applicazioni=
E' possibile usare i vari output splittandoli o tagliandoli per inserirli in altre applicazioni come [[Superkaramba|superkaramba]] o conky.
È possibile usare i vari output splittandoli o tagliandoli per inserirli in altre applicazioni come [[Superkaramba|superkaramba]] o conky.


per conky come in esempio :  
per conky come in esempio :  
${execi 300 nc localhost 7634}
<pre> ${execi 300 nc localhost 7634}</pre>
per ottenenere
per ottenenere:
/dev/sda: WDC WD5000AAKS-00YGA0: 46°C  
<pre> /dev/sda: WDC WD5000AAKS-00YGA0: 46°C </pre>
oppure prelevando solo una parte
oppure prelevando solo una parte:
${execi hddtemp -n /dev/sda |cut -c 34-38}
<pre> ${execi hddtemp -n /dev/sda |cut -c 34-38}</pre>
con output
con output:
46°C
<pre> 46°C</pre>


allo stesso modo ma cambiando la sinstassi è possibile usarlo con superkaramba come in esempio :
allo stesso modo ma cambiando la sinstassi è possibile usarlo con superkaramba come in esempio :
text x=30 y=80 sensor=program program="hddtemp /dev/sda | cut -c 24-29"
<pre> text x=30 y=80 sensor=program program="hddtemp /dev/sda | cut -c 24-29"</pre>
 
 


{{Autori  
{{Autori  
|Autore = [[Utente:Mm-barabba|Mm-barabba]] 00:49, 9 apr 2011 (CEST
|Autore = [[Utente:Mm-barabba|Mm-barabba]] 00:49, 9 apr 2011 (CEST
|Estesa_da = [[Utente:Mm-barabba|Mm-barabba]] 01:10, 4 lug 2012 (CEST)
|Estesa_da =  
: nomeutente
:[[Utente:Mm-barabba|Mm-barabba]] 01:10, 4 lug 2012 (CEST)
|Verificata_da=
:[[Utente:S3v|S3v]] (tranne che per Superkaramba/Conky)
:[[Utente:Selky|Selky]] 17:28, 15 apr 2016 (CEST) (tranne che per Superkaramba/Conky)
|Numero_revisori=2
}}
}}



Versione attuale delle 15:28, 15 apr 2016

Edit-clear-history.png Attenzione. Questa guida è da considerarsi abbandonata, per via del tempo trascorso dall'ultima verifica.

Potrà essere resa obsoleta, previa segnalazione sul forum, se nessuno si propone per l'adozione.


Debian-swirl.png Versioni Compatibili

Debian 6 "squeeze"
Debian 7 "wheezy"
Debian 8 "jessie"

Descrizione

Il programma hddtemp monitora e crea rapporti sulla temperatura dei seguenti hard disk PATA, SATA o SCSI con la lettura delle informazioni da Self-Monitoring Analysis and Reporting Technology (SMART) sulle unità che supportano questa caratteristica.

Installazione

# apt-get install hddtemp

Utilizzo

Per maggiori informazioni man hddtemp, hddtemp -h; un esempio di utilizzo:

# hddtemp /dev/sda 
 /dev/sda: ST380023AS: 30°C
Bulb.png Suggerimento
Per avere l'output di tutti i dischi con un solo comando:
$ hddtemp /dev/sd?
/dev/sda: ST31000528AS: 43°C
/dev/sdb: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc: WDC WD5000AAKS-00YGA0: 46°C

oppure di tutte le partizioni:

$ hddtemp /dev/sd*
/dev/sda: ST31000528AS: 43°C
/dev/sda1: ST31000528AS: 43°C
/dev/sda2: ST31000528AS: 43°C
/dev/sda3: ST31000528AS: 43°C
/dev/sda5: ST31000528AS: 43°C
/dev/sda6: ST31000528AS: 43°C
/dev/sda7: ST31000528AS: 43°C
/dev/sdb: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdb1: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc1: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc2: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc3: WDC WD5000AAKS-00YGA0: 46°C


Demone

hddtemp ha anche un demone con un file di configurazione in /etc/default/hddtemp :

# Defaults for hddtemp initscript (/etc/init.d/hddtemp)
# This is a POSIX shell fragment

# [automatically edited by postinst, do not change line format ]

# hddtemp network daemon switch. If set to true, hddtemp will listen
# for incoming connections.   ### cambiare da false a true ###
RUN_DAEMON="true"

# List of devices you want to use with hddtemp. If none specified,
# hddtemp will probe standard devices.   ### inserire i propri dischi ###
DISKS="/dev/sda /dev/sdb /dev/sdc "

# List of devices you want to use with hddtemp, but that would not be
# probed for a working sensor.
DISKS_NOPROBE=""

# IP address of the interface on which you want hddtemp to be bound
# on. If none specified, goes to 127.0.0.1. Use 0.0.0.0 to bind hddtemp
# on all interfaces.
INTERFACE="127.0.0.1"

# Port number on which you want hddtemp to listen on. If none specified,
# the port 7634 is used.
PORT="7634"

# Database file to use. If none specified, /etc/hddtemp.db is used.
#DATABASE="/etc/hddtemp.db"

# Separator to use between fields. The default separator is '|'.
#SEPARATOR="|"

# Logging period (in seconds) for the temperatures. If set to a value
# different than 0, hddtemp will run as a daemon periodically logging
# the temperatures through syslog    ### tempo in secondi 300=5 minuti ###
RUN_SYSLOG="300"

# Other options to pass to hddtemp
OPTIONS=""

dopo le modifiche potrebbe essere necessario riavviare il demone.

Per ottenere un output utile:

$ nc localhost 7634
|/dev/sda|ST31000528AS|43|C||/dev/sdb|WDC WD5000AAKS-00YGA0|46|C||/dev/sdc|WDC WD5000AAKS-00YGA0|46|C|

Permessi utente

Potrebbe essere necessario usare hddtemp come user, in tal caso riconfigurare con il comando:

# dpkg-reconfigure hddtemp


Hddtemp.jpeg
Hddtemp1.jpeg
Hddtemp2.jpeg

Utile nell'uso di superkaramba o conky dove molte richieste hanno i permessi dell'user e nel caso di hddtemp non rendono alcun output se mancano i permessi per eseguire il comando.

Applicazioni

È possibile usare i vari output splittandoli o tagliandoli per inserirli in altre applicazioni come superkaramba o conky.

per conky come in esempio :

 ${execi 300 nc localhost 7634}

per ottenenere:

 /dev/sda: WDC WD5000AAKS-00YGA0: 46°C 

oppure prelevando solo una parte:

 ${execi hddtemp -n /dev/sda |cut -c 34-38}

con output:

 46°C

allo stesso modo ma cambiando la sinstassi è possibile usarlo con superkaramba come in esempio :

 text x=30 y=80 sensor=program program="hddtemp /dev/sda | cut -c 24-29"




Guida scritta da: Mm-barabba 00:49, 9 apr 2011 (CEST Swirl-auth60.png Debianized 60%
Estesa da:
Mm-barabba 01:10, 4 lug 2012 (CEST)
Verificata da:
S3v (tranne che per Superkaramba/Conky)
Selky 17:28, 15 apr 2016 (CEST) (tranne che per Superkaramba/Conky)

Verificare ed estendere la guida | Cos'è una guida Debianized