Hdparm: differenze tra le versioni

m
→‎Opzioni e Argomenti: prima formattazione
(preparate le opzioni da tradurre e commentare)
m (→‎Opzioni e Argomenti: prima formattazione)
Riga 18: Riga 18:
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
:'''-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.
              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
:'''-A''' Disable/enable the IDE drive's read-lookahead feature (usually ON by default).  Usage: -A0 (disable) or -A1 (enable).
              (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
:'''-b''' Get/set bus state.
              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
:'''-B''' Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better performance. A value of 255 will disable apm on the drive.
              situations.
:'''-c''' Query/enable  (E)IDE 32-bit I/O support.  A numeric parameter can be used to enable/disable 32-bit I/O support: Currently supported values include 0 to disable 32-bit I/O support, 1 to enable 32-bit data transfers, and 3 to enable 32-bit data transfers with a special  sync  sequence  required  by many  chipsets.  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.
 
:'''-C''' Check  the current IDE power mode status, which will always be one of unknown (drive does not support this command), active/idle (normal operation), standby (low power mode, drive has spun down), or sleeping (lowest power mode, drive is completely shut down).  The -S, -y, -Y, and -Z flags can  be used to manipulate the IDE power modes.
      -A     Disable/enable the IDE drive's read-lookahead feature (usually ON by default).  Usage: -A0 (disable) or -A1 (enable).
:'''-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''' 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.
      -b     Get/set bus state.
:'''-E''' Set cdrom speed.  This is NOT necessary for regular operation, as the drive will automatically switch speeds on its own.  But if you  want  to  play with it, just supply a speed number after the option, usually a number like 2 or 4.
 
:'''-f''' Sync and flush the buffer cache for the device on exit.  This operation is also performed as part of the -t and -T timings.
      -B     Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better perfor-
:'''-g''' Display the drive geometry (cylinders, heads, sectors), the size (in sectors) of the device, and the starting offset (in sectors) of the device from the beginning of the drive.
              mance. A value of 255 will disable apm on the drive.
:'''-h''' Display terse usage information (help).
 
:'''-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).
      -c     Query/enable  (E)IDE 32-bit I/O support.  A numeric parameter can be used to enable/disable 32-bit I/O support: Currently supported values include 0
:'''-I''' Request  identification  info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older -i flag.
              to disable 32-bit I/O support, 1 to enable 32-bit data transfers, and 3 to enable 32-bit data transfers with a special  sync  sequence  required  by
:'''-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.
              many  chipsets.  The value 3 works with nearly all 32-bit IDE chipsets, but incurs slightly more overhead.  Note that "32-bit" refers to data trans-
:'''-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.
              fers 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 inter-
:'''-k''' Get/set the keep_settings_over_reset flag for the drive.  When this flag is set, the driver will preserve the -dmu options over a  soft  reset,  (as done  during  the  error  recovery sequence).  This flag defaults to off, to prevent drive reset loops which could be caused by combinations of '''-dmu''' settings.  The '''-k''' flag should therefore only be set after one has achieved confidence in correct system operation with a chosen set of configuration settings.  In practice, all that is typically necessary to test a configuration (prior to using -k) is to verify that the drive can be read/written, and that no error logs (kernel messages) are generated in the process (look in /var/adm/messages on most systems).
              face card.
:'''-K''' Set the drive's keep_features_over_reset flag.  Setting this enables the drive to retain the settings for -APSWXZ over a soft reset (as done  during the error recovery sequence).  Not all drives support this feature.
 
:'''-L''' Set the drive's doorlock flag.  Setting this to 1 will lock the door mechanism of some removable hard drives (eg. Syquest, ZIP, Jazz..), and setting it to 0 will unlock the door mechanism.  Normally, Linux maintains the door locking mechanism automatically, depending on drive usage (locked  whenever a filesystem is mounted).  But on system shutdown, this can be a nuisance if the root partition is on a removeable disk, since the root partition is left mounted (read-only) after shutdown.  So, by using this command to unlock the door after the root filesystem is remounted read-only, one can then remove the cartridge from the drive after shutdown.
      -C     Check  the current IDE power mode status, which will always be one of unknown (drive does not support this command), active/idle (normal operation),
:'''-m''' Get/set  sector  count for multiple sector I/O on the drive.  A setting of 0 disables this feature.  Multiple sector mode (aka IDE Block Mode), is a feature of most modern IDE hard drives, permitting the transfer of multiple sectors per I/O interrupt, rather than the usual one sector  per  interrupt.  When  this  feature  is  enabled,  it typically reduces operating system overhead for disk I/O by 30-50%.  On many systems, it also provides increased data throughput of anywhere from 5% to 50%.  Some drives, however (most notably the WD Caviar series), seem to run  slower  with  multiple mode  enabled.  Your mileage may vary.  Most drives support the minimum settings of 2, 4, 8, or 16 (sectors).  Larger settings may also be possible, depending on the drive.  A setting of 16 or 32 seems optimal on many systems.  Western Digital recommends lower settings of 4 to 8 on many of  their drives,  due  tiny (32kB) drive buffers and non-optimized buffering algorithms.  The -i flag can be used to find the maximum setting supported by an installed drive (look for MaxMultSect in the output).  Some drives claim to support multiple mode, but lose data at some settings.  Under rare  circumstances, such failures can result in massive filesystem corruption.
              standby (low power mode, drive has spun down), or sleeping (lowest power mode, drive is completely shut down).  The -S, -y, -Y, and -Z flags can  be
:'''-M''' Get/set  Automatic  Acoustic Management (AAM) setting. Most modern harddisk drives have the ability to speed down the head movements to reduce their noise output.  The possible values are between 0 and 254. 128 is the most quiet (and therefore slowest) setting and 254 the fastest  (and  loudest). Some  drives  have only two levels (quiet / fast), while others may have different levels between 128 and 254.  THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK.
              used to manipulate the IDE power modes.
:'''-n''' Get or set the "ignore write errors" flag in the driver.  Do NOT play with this without grokking the driver source code first.
 
:'''-p''' Attempt to reprogram the IDE interface chipset for the specified PIO mode, or attempt to auto-tune for the "best" PIO mode supported by  the  drive. This feature is supported in the kernel for only a few "known" chipsets, and even then the support is iffy at best.  Some IDE chipsets are unable to alter the PIO mode for a single drive, in which case this flag may cause the PIO mode for both drives to be set.  Many IDE chipsets  support  either fewer  or more than the standard six (0 to 5) PIO modes, so the exact speed setting that is actually implemented will vary by chipset/driver sophis tication.  Use with extreme caution!  This feature includes zero protection for the unwary,  and  an  unsuccessful  outcome  may  result  in  severe filesystem corruption!
      -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
:'''-P''' Set the maximum sector count for the drive's internal prefetch mechanism.  Not all drives support this feature.
              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
:'''-q'''     Handle  the next flag quietly, suppressing normal output.  This is useful for reducing screen clutter when running from system startup scripts.  Not
              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 per-
              formance, 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     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     Set cdrom speed.  This is NOT necessary for regular operation, as the drive will automatically switch speeds on its own.  But if you  want  to  play
              with it, just supply a speed number after the option, usually a number like 2 or 4.
 
      -f     Sync and flush the buffer cache for the device on exit.  This operation is also performed as part of the -t and -T timings.
 
      -g     Display the drive geometry (cylinders, heads, sectors), the size (in sectors) of the device, and the starting offset (in sectors) of the device from
              the beginning of the drive.
 
      -h     Display terse usage information (help).
 
      -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 mul-
              tiple 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     Request  identification  info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older
              -i flag.
 
      -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.
 
      -k     Get/set the keep_settings_over_reset flag for the drive.  When this flag is set, the driver will preserve the -dmu options over a  soft  reset,  (as
              done  during  the  error  recovery sequence).  This flag defaults to off, to prevent drive reset loops which could be caused by combinations of -dmu
              settings.  The -k flag should therefore only be set after one has achieved confidence in correct system operation with a chosen set of configuration
              settings.  In practice, all that is typically necessary to test a configuration (prior to using -k) is to verify that the drive can be read/written,
              and that no error logs (kernel messages) are generated in the process (look in /var/adm/messages on most systems).
 
      -K     Set the drive's keep_features_over_reset flag.  Setting this enables the drive to retain the settings for -APSWXZ over a soft reset (as done  during
              the error recovery sequence).  Not all drives support this feature.
 
      -L     Set the drive's doorlock flag.  Setting this to 1 will lock the door mechanism of some removable hard drives (eg. Syquest, ZIP, Jazz..), and setting
              it to 0 will unlock the door mechanism.  Normally, Linux maintains the door locking mechanism automatically, depending on drive usage (locked  when-
              ever a filesystem is mounted).  But on system shutdown, this can be a nuisance if the root partition is on a removeable disk, since the root parti-
              tion is left mounted (read-only) after shutdown.  So, by using this command to unlock the door after the root filesystem is remounted read-only, one
              can then remove the cartridge from the drive after shutdown.
 
      -m     Get/set  sector  count for multiple sector I/O on the drive.  A setting of 0 disables this feature.  Multiple sector mode (aka IDE Block Mode), is a
              feature of most modern IDE hard drives, permitting the transfer of multiple sectors per I/O interrupt, rather than the usual one sector  per  inter-
              rupt.  When  this  feature  is  enabled,  it typically reduces operating system overhead for disk I/O by 30-50%.  On many systems, it also provides
              increased data throughput of anywhere from 5% to 50%.  Some drives, however (most notably the WD Caviar series), seem to run  slower  with  multiple
              mode  enabled.  Your mileage may vary.  Most drives support the minimum settings of 2, 4, 8, or 16 (sectors).  Larger settings may also be possible,
              depending on the drive.  A setting of 16 or 32 seems optimal on many systems.  Western Digital recommends lower settings of 4 to 8 on many of  their
              drives,  due  tiny (32kB) drive buffers and non-optimized buffering algorithms.  The -i flag can be used to find the maximum setting supported by an
              installed drive (look for MaxMultSect in the output).  Some drives claim to support multiple mode, but lose data at some settings.  Under rare  cir-
              cumstances, such failures can result in massive filesystem corruption.
 
      -M     Get/set  Automatic  Acoustic Management (AAM) setting. Most modern harddisk drives have the ability to speed down the head movements to reduce their
              noise output.  The possible values are between 0 and 254. 128 is the most quiet (and therefore slowest) setting and 254 the fastest  (and  loudest).
              Some  drives  have only two levels (quiet / fast), while others may have different levels between 128 and 254.  THIS FEATURE IS EXPERIMENTAL AND NOT
              WELL TESTED. USE AT YOUR OWN RISK.
 
      -n     Get or set the "ignore write errors" flag in the driver.  Do NOT play with this without grokking the driver source code first.
 
      -p     Attempt to reprogram the IDE interface chipset for the specified PIO mode, or attempt to auto-tune for the "best" PIO mode supported by  the  drive.
              This feature is supported in the kernel for only a few "known" chipsets, and even then the support is iffy at best.  Some IDE chipsets are unable to
              alter the PIO mode for a single drive, in which case this flag may cause the PIO mode for both drives to be set.  Many IDE chipsets  support  either
              fewer  or more than the standard six (0 to 5) PIO modes, so the exact speed setting that is actually implemented will vary by chipset/driver sophis-
              tication.  Use with extreme caution!  This feature includes zero protection for the unwary,  and  an  unsuccessful  outcome  may  result  in  severe
              filesystem corruption!
 
      -P     Set the maximum sector count for the drive's internal prefetch mechanism.  Not all drives support this feature.
 
      -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.
               applicable to the -i or -v or -t or -T flags.


Riga 217: Riga 140:
       -Z    Disable  the  automatic  power-saving function of certain Seagate drives (ST3xxx models?), to prevent them from idling/spinning-down at inconvenient
       -Z    Disable  the  automatic  power-saving function of certain Seagate drives (ST3xxx models?), to prevent them from idling/spinning-down at inconvenient
               times.
               times.


=Test delle Performance=
=Test delle Performance=
1 487

contributi