ATACTL(8)               OpenBSD System Manager's Manual              ATACTL(8)

NAME
     atactl - a program to manipulate ATA (IDE) devices

SYNOPSIS
     atactl device command [arg [...]]

DESCRIPTION
     atactl allows a user or system administrator to issue commands to and
     otherwise control devices which reside on standard IDE and ATA con-
     trollers.  It is used by specifying a device to manipulate, the command
     to perform, and any arguments the command may require.

     The following commands may be used on IDE and ATA devices.  Note that not
     all devices support all commands.

     If the device is specified without a command, the identify command is im-
     plied.

     identify

     Identify the specified device, displaying the device's vendor, product,
     revision strings, supported capabilities and enabled capabilities.

     idle

     Place the specified device into Idle mode.  This mode may consume less
     power than Active mode.

     standby

     Place the specified device into Standby mode.  This mode will consume
     less power than Idle mode.

     sleep

     Place the specified device into Sleep mode.  This mode will consume less
     power than Standby mode, but requires a device reset to resume operation.
     Typically the wd(4) driver performs this reset automatically, but this
     should still be used with caution.

     setidle standby-timer

     Places the specified device into Idle mode, and sets the Standby timer to
     standby-timer seconds.  A value of 0 will disable the Standby timer.

     setstandby standby-timer

     Places the specified device into Standby mode, and sets the Standby timer
     to standby-timer seconds.  A value of 0 will disable the Standby timer.

     checkpower

     Will print out if the device is in Active, Idle, or Standby power manage-
     ment mode.

     apmset power-management-level

     Enables and sets the advanced power management level to the requested
     level on the specified device (if supported). Device performance may in-
     crease with increasing power management levels at the cost of potentially
     requiring more power. Values up to and including 126 allow the device to
     go into standby mode and spin-down the disk. This may cause disk time-
     outs and is therefore not recommended. These values are more suitable op-
     timization for low power usage on infrequently used devices. Values 127
     up to and including 253 do not allow the device to go to standby mode and
     are more suitable for optimization for performance. Support for advanced
     power management is indicated by the device with `Advanced Power
     Management feature set' in the output of the identify command.

     apmdisable

     Disables support for advanced power management on the specified device.
     Note that devices supporting advanced powermanagement may refuse to dis-
     able it, resulting in an `ATA device returned Aborted Command' warning.

     acousticset acoustic-management-level

     Enables and sets the automatic acoustic management level to the requested
     level on the specified device (if supported). Device performance may in-
     crease with increasing automatic acoustic management levels at the cost
     of potentially generating more noise and requiring more power. Valid val-
     ues are 0 up to and including 126. Support for automatic acoustic manage-
     ment is indicated by the device with `Automatic Acoustic Management
     feature set' in the output of the identify command.

     acousticdisable

     Disables support for automatic acoustic management on the specified de-
     vice.  Note that devices supporting automatic acoustic management may
     refuse to disable it, resulting in an `ATA device returned Aborted
     Command' warning.

     podenable

     Allows the specified device to revert to power-on default (pod) settings
     after a reset.

     poddisable

     Disallows the specified device to revert to power-on default (pod) set-
     tings after a reset.

     puisenable

     Enables power-up in standby (puis) on the specified device, causing the
     device to wait with spinning up the disks after power-up. This may cause
     problems at boot if the device is to slow in spin-up. This option is
     therefore not recommended unless the implications are understood. Note
     that the power-up in standby mode stays enabled over power-downs, hard-
     ware and software resets.  Support for power-up in standby is indicated
     by the device with `Power-up in standby feature set' in the output of the
     identify command.

     puisdisable

     Disables power-up in standby (puis) on the specified device, causing the
     device to spin up the disks after power-up. This should be the factory
     default setting of the device and it is recommended to leave this setting
     disabled.

     puisspinup

     Explicitly spins up the device if it powered-up into standby mode (i.e.
     power-up in standby was enabled).

     readaheadenable

     Enables read look-ahead on the specified device. This may increase per-
     formance. Support for and status of read look-ahead is indicated by the
     device with `read look-ahead' in the output of the identify command.

     readaheaddisable

     Disables read look-ahead on the specified device. This may decrease per-
     formance. Note that the device may use `vendor specific' behaviour in im-
     plementing this, so it is not recommended to issue this command on a disk
     containing any currently mounted filesystems.

     smartenable

     Enables SMART (Self-Monitoring, Analysis, and Reporting Technology) on
     the specified device (if supported). This causes the device to record in-
     formation for prediction of device degradation and/or faults. Support for
     SMART is indicated by the device with `SMART feature set' in the output
     of the identify command.

     smartdisable

     Disables support for SMART on the specified device. Note that this means
     that the device will no longer record any SMART information.

     smartstatus

     Reads the reliability status of the specified device. If the device re-
     ports that one of its thresholds is exceeded (a strong indication of im-
     minent failure), the warning `SMART threshold exceeded!' is printed to
     stderr and a status of 2 is returned. Note that SMART must be enabled or
     the device will return an error.

     writecachedisable

     Disable the write cache on the specified device (if supported). This may
     decrease performance.  Support for and status of write caching is indi-
     cated by the device with `write cache' in the output of the identify com-
     mand.

     writecacheenable

     Enables the write cache on the specified device (if supported). This may
     increase performance, however data still in the device's cache at power-
     down may be lost. The wd(4) driver performs a cache flush automatically
     before shutdown.

EXAMPLES
     atactl /dev/wd0c identify

     Displays the vendor, product, revision strings and capabilities (such as
     support for SMART) as reported by /dev/wd0.

     atactl /dev/wd1c smartenable

     Enables the SMART support on /dev/wd1 for detection of early warning
     signs of device failure.

     0 * * * * /sbin/atactl /dev/wd0c smartstatus >/dev/null

     In a crontab(5) entry queries /dev/wd0 each hour for early warning signs
     of failure. If the device exceeded one of the SMART thresholds, atactl
     will output `SMART threshold exceeded!' to stderr and cron(8) will mail
     it.

DIAGNOSTICS
     Not all devices are created equally. Some may not support the feature
     sets and/or commands needed to perform the requested action, even when
     the identify command indicates support for the requested action. The de-
     vice will typically respond with an `ATA device returned Aborted Command'
     if the requested action is not supported. Similarly a device might not
     implement all commands in a feature set, so even though disabling a fea-
     ture works, enabling might not.

SEE ALSO
     ioctl(2), wd(4)

AUTHORS
     The atactl command was written by Ken Hornstein.  It was based heavily on
     the scsictl(8) command written by Jason R. Thorpe.  Support for acoustic
     management, advanced power management, power-up in standby, read look-
     ahead and SMART was added by Wouter Slegers.

HISTORY
     The atactl command first appeared in OpenBSD 2.6.  Support for acoustic
     management, advanced power management, power-up in standby, read look-
     ahead and SMART was added in OpenBSD 2.9.

BUGS
     The output from the identify command is rather ugly.

     Disabling read look-head with the readaheaddisable might cause problems
     with mounted filesystems on that device.

     There is no support for reading SMART logs or initiating a SMART self-
     test.

     There is no support for the Secure Mode commands (in particular the Secu-
     rity Erase Unit).

OpenBSD 3.0                    November 18, 1998                             4
