Hddtemp: differenze tra le versioni

Da Guide@Debianizzati.Org.
Vai alla navigazione Vai alla ricerca
mNessun oggetto della modifica
m (testata con stretch- no verifica Superkaramba/Conky)
 
(8 versioni intermedie di 3 utenti non mostrate)
Riga 1: Riga 1:
{{Versioni compatibili|Squeeze|Wheezy|Jessie|Testing_2016}}
__TOC__
=Descrizione=
=Descrizione=


Il programma hddtemp monitora e crea rapporti sulla temperatura dei seguenti hard disk PATA, SATA o SCASI con la lettura delle informazioni da Self-Monitoring Analysis and Reporting Technology (SMART) sulle unità che supportano questa caratteristica.
Il programma <code>hddtemp</code> 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=
=Installazione=
Riga 13: Riga 15:
  /dev/sda: ST380023AS: 30°C
  /dev/sda: ST380023AS: 30°C
</pre>
</pre>
{{Suggerimento|Per avere l'output di tutti i dischi con un solo comando:
<pre>$ hddtemp /dev/sd?
/dev/sda: ST31000528AS: 43°C
/dev/sdb: WDC WD5000AAKS-00YGA0: 46°C
/dev/sdc: WDC WD5000AAKS-00YGA0: 46°C
</pre>
oppure di tutte le partizioni:
<pre>$ 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
</pre>
}}
=Demone=
hddtemp ha anche un [[demone]] con un file di configurazione in ''/etc/default/hddtemp'' :
<pre>
# 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"


{{Suggerimento|Potrebbe essere necessario usare hddtemp come user, in tal caso riconfigurare con il comando:
# Separator to use between fields. The default separator is '|'.
#SEPARATOR="|"


<pre># dpkg-reconfigure hddtemp</pre> }}
# 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=""
</pre>
dopo le modifiche potrebbe essere necessario riavviare il demone.
 
Per ottenere un output utile:
<pre>
$ nc localhost 7634
|/dev/sda|ST31000528AS|43|C||/dev/sdb|WDC WD5000AAKS-00YGA0|46|C||/dev/sdc|WDC WD5000AAKS-00YGA0|46|C|
</pre>
 
=Permessi utente=
 
Potrebbe essere necessario usare <code>hddtemp</code> come user, in tal caso riconfigurare con il comando:
 
<pre># dpkg-reconfigure hddtemp</pre>  




Riga 25: Riga 103:
[[File:Hddtemp2.jpeg |center| 550px]]
[[File:Hddtemp2.jpeg |center| 550px]]


Utile nell'uso di [[Superkaramba|superkaramba]] o conky dove molte richieste hanno i permessi dell'user e nel caso di <code>hddtemp</code> 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|superkaramba]] o conky.


Utile nell'uso di [[Superkaramba|superkaramba]] 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.
per conky come in esempio :
<pre> ${execi 300 nc localhost 7634}</pre>
per ottenenere:
<pre> /dev/sda: WDC WD5000AAKS-00YGA0: 46°C </pre>
oppure prelevando solo una parte:
<pre> ${execi hddtemp -n /dev/sda |cut -c 34-38}</pre>
con output:
<pre> 46°C</pre>


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


--[[Utente:Mm-barabba|Mm-barabba]] 00:49, 9 apr 2011 (CEST)
{{Autori
|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)
|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
}}


[[Categoria:Shell]]
[[Categoria:Shell]]
[[Categoria:Hard_Disk]]
[[Categoria:Hard_Disk]]
[[Categoria:Monitoraggio]]
[[Categoria:Monitoraggio]]

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