Hdparm: differenze tra le versioni

m
→‎Opzioni e Argomenti: piccole traduzioni
m (→‎Opzioni e Argomenti: alcune traduzioni)
m (→‎Opzioni e Argomenti: piccole traduzioni)
Riga 6: Riga 6:
=Cosa serve=
=Cosa serve=
==Installazione==
==Installazione==
Il pacchetto presente in Debian:
Il pacchetto è presente in Debian:
<pre>
<pre>
# apt-get install hdparm
# apt-get install hdparm
Riga 12: Riga 12:


==Kernel==
==Kernel==
Per poter utilizzare al meglio questo strumento, consigliato:
Per poter utilizzare al meglio questo strumento, è consigliato:
* avere una versione del kernel abbastanza recente (quelle presenti in Sarge vanno pi� che bene)
* avere una versione del kernel abbastanza recente (quelle presenti in Sarge vanno più che bene)
* avere i moduli per il proprio chipset caricati (o compilati staticamente nel kernel)
* avere i moduli per il proprio chipset caricati (o compilati staticamente nel kernel)




=Opzioni e Argomenti=
=Opzioni e Argomenti=
Le opzioni disponibili sono tante, alcune delle quali '''critiche''', quindi sconsiglio vivamente l'utilizzo di opzioni che non si conoscono, per evitare danni e/o malfunzionamenti/perdite di dati... (declino ogni responsabilit� su questi).
Le opzioni disponibili sono tante, alcune delle quali '''critiche''', quindi sconsiglio vivamente l'utilizzo di opzioni che non si conoscono, per evitare danni e/o malfunzionamenti/perdite di dati... (declino ogni responsabilità su questi).


; -a : Get/set sector count for filesystem read-ahead. This is used to improve performance in sequential reads of large files, by  prefetching  additional blocks  in  anticipation  of  them being needed by the running task.  In the current kernel version (2.0.10) this has a default setting of 8 sectors (4KB).  This value seems good for most purposes, but in a system where most file accesses are random seeks, a smaller setting might  provide  better performance.  Also, many IDE drives also have a separate built-in read-ahead function, which alleviates the need for a filesystem read-ahead in many situations.
; -a : Get/set sector count for filesystem read-ahead. This is used to improve performance in sequential reads of large files, by  prefetching  additional blocks  in  anticipation  of  them being needed by the running task.  In the current kernel version (2.0.10) this has a default setting of 8 sectors (4KB).  This value seems good for most purposes, but in a system where most file accesses are random seeks, a smaller setting might  provide  better performance.  Also, many IDE drives also have a separate built-in read-ahead function, which alleviates the need for a filesystem read-ahead in many situations.
Riga 27: Riga 27:
:; 0 : per disabilitare il supporto a 32-bit
:; 0 : per disabilitare il supporto a 32-bit
:; 1 : per abilitare il trasferimento dei dati a 32-bit
:; 1 : per abilitare il trasferimento dei dati a 32-bit
:; 3 : per abilitare il trasferimento dei dati a 32-bit con una speciale sequenza di sincronizzazione richiesta da molti chipset. The value 3 works with nearly all 32-bit IDE chipsets, but incurs slightly more overhead.  Note that "32-bit" refers to data transfers across a PCI or VLB bus to the interface card only; all (E)IDE drives still have only a 16-bit connection over the ribbon cable from the interface card.
:; 3 : per abilitare il trasferimento dei dati a 32-bit con una speciale sequenza di sincronizzazione richiesta da molti chipset.  
; -C : Controlla lo stato corrente dell'alimentazione del dispositivo; le possibili risposte sono:
; -C : Controlla lo stato corrente dell'alimentazione del dispositivo; le possibili risposte sono:
:; unknown : il dispositivo non supporta la funzione
:; unknown : il dispositivo non supporta la funzione
:; active/idle : stato normale
:; active/idle : stato normale
:; standby : il device in standby, i piatti dell'hard disk non sono in movimento
:; standby : il device è in standby, i piatti dell'hard disk non sono in movimento
:; sleeping : il device completamente spento.
:; sleeping : il device è completamente spento.
: possibile modificare le modalit� tramite le opzioni '''-S''', '''-y''', '''-Y''', '''-Z'''.
: È possibile modificare le modalità tramite le opzioni '''-S''', '''-y''', '''-Y''', '''-Z'''.
; -d : Disable/enable the "using_dma" flag for this drive. This option now works with most combinations of drives and PCI interfaces which support DMA and which are known to the kernel IDE driver. It is also a good idea to use the appropriate -X option in combination with -d1 to ensure that the  drive itself is programmed for the correct DMA mode, although most BIOSs should do this for you at boot time. Using DMA nearly always gives the best performance, with fast I/O throughput and low CPU usage. But there are at least a few configurations of chipsets and drives for  which  DMA does  not make much of a difference, or may even slow things down (on really messed up hardware!).  Your mileage may vary.
; -d : Disabilita/abilita l'opzione "using_dma". Questa opzione funziona con la maggior parte delle coppie 'dispositivo interfaccia' supportanti il DMA e supportate dai driver del kernel. E' una buona idea utilizzare l'appropriato valore dell'opzione '''-X''' in combinaizone con '''-d1''' per essere sicuri che il dispositivo sia impostato correttamente, anche se molti BIOS dovrebbero impostare questi parametri correttamente all'avvio del sistema. L'utilizzo del DMA consente di avere delle buone performance, aumentando la velocita' di trasferimento e diminuendo il carico del processore. Ci sono, pero', alcune configurazioni per cui l'abilitazione o meno del DMA non provoca cambiamenti, o puo' perfino causare un degradamento delle performance (caso molto raro).
; -D : Enable/disable the on-drive defect management feature, whereby the drive firmware tries to automatically manage defective sectors by relocating them to "spare" sectors reserved by the factory for such.
; -D : Enable/disable the on-drive defect management feature, whereby the drive firmware tries to automatically manage defective sectors by relocating them to "spare" sectors reserved by the factory for such.
; -E : Imposta la velocit� del cdrom. Questo NON necessario normalmente, dato che il drive selezioner� automaticamente la velocit�. Ma se vuoi provarci, fornisci un numero dopo l'opzione, di solito un numero come 2 o 4.
; -E : Imposta la velocità del cdrom. Questo NON è necessario normalmente, dato che il drive selezionerà automaticamente la velocità. Ma se vuoi provarci, fornisci un numero dopo l'opzione, di solito un numero come 2 o 4.
; -f : Sincronizza ed esegue un flush del buffer del dispositibo. Viene eseguito anche dutante i test '''-T''' e '''-t'''
; -f : Sincronizza ed esegue un flush del buffer del dispositibo. Viene eseguito anche dutante i test '''-T''' e '''-t'''
; -g : Mostra la geometria del drive (cilindri, testine, settori), la dimensione (in settori) del device, e l'offset di partenza (in settori) del device dall'inizio del drive.
; -g : Mostra la geometria del drive (cilindri, testine, settori), la dimensione (in settori) del device, e l'offset di partenza (in settori) del device dall'inizio del drive.
;-i : Display the identification info that was obtained from the drive at boot time, if available.  This is a feature of modern IDE drives, and may not be supported by older devices.  The data returned may or may not be current, depending on activity since booting the system.  However, the current multiple sector mode count is always shown.  For a more detailed interpretation of the identification info, refer to AT Attachment Interface for Disk Drives (ANSI ASC X3T9.2 working draft, revision 4a, April 19/93).
;-i : Display the identification info that was obtained from the drive at boot time, if available.  This is a feature of modern IDE drives, and may not be supported by older devices.  The data returned may or may not be current, depending on activity since booting the system.  However, the current multiple sector mode count is always shown.  For a more detailed interpretation of the identification info, refer to AT Attachment Interface for Disk Drives (ANSI ASC X3T9.2 working draft, revision 4a, April 19/93).
; -I : Richiede informazioni di identificazione direttamente dal drive, e le mostrer� in un nuovo formato espanso con pi� dettagli rispetto alla vecchia opzione -i.
; -I : Richiede informazioni di identificazione direttamente dal drive, e le mostrerà in un nuovo formato espanso con più dettagli rispetto alla vecchia opzione -i.
; -Istdin : This is a special "no seatbelts" variation on the -I option, which accepts a drive identification  block  as  standard  input  instead  of  using  a /dev/hd*  parameter. The  format of this block must be exactly the same as that found in the /proc/ide/*/hd*/identify "files", or that produced by the '''-Istdout''' option described below.  This variation is designed for use with collected "libraries" of drive  identification  information,  and  can also be used on ATAPI drives which may give media errors with the standard mechanism.
; -Istdin : This is a special "no seatbelts" variation on the -I option, which accepts a drive identification  block  as  standard  input  instead  of  using  a /dev/hd*  parameter. The  format of this block must be exactly the same as that found in the /proc/ide/*/hd*/identify "files", or that produced by the '''-Istdout''' option described below.  This variation is designed for use with collected "libraries" of drive  identification  information,  and  can also be used on ATAPI drives which may give media errors with the standard mechanism.
; -Istdout : This  option  simply  dumps the identify data in hex to stdout, in a format similar to that from /proc/, and suitable for later use with the -Istdin option.
; -Istdout : This  option  simply  dumps the identify data in hex to stdout, in a format similar to that from /proc/, and suitable for later use with the -Istdin option.
Riga 53: Riga 53:
; -q : Handle  the next flag quietly, suppressing normal output.  This is useful for reducing screen clutter when running from system startup scripts.  Not applicable to the -i or -v or -t or -T flags.
; -q : Handle  the next flag quietly, suppressing normal output.  This is useful for reducing screen clutter when running from system startup scripts.  Not applicable to the -i or -v or -t or -T flags.
; -Q : Set tagged queue depth (1 or greater), or turn tagged queuing off (0).  This only works with the newer 2.5.xx (or later) kernels, and only with  the few drives that currently support it.
; -Q : Set tagged queue depth (1 or greater), or turn tagged queuing off (0).  This only works with the newer 2.5.xx (or later) kernels, and only with  the few drives that currently support it.
; -r : Imposta/leggi modalit� sola-lettura sul drive. Quando impostata, Linux impedisce operazioni di scrittura sul device.
; -r : Imposta/leggi modalità sola-lettura sul drive. Quando impostata, Linux impedisce operazioni di scrittura sul device.
; -R : Register an IDE interface.  Dangerous.  See the -U option for more information.
; -R : Register an IDE interface.  Dangerous.  See the -U option for more information.
; -S : Imposta il timeout per l'arresto del disco (spindown). Questo valore viene usato per determinare quanto aspettare (in caso di assenza di attivit�) prima di arrestare la rotazione dei dischi. In alcuni casi, il disco pu� impiegare anche 30 secondi prima di rispondere ad una richiesta di lettura, quando i piatti sono fermi. I valori usabili sono i seguenti:
; -S : Imposta il timeout per l'arresto del disco (spindown). Questo valore viene usato per determinare quanto aspettare (in caso di assenza di attività) prima di arrestare la rotazione dei dischi. In alcuni casi, il disco può impiegare anche 30 secondi prima di rispondere ad una richiesta di lettura, quando i piatti sono fermi. I valori usabili sono i seguenti:
:; 0 : disattivato: il dispositivo non entrer� automaticamente in standby
:; 0 : disattivato: il dispositivo non entrerà automaticamente in standby
:; 1-240 : specifica i multipli di 5 secondi, gestendo un timeout variabile tra i 5 secondi e i 20 minuti
:; 1-240 : specifica i multipli di 5 secondi, gestendo un timeout variabile tra i 5 secondi e i 20 minuti
:; 241-251 : specifica le unit� di da 30 minuti fino a 5 or e mezza (ad intervalli di 30 minuti)
:; 241-251 : specifica le unità di da 30 minuti fino a 5 or e mezza (ad intervalli di 30 minuti)
:; 252 : 21 minutes
:; 252 : 21 minutes
:; 253 : imposta un timeout preimpostato dal produttore, variabile tra le 8 e le 12 ore
:; 253 : imposta un timeout preimpostato dal produttore, variabile tra le 8 e le 12 ore
Riga 72: Riga 72:
; -W : Disable/enable the IDE drive's write-caching feature (default state is undeterminable; manufacturer/model specific).
; -W : Disable/enable the IDE drive's write-caching feature (default state is undeterminable; manufacturer/model specific).
; -X :    Set  the  IDE transfer mode for newer (E)IDE/ATA drives.  This is typically used in combination with -d1 when enabling DMA to/from a drive on a sup ported interface chipset, where -X mdma2 is used to select multiword DMA mode2 transfers and -X sdma1 is used to select simple mode 1 DMA transfers. With  systems  which  support  UltraDMA  burst  timings, -X udma2 is used to select UltraDMA mode2 transfers (you'll need to prepare the chipset for UltraDMA beforehand).  Apart from that, use of this flag is seldom necessary since most/all modern IDE drives default to their fastest PIO  transfer mode  at  power-on.  Fiddling with this can be both needless and risky.  On drives which support alternate transfer modes, -X can be used to switch the mode of the drive only.  Prior to changing the transfer mode, the IDE interface should be jumpered or programmed (see -p flag) for the new  mode setting  to  prevent  loss  and/or corruption of data.  Use this with extreme caution!  For the PIO (Programmed Input/Output) transfer modes used by Linux, this value is simply the desired PIO mode number plus 8.  Thus, a value of 09 sets PIO mode1, 10 enables PIO mode2, and 11 selects PIO mode3. Setting  00  restores  the drive's "default" PIO mode, and 01 disables IORDY.  For multiword DMA, the value used is the desired DMA mode number plus 32.  for UltraDMA, the value is the desired UltraDMA mode number plus 64.
; -X :    Set  the  IDE transfer mode for newer (E)IDE/ATA drives.  This is typically used in combination with -d1 when enabling DMA to/from a drive on a sup ported interface chipset, where -X mdma2 is used to select multiword DMA mode2 transfers and -X sdma1 is used to select simple mode 1 DMA transfers. With  systems  which  support  UltraDMA  burst  timings, -X udma2 is used to select UltraDMA mode2 transfers (you'll need to prepare the chipset for UltraDMA beforehand).  Apart from that, use of this flag is seldom necessary since most/all modern IDE drives default to their fastest PIO  transfer mode  at  power-on.  Fiddling with this can be both needless and risky.  On drives which support alternate transfer modes, -X can be used to switch the mode of the drive only.  Prior to changing the transfer mode, the IDE interface should be jumpered or programmed (see -p flag) for the new  mode setting  to  prevent  loss  and/or corruption of data.  Use this with extreme caution!  For the PIO (Programmed Input/Output) transfer modes used by Linux, this value is simply the desired PIO mode number plus 8.  Thus, a value of 09 sets PIO mode1, 10 enables PIO mode2, and 11 selects PIO mode3. Setting  00  restores  the drive's "default" PIO mode, and 01 disables IORDY.  For multiword DMA, the value used is the desired DMA mode number plus 32.  for UltraDMA, the value is the desired UltraDMA mode number plus 64.
:* Modalit� PIO
:* Modalità PIO
:** '''0''' -X08 3.3MB/sec
:** '''0''' -X08 3.3MB/sec
:** '''1''' -X09 5.2MB/sec
:** '''1''' -X09 5.2MB/sec
Riga 78: Riga 78:
:** '''3''' -X11 11.1MB/sec
:** '''3''' -X11 11.1MB/sec
:** '''4''' -X12 16.7MB/sec  
:** '''4''' -X12 16.7MB/sec  
:* Modalit� Singleword DMA
:* Modalità Singleword DMA
:** '''0''' 2.1MB/sec
:** '''0''' 2.1MB/sec
:** '''1''' 4.2MB/sec
:** '''1''' 4.2MB/sec
:** '''2''' 8.3MB/sec  
:** '''2''' 8.3MB/sec  
:* Modalit� Multiword DMA
:* Modalità Multiword DMA
:** '''0''' -X32 4.2MB/sec
:** '''0''' -X32 4.2MB/sec
:** '''1''' -X33 13.3MB/sec
:** '''1''' -X33 13.3MB/sec
:** '''2''' -X34 16.6MB/sec  
:** '''2''' -X34 16.6MB/sec  
:* Modalit� Ultra DMA
:* Modalità Ultra DMA
:** '''0''' 16MB/sec
:** '''0''' 16MB/sec
:** '''1''' 25MB/sec
:** '''1''' 25MB/sec
Riga 93: Riga 93:
:** '''4''' -X68 66MB/sec UDMA66
:** '''4''' -X68 66MB/sec UDMA66
:** '''5''' -x69 100MB/sec UDMA100  
:** '''5''' -x69 100MB/sec UDMA100  
; -y : Forza un dispositivo IDE ad entrare nello stato di basso consumo (Low power consumption standby mode), normalmente causando la fermata dei piatti.  Lo stato corrente pu� essere verificato tramite l'opzione '''-C''';
; -y : Forza un dispositivo IDE ad entrare nello stato di basso consumo (Low power consumption standby mode), normalmente causando la fermata dei piatti.  Lo stato corrente può essere verificato tramite l'opzione '''-C''';
; -Y : Forza un dispositivo IDE ad entrare immediatamente nel pi� basso livello di consumo energetico, causandone lo spegnimento completo. necessario un hard o soft reset prima che il dispositivo sia nuovamente accessibile (i driver IDE di linux eseguiranno il reset automaticamente, se necessariod). Lo stato corrente pu� essere controllato con l'opzione '''-C'''.
; -Y : Forza un dispositivo IDE ad entrare immediatamente nel più basso livello di consumo energetico, causandone lo spegnimento completo. È necessario un hard o soft reset prima che il dispositivo sia nuovamente accessibile (i driver IDE di linux eseguiranno il reset automaticamente, se necessariod). Lo stato corrente può essere controllato con l'opzione '''-C'''.
; -z : Forza la rilettura della tabella delle partizioni, utile nel caso di modifiche con ''fdisk'' o simili, senza rendere necessario un riavvio della macchina.
; -z : Forza la rilettura della tabella delle partizioni, utile nel caso di modifiche con ''fdisk'' o simili, senza rendere necessario un riavvio della macchina.


1 487

contributi