]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - smartctl.8.in
Updated changelog
[mirror_smartmontools-debian.git] / smartctl.8.in
index 1c11629c47589238b563c194e00c3882514f5a48..5034ff66ec7acf8c60b8ac20caed24355add5a43 100644 (file)
@@ -1,7 +1,7 @@
 .ig
- Copyright (C) 2002-6 Bruce Allen <smartmontools-support@lists.sourceforge.net>
+ Copyright (C) 2002-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 
- $Id: smartctl.8.in,v 1.86 2006/09/27 21:42:03 chrfranke Exp $
+ $Id: smartctl.8.in 3530 2012-03-27 19:54:06Z chrfranke $
  
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
  California, Santa Cruz. http://ssrc.soe.ucsc.edu/
 
 ..
-.TH SMARTCTL 8 CURRENT_CVS_DATE CURRENT_CVS_VERSION CURRENT_CVS_DATE
+.TH SMARTCTL 8 CURRENT_SVN_DATE CURRENT_SVN_VERSION CURRENT_SVN_DATE
 .SH NAME
 \fBsmartctl\fP \- Control and Monitor Utility for SMART Disks
 
 .SH SYNOPSIS
 .B smartctl [options] device
 
+.\" %IF NOT OS Windows
 .SH FULL PATH
 .B /usr/local/sbin/smartctl
 
+.\" %ENDIF NOT OS Windows
 .SH PACKAGE VERSION
-CURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME
+CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
 
 .SH DESCRIPTION
+.\" %IF NOT OS ALL
+.\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
+.\"! It does not contain info specific to other platforms.]
+.\"! .PP
+.\" %ENDIF NOT OS ALL
 \fBsmartctl\fP controls the Self\-Monitoring, Analysis and Reporting
 Technology (SMART) system built into many ATA\-3 and later ATA, IDE and
 SCSI\-3 hard drives. The purpose of SMART is to monitor the reliability
@@ -54,50 +61,100 @@ ignored and/or return an error.
 from SCSI tape drives and changers.
 
 The user must specify the device to be controlled or interrogated as
-the final argument to \fBsmartctl\fP.  Device paths are as follows:
+the final argument to \fBsmartctl\fP. The command set used by the device
+is often derived from the device path but may need help with the \'\-d\'
+option (for more information see the section on "ATA, SCSI command sets
+and SAT" below). Device paths are as follows:
+.\" %IF OS Linux
 .IP \fBLINUX\fP: 9
-Use the forms \fB"/dev/hd[a\-t]"\fP for IDE/ATA
-devices, and \fB"/dev/sd[a\-z]"\fP for SCSI devices. For
-SCSI Tape Drives and Changers with TapeAlert support use the devices
-\fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. 
-For SATA disks accessed with libata, use \fB"/dev/sd[a\-z]"\fP
-and append \fB"\-d ata"\fP. For disks behind 3ware controllers
-you may need \fB"/dev/sd[a\-z]"\fP or \fB"/dev/twe[0\-9]"\fP
-or \fB"/dev/twa[0\-9]"\fP: see details below. For disks behind
-HighPoint RocketRAID controllers you may need \fB"/dev/sd[a\-z]"\fP.
-More general paths (such as devfs ones) may also be specified.
+Use the forms \fB"/dev/hd[a\-t]"\fP for IDE/ATA devices, and
+\fB"/dev/sd[a\-z]"\fP for SCSI devices. For SCSI Tape Drives and
+Changers with TapeAlert support use the devices \fB"/dev/nst*"\fP and
+\fB"/dev/sg*"\fP.  For SATA disks accessed with libata, use
+\fB"/dev/sd[a\-z]"\fP and append \fB"\-d ata"\fP. For disks behind
+3ware controllers you may need \fB"/dev/sd[a\-z]"\fP or
+\fB"/dev/twe[0\-9]"\fP, \fB"/dev/twa[0\-9]"\fP or \fB"/dev/twl[0\-9]"\fP: see details
+below. For disks behind HighPoint RocketRAID controllers you may need
+\fB"/dev/sd[a\-z]"\fP.  For disks behind Areca SATA RAID controllers,
+you need \fB"/dev/sg[2\-9]"\fP (note that smartmontools interacts with
+the Areca controllers via a SCSI generic device which is different
+than the SCSI device used for reading and writing data)!
+.\" %ENDIF OS Linux
+.\" %IF OS Darwin
 .IP \fBDARWIN\fP: 9
 Use the forms \fB/dev/disk[0\-9]\fP or equivalently \fBdisk[0\-9]\fP or equivalently
 \fB/dev/rdisk[0\-9]\fP.  Long forms are also available: please use \'\-h\' to see some
 examples. Note that there is currently no Darwin SCSI support.
+.\" %ENDIF OS Darwin
+.\" %IF OS FreeBSD
 .IP \fBFREEBSD\fP: 9
 Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA
-devices and \fB"/dev/da[0\-9]+"\fP for SCSI devices.
+devices and \fB"/dev/da[0\-9]+"\fP or \fB"/dev/pass[0\-9]+"\fP for SCSI devices.
+For SATA devices on AHCI bus use \fB"/dev/ada[0\-9]+"\fP format.
+.\" %ENDIF OS FreeBSD
+.\" %IF OS NetBSD OpenBSD
 .IP \fBNETBSD/OPENBSD\fP: 9
 Use the form \fB"/dev/wd[0\-9]+c"\fP for IDE/ATA
 devices.  For SCSI disk and tape devices, use the device names
 \fB"/dev/sd[0\-9]+c"\fP and \fB"/dev/st[0\-9]+c"\fP respectively.  
 Be sure to specify the correct "whole disk" partition letter for 
 your architecture.
+.\" %ENDIF OS NetBSD OpenBSD
+.\" %IF OS Solaris
 .IP \fBSOLARIS\fP: 9
 Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
 devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices.
-.IP \fBWINDOWS\fP: 9
-Use the forms \fB"/dev/hd[a\-j]"\fP for IDE/ATA devices
-"\\\\.\\PhysicalDrive[0\-9]" on WinNT4/2000/XP/2003,
-and \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices on ASPI adapter 0\-9, ID 0\-15.
-For IDE/ATA devices on Win95/98/98SE/ME, use \fB"/dev/hd[a\-d]"\fP for standard devices
+.\" %ENDIF OS Solaris
+.\" %IF OS Windows
+.IP \fBWINDOWS\ 9x/ME\fP: 9
+Use the forms \fB"/dev/hd[a\-d]"\fP for standard IDE/ATA devices
 accessed via SMARTVSD.VXD, and \fB"/dev/hd[e\-h]"\fP for additional devices
 accessed via a patched SMARTVSE.VXD (see INSTALL file for details).
-For disks behind 3ware controllers use \fB"/dev/hd[a\-j],N"\fP where
+Use the form \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices via an aspi dll
+on ASPI adapter 0\-9, ID 0\-15. The prefix \fB"/dev/"\fP is optional.
+.\" %ENDIF OS Windows
+.\" %IF OS Windows Cygwin
+.IP \fBWINDOWS\ NT4/2000/XP/2003/Vista/Win7/2008\fP: 9
+Use the forms \fB"/dev/sd[a\-z]"\fP for IDE/(S)ATA and SCSI disks
+"\\\\.\\PhysicalDrive[0\-25]" (where "a" maps to "0").
+These disks can also be referred to as \fB"/dev/pd[0\-255]"\fP for
+"\\\\.\\PhysicalDrive[0\-255]".
+ATA disks can also be referred to as \fB"/dev/hd[a\-z]"\fP for
+"\\\\.\\PhysicalDrive[0\-25]". 
+Use one the forms \fB"/dev/tape[0\-255]"\fP, \fB"/dev/st[0\-255]"\fP,
+or \fB"/dev/nst[0\-255]"\fP for SCSI tape drives "\\\\.\\Tape[0\-255]".
+
+Alternatively, drive letters \fB"X:"\fP or \fB"X:\\"\fP may be used to
+specify the (\'basic\') disk behind a mounted partition.  This does
+not work with \'dynamic\' disks.
+
+For disks behind 3ware 9000 controllers use \fB"/dev/sd[a\-z],N"\fP where
 N specifies the disk number (3ware \'port\') behind the controller
-providing the logical drive (\'unit\') specified by \fB"/dev/hd[a\-j]"\fP.
-The option \'-d 3ware,N\' is not necessary on Windows.
+providing the logical drive (\'unit\') specified by \fB"/dev/sd[a\-z]"\fP.
+Alternatively, use \fB"/dev/tw_cli/cx/py"\fP for controller x, port y
+to run the \'tw_cli\' tool and parse the output. This provides limited
+monitoring (\'\-i\', \'\-c\', \'\-A\' below) if SMART support is missing
+in the driver. Use \fB"/dev/tw_cli/stdin"\fP or \fB"/dev/tw_cli/clip"\fP
+to parse CLI or 3DM output from standard input or clipboard.
+The option \'\-d 3ware,N\' is not necessary on Windows.
+
+[NEW EXPERIMENTAL SMARTCTL FEATURE] For disks behind Intel Matrix RAID
+driver use \fB"/dev/csmi[0\-9],N"\fP where N specifies the port behind
+the logical scsi controller "\\\\.\\Scsi[0\-9]:".
 The prefix \fB"/dev/"\fP is optional.
+.\" %ENDIF OS Windows Cygwin
+.\" %IF OS Cygwin
 .IP \fBCYGWIN\fP: 9
-See "WINDOWS" above.
+See "WINDOWS NT4/2000/XP/2003/Vista/Win7/2008" above.
+.\" %ENDIF OS Cygwin
+.\" %IF OS OS2
 .IP \fBOS/2,eComStation\fP: 9
 Use the form \fB"/dev/hd[a\-z]"\fP for IDE/ATA devices.
+.\" %ENDIF OS OS2
+.PP
+if \'\-\' is specified as the device path, \fBsmartctl\fP reads and
+interprets it's own debug output from standard input.
+See \'\-r ataioctl\' below for details.
 .PP
 Based on the device path, \fBsmartctl\fP will guess the device type
 (ATA or SCSI).  If necessary, the \'\-d\' option can be used to over\-ride
@@ -116,16 +173,6 @@ The options are grouped below into several categories.  \fBsmartctl\fP
 will execute the corresponding commands in the order: INFORMATION,
 ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
 
-SCSI devices only accept the options \fB\-h, \-V, \-i, \-a, \-A, \-d,
-\-s, \-S,\-H, \-t, \-C, \-l background, \-l error, \-l selftest, \-r,\fP
-and \fB\-X\fP.  TapeAlert devices only accept the options \fB\-h, \-V,
-\-i, \-a, \-A, \-d, \-s, \-S, \-t, \-l error, \-l selftest, \-r,\fP
-and \fB\-H\fP.
-
-Long options  are  not  supported  on  all  systems.   Use
-.B \'smartctl \-h\'
-to see the available options.
-
 .TP
 .B SHOW INFORMATION OPTIONS:
 .TP
@@ -133,9 +180,9 @@ to see the available options.
 Prints a usage message to STDOUT and exits.
 .TP
 .B \-V, \-\-version, \-\-copyright, \-\-license
-Prints version, copyright, license, home page and CVS\-id information
-for your copy of \fBsmartctl\fP to STDOUT and then exits.  Please
-include this information if you are reporting bugs or problems.
+Prints version, copyright, license, home page and SVN revision
+information for your copy of \fBsmartctl\fP to STDOUT and then exits.
+Please include this information if you are reporting bugs or problems.
 .TP
 .B \-i, \-\-info
 Prints the device model number, serial number, firmware version, and
@@ -154,14 +201,48 @@ Prints all SMART information about the disk, or TapeAlert information
 about the tape drive or changer.  For ATA devices this is equivalent
 to
 .nf
-\'\-H \-i \-c \-A \-l error \-l selftest -l selective\'
+\'\-H \-i \-c \-A \-l error \-l selftest \-l selective\'
 .fi
 and for SCSI, this is equivalent to
 .nf
 \'\-H \-i \-A \-l error \-l selftest\'.
 .fi
-Note that for ATA disks this does \fBnot\fP enable the \'\-l
-directory\' option.
+Note that for ATA disks this does \fBnot\fP enable the non-SMART options
+and the SMART options which require support for 48-bit ATA commands.
+.TP
+.B \-x, \-\-xall
+Prints all SMART and non-SMART information about the device. For ATA
+devices this is equivalent to
+.nf
+\'\-H \-i \-g all \-c \-A \-f brief \-l xerror,error \-l xselftest,selftest
+\-l selective \-l directory \-l scttemp \-l scterc \-l sataphy\'.
+.fi
+and for SCSI, this is equivalent to
+.nf
+\'\-H \-i \-A \-l error \-l selftest \-l background \-l sasphy\'.
+.fi
+.TP
+.B \-\-scan
+Scans for devices and prints each device name, device type and protocol
+([ATA] or [SCSI]) info.  May be used in conjunction with \'\-d TYPE\'
+to restrict the scan to a specific TYPE.  See also info about platform
+specific device scan and the \fBDEVICESCAN\fP directive on
+\fBsmartd\fP(8) man page.
+.TP
+.B \-\-scan\-open
+Same as \-\-scan, but also tries to open each device before printing
+device info.  The device open may change the device type due
+to autodetection (see also \'\-d test\').
+
+This option can be used to create a draft \fBsmartd.conf\fP file.
+All options after \'\-\-\' are appended to each output line.
+For example:
+.nf
+smartctl --scan-open -- -a -W 4,45,50 -m admin@work > smartd.conf
+.fi
+.TP
+.B \-g NAME, \-\-get=NAME
+Get non\-SMART device settings.  See \'\-s, \-\-set\' below for further info.
 
 .TP
 .B RUN\-TIME BEHAVIOR OPTIONS:
@@ -182,30 +263,106 @@ which failed either now or in the past.
 .I silent
 \- print no output.  The only way to learn about what was found is to
 use the exit status of \fBsmartctl\fP (see RETURN VALUES below).
+
+.I noserial
+\- Do not print the serial number of the device.
 .TP
 .B \-d TYPE, \-\-device=TYPE
-Specifies the type of the device.  The valid arguments to this option
-are \fIata\fP, \fIscsi\fP, \fIsat\fP, \fImarvell\fP, \fI3ware,N\fP, and \fIhpt,L/M\fP
-or \fIhpt,L/M/N\fP.  If this option is not used then \fBsmartctl\fP will attempt to
-guess the device type from the device name.
+Specifies the type of the device.
+The valid arguments to this option are:
 
-The \'sat\' device type is for ATA disks that have a SCSI to ATA
-Translation (SAT) Layer (SATL) between the disk and the operating system.
+.I auto
+- attempt to guess the device type from the device name or from
+controller type info provided by the operating system or from
+a matching USB ID entry in the drive database.
+This is the default.
+
+.I test
+- prints the guessed type, then opens the device and prints the
+(possibly changed) TYPE name and then exists without performing
+any further commands.
+
+.I ata
+\- the device type is ATA.  This prevents
+\fBsmartctl\fP
+from issuing SCSI commands to an ATA device.
+
+.\" %IF NOT OS Darwin
+.I scsi
+\- the device type is SCSI.  This prevents
+\fBsmartctl\fP
+from issuing ATA commands to a SCSI device.
+
+.I sat[,auto][,N]
+\- the device type is SCSI to ATA Translation (SAT).
+This is for ATA disks that have a SCSI to ATA Translation (SAT) Layer
+(SATL) between the disk and the operating system.
 SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and
-the other 16 bytes long that \fBsmartctl\fP will utilize when this device
-type is selected. The default is the 16 byte variant which can be
+the other 16 bytes long.  The default is the 16 byte variant which can be
 overridden with either \'\-d sat,12\' or \'\-d sat,16\'.
 
-Under Linux, to look at SATA disks behind Marvell SATA controllers
-(using Marvell's \'linuxIAL\' driver rather than libata driver) use \'\-d marvell\'. Such
-controllers show up as Marvell Technology Group Ltd. SATA I or II controllers
-using lspci, or using lspci -n show a vendor ID 0x11ab and a device ID of
-either 0x5040, 0x5041, 0x5080, 0x5081, 0x6041 or 0x6081. The \'linuxIAL\' driver
-seems not (yet?) available in the Linux kernel source tree, but should be available
-from system vendors (ftp://ftp.aslab.com/ is known to provide a patch with the driver).
-
-Under Linux and FreeBSD, to look at ATA disks behind 3ware SCSI RAID controllers,
-use syntax such as:
+If \'-d sat,auto\' is specified, device type SAT (for ATA/SATA disks) is
+only used if the SCSI INQUIRY data reports a SATL (VENDOR: "ATA     ").
+Otherwise device type SCSI (for SCSI/SAS disks) is used.
+
+.I usbcypress
+\- this device type is for ATA disks that are behind a Cypress USB to PATA
+bridge.  This will use the ATACB proprietary scsi pass through command.
+The default SCSI operation code is 0x24, but although it can be overridden
+with \'\-d usbcypress,0xN\', where N is the scsi operation code,
+you're running the risk of damage to the device or filesystems on it.
+
+.I usbjmicron
+- this device type is for SATA disks that are behind a JMicron USB to
+PATA/SATA bridge.  The 48-bit ATA commands (required e.g. for \'\-l xerror\',
+see below) do not work with all of these bridges and are therefore disabled by
+default.  These commands can be enabled by \'\-d usbjmicron,x\'.
+If two disks are connected to a bridge with two ports, an error message is printed
+if no PORT is specified.
+The port can be specified by \'\-d usbjmicron[,x],PORT\' where PORT is 0
+(master) or 1 (slave).  This is not necessary if the device uses a port
+multiplier to connect multiple disks to one port.  The disks appear under
+separate /dev/ice names then.
+CAUTION: Specifying \',x\' for a device which does not support it results
+in I/O errors and may disconnect the drive.  The same applies if the specified
+PORT does not exist or is not connected to a disk.
+
+.I usbsunplus
+\- this device type is for SATA disks that are behind a SunplusIT USB to SATA
+bridge.
+
+.\" %ENDIF NOT OS Darwin
+.\" %IF OS Linux
+.I marvell
+\- [Linux only] interact with SATA disks behind Marvell chip-set
+controllers (using the Marvell rather than libata driver).
+
+.I megaraid,N
+\- [Linux only] the device consists of one or more SCSI/SAS disks connected
+to a MegaRAID controller.  The non-negative integer N (in the range of 0 to
+127 inclusive) denotes which disk on the controller is monitored.
+Use syntax such as:
+.nf
+\fBsmartctl \-a \-d megaraid,2 /dev/sda\fP
+.fi
+.nf
+\fBsmartctl \-a \-d megaraid,0 /dev/sdb\fP
+.fi
+This interface will also work for Dell PERC controllers.
+The following /dev/XXX entry must exist:
+.fi
+For PERC2/3/4 controllers: \fB/dev/megadev0\fP
+.fi
+For PERC5/6 controllers: \fB/dev/megaraid_sas_ioctl_node\fP
+
+.\" %ENDIF OS Linux
+.\" %IF OS FreeBSD Linux
+.I 3ware,N
+\- [FreeBSD and Linux only] the device consists of one or more ATA disks
+connected to a 3ware RAID controller.  The non-negative integer N
+(in the range from 0 to 127 inclusive) denotes which disk on the controller
+is monitored.
+Use syntax such as:
 .nf
 \fBsmartctl \-a \-d 3ware,2 /dev/sda\fP
 .fi
@@ -215,23 +372,29 @@ use syntax such as:
 .nf
 \fBsmartctl \-a \-d 3ware,1 /dev/twa0\fP
 .fi
-where in the argument \fI3ware,N\fP, the integer N is the disk number
-(3ware \'port\') within the 3ware ATA RAID controller.  The allowed
-values of N are from 0 to 15 inclusive.  The first two forms, which
-refer to devices /dev/sda-z and /dev/twe0-15, may be used with 3ware
-series 6000, 7000, and 8000 series controllers that use the 3x-xxxx
-driver.  \fBNote that the /dev/sda-z form is deprecated\fP starting
-with the Linux 2.6 kernel series and may not be supported by the Linux
-kernel in the near future. The final form, which refers to devices
-/dev/twa0-15, must be used with 3ware 9000 series controllers, which
-use the 3w-9xxx driver.
-
-Note that if the special character device nodes /dev/twa? and
-/dev/twe? do not exist, or exist with the incorrect major or minor
+.nf
+\fBsmartctl \-a \-d 3ware,1 /dev/twl0\fP
+.fi
+The first two forms, which refer to devices /dev/sda\-z and /dev/twe0\-15,
+may be used with 3ware series 6000, 7000, and 8000 series controllers
+that use the 3x\-xxxx driver.
+\fBNote that the /dev/sda\-z form is deprecated\fP starting with
+the Linux 2.6 kernel series and may not be supported by the Linux
+kernel in the near future.  The final form, which refers to devices
+/dev/twa0\-15, must be used with 3ware 9000 series controllers, which
+use the 3w\-9xxx driver.
+
+The devices /dev/twl0\-15 must be used with the 3ware/LSI 9750 series
+controllers which use the 3w-sas driver.
+
+Note that if the special character device nodes /dev/twl?, /dev/twa?
+and /dev/twe? do not exist, or exist with the incorrect major or minor
 numbers, smartctl will recreate them on the fly.  Typically /dev/twa0
-refers to the first 9000-series controller, /dev/twa1 refers to the
-second 9000 series controller, and so on. Likewise /dev/twe0 refers to
-the first 6/7/8000-series controller, /dev/twa1 refers to the second
+refers to the first 9000\-series controller, /dev/twa1 refers to the
+second 9000 series controller, and so on.  The /dev/twl0 devices refers
+to the first 9750 series controller, /dev/twl1 resfers to the second
+9750 series controller, and so on.  Likewise /dev/twe0 refers to
+the first 6/7/8000\-series controller, /dev/twe1 refers to the second
 6/7/8000 series controller, and so on.
 
 Note that for the 6/7/8000 controllers, \fBany\fP of the physical
@@ -252,7 +415,7 @@ the 3ware controller, or to a port that does not physically have a
 disk attached to it, the behavior of \fBsmartctl\fP depends upon the
 specific controller model, firmware, Linux kernel and platform.  In
 some cases you will get a warning message that the device does not
-exist. In other cases you will be presented with \'void\' data for a
+exist.  In other cases you will be presented with \'void\' data for a
 non\-existent device.
 
 Note that if the /dev/sd? addressing form is used, then older 3w\-xxxx
@@ -260,41 +423,106 @@ drivers do not pass the "Enable Autosave"
 (\'\fB\-S on\fP\') and "Enable Automatic Offline" (\'\fB\-o on\fP\')
 commands to the disk, and produce these types of harmless syslog error
 messages instead: "\fB3w\-xxxx: tw_ioctl(): Passthru size (123392) too
-big\fP". This can be fixed by upgrading to version 1.02.00.037 or
+big\fP".  This can be fixed by upgrading to version 1.02.00.037 or
 later of the 3w\-xxxx driver, or by applying a patch to older
-versions. See \fBhttp://smartmontools.sourceforge.net/\fP for
-instructions.  Alternatively, use the character device /dev/twe0-15 interface.
+versions.  Alternatively, use the character device /dev/twe0\-15 interface.
 
 The selective self\-test functions (\'\-t select,A\-B\') are only supported
-using the character device interface /dev/twa0\-15 and /dev/twe0\-15.
+using the character device interface /dev/twl0\-15, /dev/twa0\-15 and /dev/twe0\-15.
 The necessary WRITE LOG commands can not be passed through the SCSI
 interface.
 
-.B 3ware controllers are supported under Linux, FreeBSD and Windows.
-
-To look at (S)ATA disks behind HighPoint RocketRAID controllers, use syntax
-such as:
+.\" %ENDIF OS FreeBSD Linux
+.\" %IF OS Linux FreeBSD
+.I areca,N
+\- [Linux and FreeBSD only] the device consists of one or more SATA disks connected to an
+Areca SATA RAID controller.  The positive integer N (in the range from 1 to
+24 inclusive) denotes which disk on the controller is monitored.
+.\" %ENDIF OS Linux FreeBSD
+.\" %IF OS Linux
+On Linux use syntax such as:
 .nf
-\fBsmartctl \-a \-d hpt,1/3 /dev/sda\fP
+\fBsmartctl \-a \-d areca,2 /dev/sg2\fP
 .fi
-or
 .nf
-\fBsmartctl \-a \-d hpt,1/2/3 /dev/sda\fP
+\fBsmartctl \-a \-d areca,3 /dev/sg3\fP
 .fi
-where in the argument \fIhpt,L/M\fP or \fIhpt,L/M/N\fP, the integer L is the
-controller id, the integer M is the channel number, and the integer N is the
-PMPort number if it is available. The allowed values of L are from 1 to 4
-inclusive, M are from 1 to 8 inclusive and N from 1 to 4 if PMPort available.
-Note that the /dev/sda-z form should be the device node which stands for
-the disks derived from the HighPoint RocketRAID controllers.  And also
-these values are limited by the model of the HighPoint RocketRAID controller.
-
-.B HighPoint RocketRAID controllers are currently ONLY supported under Linux.
-
+.\" %ENDIF OS Linux
+.\" %IF OS FreeBSD
+On FreeBSD use syntax such as:
+.nf
+\fBsmartctl \-a \-d areca,2 /dev/arcmsr1\fP
+.fi
+.nf
+\fBsmartctl \-a \-d areca,3 /dev/arcmsr2\fP
+.fi
+.\" %ENDIF OS FreeBSD
+The first line above addresses the second disk on the first Areca RAID controller.
+The second line addresses the third disk on the second Areca RAID
+controller.  
+.\" %IF OS Linux
+To help identify the correct device on Linus, use the command:
+.nf
+\fBcat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices\fP
+.fi
+to show the SCSI generic devices (one per line, starting with
+/dev/sg0).  The correct SCSI generic devices to address for
+smartmontools are the ones with the type field equal to 3.  If the
+incorrect device is addressed, please read the warning/error messages
+carefully.  They should provide hints about what devices to use.
+.\" %ENDIF OS Linux
+
+.\" %IF OS Linux FreeBSD
+Important: the Areca controller must have firmware version 1.46 or
+later.  Lower-numbered firmware versions will give (harmless) SCSI
+error messages and no SMART information.
+
+.\" %ENDIF OS Linux FreeBSD
+.\" %IF OS FreeBSD Linux
+.I cciss,N
+\- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS disks
+connected to a cciss RAID controller.  The non-negative integer N (in the range
+from 0 to 15 inclusive) denotes which disk on the controller is monitored.
+
+If the controller firmware or driver provides a SAT Layer it may be possible
+to monitor also SATA disks by specifiying \'\-d sat+cciss,N\'.
+
+.I hpt,L/M/N
+\- [FreeBSD and Linux only] the device consists of one or more ATA disks
+connected to a HighPoint RocketRAID controller.  The integer L is the
+controller id, the integer M is the channel number, and the integer N
+is the PMPort number if it is available.  The allowed values of L are
+from 1 to 4 inclusive, M are from 1 to 16 inclusive and N from 1 to 4
+if PMPort available.  And also these values are limited by the model
+of the HighPoint RocketRAID controller.
+Use syntax such as:
+.\" %ENDIF OS FreeBSD Linux
+.\" %IF OS Linux
+.nf
+\fBsmartctl \-a \-d hpt,1/3 /dev/sda\fP    (under Linux)
+.fi
+.nf
+\fBsmartctl \-a \-d hpt,1/2/3 /dev/sda\fP    (under Linux)
+.fi
+.\" %ENDIF OS Linux
+.\" %IF OS FreeBSD
+.nf
+\fBsmartctl \-a \-d hpt,1/3 /dev/hptrr\fP    (under FreeBSD)
+.fi
+.nf
+\fBsmartctl \-a \-d hpt,1/2/3 /dev/hptrr\fP    (under FreeBSD)
+.fi
+.\" %ENDIF OS FreeBSD
+.\" %IF OS FreeBSD Linux
+Note that the /dev/sda\-z form should be the device node which stands for
+the disks derived from the HighPoint RocketRAID controllers under Linux and
+under FreeBSD, it is the character device which the driver registered (eg,
+/dev/hptrr, /dev/hptmv6).
+.\" %ENDIF OS FreeBSD Linux
 .TP
 .B \-T TYPE, \-\-tolerance=TYPE
-Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART command
-failures. 
+[ATA only] Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART
+command failures. 
 
 The behavior of \fBsmartctl\fP depends upon whether the command is
 "\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means
@@ -331,12 +559,11 @@ such cases, contrary to the final message, Feature X \fBis\fP enabled.
 \- equivalent to giving a large number of \'\-T permissive\' options:
 ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands.
 Please see the note above.
-
 .TP
 .B \-b TYPE, \-\-badsum=TYPE
-Specifies the action \fBsmartctl\fP should take if a checksum error is
-detected in the: (1) Device Identity Structure, (2) SMART Self\-Test
-Log Structure, (3) SMART Attribute Value Structure, (4) SMART
+[ATA only] Specifies the action \fBsmartctl\fP should take if a checksum
+error is detected in the: (1) Device Identity Structure, (2) SMART
+Self\-Test Log Structure, (3) SMART Attribute Value Structure, (4) SMART
 Attribute Threshold Structure, or (5) ATA Error Log Structure.
 
 The valid arguments to this option are:
@@ -350,7 +577,6 @@ default.
 
 .I ignore
 \- continue silently without issuing a warning.
-
 .TP
 .B \-r TYPE, \-\-report=TYPE
 Intended primarily to help \fBsmartmontools\fP developers understand
@@ -381,12 +607,25 @@ the integer with no spaces.  For example,
 The default
 level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are equivalent.
 
+For testing purposes, the output of \'\-r ataioctl,2\' can later be parsed
+by \fBsmartctl\fP itself if \'\-\' is used as device path argument.
+The ATA command input parameters, sector data and return values are
+reconstructed from the debug report read from stdin.
+Then \fBsmartctl\fP internally simulates an ATA device with the same
+behaviour. This is does not work for SCSI devices yet.
 .TP
 .B \-n POWERMODE, \-\-nocheck=POWERMODE
-Specifieds if \fBsmartctl\fP should exit before performing any checks
-when the device is in a low\-power mode. It may be used to prevent a disk
-from being spun\-up by \fBsmartctl\fP. The power mode is ignored by
-default. The allowed values of POWERMODE are:
+[ATA only] Specifies if \fBsmartctl\fP should exit before performing any
+checks when the device is in a low\-power mode. It may be used to prevent
+a disk from being spun\-up by \fBsmartctl\fP. The power mode is ignored by
+default.  A nonzero exit status is returned if the device is in one of the
+specified low\-power modes (see RETURN VALUES below).
+
+Note: If this option is used it may also be necessary to specify the device
+type with the \'-d\' option.  Otherwise the device may spin up due to
+commands issued during device type autodetection.
+
+The valid arguments to this option are:
 
 .I never
 \- check the device always, but print the power mode if \'\-i\' is
@@ -420,16 +659,16 @@ the corresponding disable command.
 .B \-s VALUE, \-\-smart=VALUE 
 Enables or disables SMART on device.  The valid arguments to
 this option are \fIon\fP and \fIoff\fP.  Note that the command \'\-s on\'
-(perhaps used with with the \'\-o on\' and \'\-S on\' options) should be placed
-in a start\-up script for your machine, for example in rc.local or rc.sysinit.
-In principle the SMART feature settings are preserved over
+(perhaps used with with the \'\-o on\' and \'\-S on\' options) should be
+placed in a start\-up script for your machine, for example in rc.local or
+rc.sysinit. In principle the SMART feature settings are preserved over
 power\-cycling, but it doesn\'t hurt to be sure. It is not necessary (or
 useful) to enable SMART to see the TapeAlert messages.
 .TP
 .B \-o VALUE, \-\-offlineauto=VALUE
-Enables or disables SMART automatic offline test, which scans the drive
-every four hours for disk defects. This command can be given during normal
-system operation.  The valid arguments to this option are \fIon\fP
+[ATA only] Enables or disables SMART automatic offline test, which scans the
+drive every four hours for disk defects. This command can be given during
+normal system operation.  The valid arguments to this option are \fIon\fP
 and \fIoff\fP.
 
 Note that the SMART automatic offline test command is listed as
@@ -498,13 +737,17 @@ connection with the second category just described, e.g. for the
 connection with the third category.
 .TP
 .B \-S VALUE, \-\-saveauto=VALUE
-Enables or disables SMART autosave of device vendor\-specific
+[ATA] Enables or disables SMART autosave of device vendor\-specific
 Attributes. The valid arguments to this option are \fIon\fP
 and \fIoff\fP.  Note that this feature is preserved across disk power
 cycles, so you should only need to issue it once.
 
-For SCSI devices this toggles the value of the Global Logging Target
-Save Disabled (GLTSD) bit in the Control Mode Page. Some disk
+The ATA standard does not specify a method to check whether SMART
+autosave is enabled. Unlike SCSI (below), smartctl is unable to print
+a warning if autosave is disabled.
+
+[SCSI] For SCSI devices this toggles the value of the Global Logging
+Target Save Disabled (GLTSD) bit in the Control Mode Page. Some disk
 manufacturers set this bit by default. This prevents error counters,
 power\-up hours and other useful data from being placed in non\-volatile
 storage, so these values may be reset to zero the next time the device
@@ -513,6 +756,67 @@ issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable
 saving counters to non\-volatile storage. For extreme streaming\-video
 type applications you might consider using \fIoff\fP to set the GLTSD
 bit.
+.TP
+.B \-g NAME, \-\-get=NAME, \-s NAME[,VALUE], \-\-set=NAME[,VALUE]
+[NEW EXPERIMENTAL SMARTCTL FEATURE] Gets/sets non\-SMART device settings.
+Note that the \'\-\-set\' option shares its short option \'\-s\' with
+\'\-\-smart\'.  Valid arguments are:
+
+.I all
+\- Gets all values. This is equivalent to
+.nf
+\'-g aam -g apm -g lookahead -g security -g wcache\'
+.fi
+
+.I aam[,N|off]
+\- [ATA only] Gets/sets the Automatic Acoustic Management (AAM) feature
+(if supported).  A value of 128 sets the most quiet (slowest) mode and 254
+the fastest (loudest) mode, \'off\' disables AAM.  Devices may support
+intermediate levels.  Values below 128 are defined as vendor specific (0)
+or retired (1\-127).  Note that the AAM feature was declared obsolete in
+ATA ACS-2 Revision 4a (Dec 2010).
+
+.I apm[,N|off]
+\- [ATA only] Gets/sets the Advanced Power Management (APM) feature on
+device (if supported).  If a value between 1 and 254 is provided, it will
+attempt to enable APM and set the specified value, \'off\' disables APM.
+Note the actual behavior depends on the drive, for example some drives disable
+APM if their value is set above 128.  Values below 128 are supposed to allow
+drive spindown, values 128 and above adjust only head-parking frequency,
+although the actual behavior defined is also vendor-specific.
+
+.I lookahead[,on|off]
+\- [ATA only] Gets/sets the read look-ahead feature (if supported).
+Read look-ahead is usually enabled by default.
+
+.I security
+\- [ATA only] Gets the status of ATA Security feature (if supported).
+If ATA Security is enabled an ATA user password is set.  The drive will be
+locked on next reset then.
+
+.I security-freeze
+\- [ATA only] Sets ATA Security feature to frozen mode.  This prevents that
+the drive accepts any security commands until next reset.  Note that the
+frozen mode may already be set by BIOS or OS.
+
+.I standby,[N|off]
+\- [ATA only] Sets the standby (spindown) timer and places the drive in the
+IDLE mode.  A value of 0 or \'off\' disables the standby timer.
+Values from 1 to 240 specify timeouts from 5 seconds to 20 minutes in 5
+second increments.  Values from 241 to 251 specify timeouts from 30 minutes
+to 330 minutes in 30 minute increments.  Value 252 specifies 21 minutes.
+Value 253 specifies a vendor specific time between 8 and 12 hours.  Value
+255 specifies 21 minutes and 15 seconds.  Some drives may use a vendor
+specific interpretation for the values.  Note that there is no get option
+because ATA standards do not specify a method to read the standby timer.
+
+.I standby,now
+\- [ATA only] Places the drive in the STANDBY mode.  This usually spins down
+the drive.  The setting of the standby timer is not affected.
+
+.I wcache[,on|off]
+\- [ATA only] Gets/sets the volatile write cache feature (if supported).
+The write cache is usually enabled by default.
 
 .TP
 .B SMART READ AND DISPLAY DATA OPTIONS:
@@ -531,11 +835,11 @@ that the device has already failed,
 .B or 
 that it is predicting its own failure within the next 24 hours.  If
 this happens, use the \'\-a\' option to get more information, and
-.B get your data off the disk and someplace safe as soon as you can.
+.B get your data off the disk and to someplace safe as soon as you can.
 .TP
 .B \-c, \-\-capabilities
-Prints only the generic SMART capabilities.  These show
-what SMART features are implemented and how the device will
+[ATA only] Prints only the generic SMART capabilities.  These
+show what SMART features are implemented and how the device will
 respond to some of the different SMART commands.  For example it
 shows if the device logs errors, if it supports offline surface
 scanning, and so on.  If the device can carry out self\-tests, this
@@ -551,8 +855,8 @@ for further information about the the flags and capabilities described
 by this option.
 .TP
 .B \-A, \-\-attributes
-Prints only the vendor specific SMART Attributes.  The Attributes are
-numbered from 1 to 253 and have specific names and ID numbers. For
+[ATA] Prints only the vendor specific SMART Attributes.  The Attributes
+are numbered from 1 to 253 and have specific names and ID numbers. For
 example Attribute 12 is "power cycle count": how many times has the
 disk been powered up.
 
@@ -633,11 +937,32 @@ Attribute fields has been made entirely vendor\-specific.  However most
 ATA/ATAPI\-5 disks seem to respect their meaning, so we have retained
 the option of printing the Attribute values.
 
-For SCSI devices the "attributes" are obtained from the temperature
-and start-stop cycle counter log pages. Certain vendor specific
+[SCSI] For SCSI devices the "attributes" are obtained from the temperature
+and start\-stop cycle counter log pages. Certain vendor specific
 attributes are listed if recognised. The attributes are output in a
 relatively free format (compared with ATA disk attributes).
 .TP
+.B \-f FORMAT, \-\-format=FORMAT
+[ATA only] Selects the output format of the attributes:
+
+.I old
+\- Old smartctl format. This is the default unless the \'\-x\' option is
+specified.
+
+.I brief
+\- New format which fits into 80 colums (except in some rare cases).
+This format also decodes four additional attribute flags.
+This is the default if the '\-x\' option is specified.
+
+.I hex,id
+\- Print all attribute IDs as hexadecimal numbers.
+
+.I hex,val
+\- Print all normalized values as hexadecimal numbers.
+
+.I hex
+\- Same as \'\-f hex,id \-f hex,val\'.
+.TP
 .B \-l TYPE, \-\-log=TYPE
 Prints either the SMART Error Log, the SMART Self\-Test Log, the SMART
 Selective Self\-Test Log [ATA only], the Log Directory [ATA only], or
@@ -645,8 +970,8 @@ the Background Scan Results Log [SCSI only].
 The valid arguments to this option are:
 
 .I error
-\- prints only the SMART error log.  SMART disks maintain a log of the
-most recent five non\-trivial errors. For each of these errors, the
+\- [ATA] prints the Summary SMART error log.  SMART disks maintain a log
+of the most recent five non\-trivial errors. For each of these errors, the
 disk power\-on lifetime at which the error occurred is recorded, as is
 the device status (idle, standby, etc) at the time of the error.  For
 some common types of errors, the Error Register (ER) and Status
@@ -719,27 +1044,48 @@ Please note that some manufacturers \fBignore\fP the ATA
 specifications, and make entries in the error log if the device
 receives a command which is not implemented or is not valid.
 
-.I error [SCSI]
-\- prints the error counter log pages for reads, write and verifies.
+.I error
+\- [SCSI] prints the error counter log pages for reads, write and verifies.
 The verify row is only output if it has an element other than zero.
 
+.I xerror[,NUM][,error]
+\- [ATA only] prints the Extended Comprehensive SMART error log
+(General Purpose Log address 0x03).  Unlike the Summary SMART error
+log (see \'\-l error\' above), it provides sufficient space to log
+the contents of the 48-bit LBA register set introduced with ATA-6.
+It also supports logs with more than one sector.  Each sector holds
+up to 4 log entries. The actual number of log sectors is vendor
+specific, typical values for HDD are 2 (Samsung), 5 (Seagate) or
+6 (WD).  Some recent SSD devices have much larger error logs.
+
+Only the 8 most recent error log entries are printed by default.
+This number can be changed by the optional parameter NUM.
+
+If ',error' is appended and the Extended Comprehensive SMART error
+log is not supported, the Summary SMART self-test log is printed.
+
+Please note that some recent (e.g. Samsung) drives report errors only
+in the Extended Comprehensive SMART error log. The Summary SMART error
+log can be read but is always empty.
+
 .I selftest
-\- prints the SMART self\-test log.  The disk maintains a self\-test log
-showing the results of the self tests, which can be run using the
+\- [ATA] prints the SMART self\-test log.  The disk maintains a self\-test
+log showing the results of the self tests, which can be run using the
 \'\-t\' option described below.  For each of the most recent
 twenty\-one self\-tests, the log shows the type of test (short or
 extended, off\-line or captive) and the final status of the test.  If
 the test did not complete successfully, then the percentage of the
 test remaining is shown.  The time at which the test took place,
-measured in hours of disk lifetime, is also printed.  If any errors
-were detected, the Logical Block Address (LBA) of the first error is
-printed in decimal notation. On Linux systems the smartmontools
-web page has instructions about how to convert this LBA address to the
-name of the disk file containing the erroneous block.
-
-.I selftest [SCSI]
-\- the self\-test log for a SCSI device has a slightly different format
-than for an ATA device.  For each of the most recent twenty
+measured in hours of disk lifetime, is also printed. [Note: this time
+stamp wraps after 2^16 hours, or 2730 days and 16 hours, or about 7.5
+years.] If any errors were detected, the Logical Block Address (LBA)
+of the first error is printed in decimal notation.  On Linux systems the
+smartmontools web page has instructions about how to convert this LBA
+address to the name of the disk file containing the erroneous block.
+
+.I selftest
+\- [SCSI] the self\-test log for a SCSI device has a slightly different
+format than for an ATA device.  For each of the most recent twenty
 self\-tests, it shows the type of test and the status (final or in
 progress) of the test. SCSI standards use the terms "foreground" and
 "background" (rather than ATA\'s corresponding "captive" and
@@ -759,9 +1105,21 @@ Additional Sense Code Qualifier (ASQ) are also printed. The self tests
 can be run using the \'\-t\' option described below (using the ATA
 test terminology).
 
-.I selective [ATA]
-\- Some ATA\-7 disks (example: Maxtor) also maintain a selective
-self\-test log.  Please see the \'\-t select\' option below for a
+.I xselftest[,NUM][,selftest]
+\- [ATA only] prints the Extended SMART self\-test log (General Purpose
+Log address 0x07). Unlike the SMART self\-test log (see \'\-l selftest\'
+above), it supports 48-bit LBA and logs with more than one sector.
+Each sector holds up to 19 log entries. The actual number of log sectors
+is vendor specific, typical values are 1 (Seagate) or 2 (Samsung).
+
+Only the 25 most recent log entries are printed by default. This number
+can be changed by the optional parameter NUM.
+
+If ',selftest' is appended and the Extended SMART self-test log is not
+supported, the old SMART self-test log is printed.
+
+.I selective
+\- [ATA only] Please see the \'\-t select\' option below for a
 description of selective self\-tests.  The selective self\-test log
 shows the start/end Logical Block Addresses (LBA) of each of the five
 test spans, and their current test status.  If the span is being
@@ -775,9 +1133,9 @@ delay before restarting this read\-scan if it is interrupted (see
 report unusual or incorrect behavior to the smartmontools\-support
 mailing list.
 
-.I directory
-\- if the device supports the General Purpose Logging feature set
-(ATA\-6 and ATA\-7 only) then this prints the Log Directory (the log at
+.I directory[,gs]
+\- [ATA only] if the device supports the General Purpose Logging feature
+set (ATA\-6 and above) then this prints the Log Directory (the log at
 address 0).  The Log Directory shows what logs are available and their
 length in sectors (512 bytes).  The contents of the logs at address 1
 [Summary SMART error log] and at address 6 [SMART self\-test log] may
@@ -785,16 +1143,16 @@ be printed using the previously\-described
 .I error
 and
 .I selftest
-arguments to this option. [Please note: this is a new, experimental
-feature.  We would like to add support for printing the contents of
-extended and comprehensive SMART self\-test and error logs.  If your
-disk supports these, and you would like to assist, please contact the
-\fBsmartmontools\fP developers.]
-
-.I background [SCSI]
-\- the background scan results log outputs information derived from
-Background Media Scans (BMS) done after power up and/or periodocally (e.g.
-every 24 hours) on recent SCSI disks. If supported, the BMS status
+arguments to this option.
+If your version of smartctl supports 48-bit ATA commands, both the
+General Purpose Log (GPL) and SMART Log (SL) directories are printed in
+one combined table. The output can be restricted to the GPL directory or
+SL directory by \'\-l directory,q\' or \'\-l directory,s\' respectively.
+
+.I background
+\- [SCSI only] the background scan results log outputs information derived
+from Background Media Scans (BMS) done after power up and/or periodocally
+(e.g. every 24 hours) on recent SCSI disks. If supported, the BMS status
 is output first, indicating whether a background scan is currently
 underway (and if so a progress percentage), the amount of time the disk
 has been powered up and the number of scans already completed. Then there
@@ -803,43 +1161,209 @@ typically be either recovered or unrecoverable errors. That latter group
 may need some attention. There is a description of the background scan
 mechansim in section 4.18 of SBC\-3 revision 6 (see www.t10.org ).
 
-.TP
-.B \-v N,OPTION, \-\-vendorattribute=N,OPTION
-Sets a vendor\-specific display OPTION for Attribute N.  This option
-may be used multiple times. Valid arguments to this option are:
+.I scttemp, scttempsts, scttemphist
+\- [ATA only] prints the disk temperature information provided by the
+SMART Command Transport (SCT) commands.
+The option \'scttempsts\' prints current temperature and temperature
+ranges returned by the SCT Status command, \'scttemphist\' prints
+temperature limits and the temperature history table returned by
+the SCT Data Table command, and \'scttemp\' prints both.
+The temperature values are preserved across power cycles.
+The logging interval can be configured with the
+\'\-l scttempint,N[,p]\' option, see below.
+The SCT commands were introduced in ATA\-8 ACS and were also
+supported by in many ATA\-7 disks.
+
+.I scttempint,N[,p]
+\- [ATA only] clears the SCT temperature history table and sets the
+time interval for temperature logging to N minutes.
+If \',p\' is specified, the setting is preserved across power cycles.
+Otherwise, the setting is volatile and will be reverted to the last
+non-volatile setting by the next hard reset.  The default interval
+is vendor specific, typical values are 1, 2, or 5 minutes.
+
+.I scterc[,READTIME,WRITETIME]
+\- [ATA only] prints values and descriptions of the SCT Error Recovery
+Control settings. These are equivalent to TLER (as used by Western
+Digital), CCTL (as used by Samsung and Hitachi) and ERC (as used by
+Seagate). READTIME and WRITETIME arguments (deciseconds) set the
+specified values. Values of 0 disable the feature, other values less
+than 65 are probably not supported. For RAID configurations, this is
+typically set to 70,70 deciseconds.
+
+.I devstat[,PAGE]
+\- [ATA only] [NEW EXPERIMENTAL SMARTCTL FEATURE] prints values
+and descriptions of the ATA Device Statistics log pages
+(General Purpose Log address 0x04).  If no PAGE number is specified,
+entries from all supported pages are printed.  If PAGE 0 is specified,
+the list of supported pages is printed.  Device Statistics was
+introduced in ATA\-8 ACS and is only supported by some recent devices
+(e.g. Intel 320 and 710 Series SSDs).
+
+.I sataphy[,reset]
+\- [SATA only] prints values and descriptions of the SATA Phy Event
+Counters (General Purpose Log address 0x11).  If \'\-l sataphy,reset\'
+is specified, all counters are reset after reading the values.
+
+.I sasphy[,reset]
+\- [SAS (SCSI) only] prints values and descriptions of the SAS (SSP)
+Protocol Specific log page (log page 0x18).  If \'\-l sasphy,reset\'
+is specified, all counters are reset after reading the values.
+
+.I gplog,ADDR[,FIRST[\-LAST|+SIZE]]
+\- [ATA only] prints a hex dump of any log accessible via General
+Purpose Logging (GPL) feature.  The log address ADDR is the hex address
+listed in the log directory (see \'\-l directory\' above).
+The range of log sectors (pages) can be specified by decimal values
+FIRST\-LAST or FIRST+SIZE.  FIRST defaults to 0, SIZE defaults to 1.
+LAST can be set to \'max\' to specify the last page of the log.
+
+.I smartlog,ADDR[,FIRST[\-LAST|+SIZE]]
+\- [ATA only] prints a hex dump of any log accessible via SMART Read
+Log command.  See \'\-l gplog,...\' above for parameter syntax.
+
+For example, all these commands:
+.nf
+  smartctl \-l gplog,0x80,10-15 /dev/sda
+  smartctl \-l gplog,0x80,10+6 /dev/sda
+  smartctl \-l smartlog,0x80,10-15 /dev/sda
+.fi
+print pages 10-15 of log 0x80 (first host vendor specific log).
 
-.I help
+The hex dump format is compatible with the \'xxd \-r\' command.
+This command:
+.nf
+  smartctl \-l gplog,0x11 /dev/sda | grep ^0 | xxd -r >log.bin
+.fi
+writes a binary representation of the one sector log 0x11
+(SATA Phy Event Counters) to file log.bin.
+
+.I ssd
+\- [ATA] prints the Solid State Device Statistics log page.
+This has the same effect as \'\-l devstat,7\', see above.
+
+.I ssd
+\- [SCSI] prints the Solid State Media percentage used endurance
+indicator. A value of 0 indicates as new condition while 100
+indicates the device is at the end of its lifetime as projected by the
+manufacturer. The value may reach 255.
+.TP
+.B \-v ID,FORMAT[:BYTEORDER][,NAME], \-\-vendorattribute=ID,FORMAT[:BYTEORDER][,NAME]
+[ATA only] Sets a vendor\-specific raw value print FORMAT, an optional
+BYTEORDER and an optional NAME for Attribute ID.
+This option may be used multiple times.
+
+The Attribute ID can be in the range 1 to 255. If \'N\' is specified as
+ID, the settings for all Attributes are changed.
+
+The optional BYTEORDER consists of 1 to 8 characters from the
+set \'012345rvwz\'. The characters \'0\' to \'5\' select the byte 0
+to 5 from the 48\-bit raw value, \'r\' selects the reserved byte of
+the attribute data block, \'v\' selects the normalized value, \'w\'
+selects the worst value and \'z\' inserts a zero byte.
+The default BYTEORDER is \'543210\' for all 48\-bit formats, \'r543210\'
+for the 54\-bit formats, and \'543210wv\' for the 64\-bit formats.
+For example, \'\-v 5,raw48:012345\' prints the raw value of
+attribute 5 with big endian instead of little endian
+byte ordering.
+
+The NAME is a string of letters, digits and underscore.  Its length should
+not exceed 23 characters.  The \'\-P showall\' option reports an error if
+this is the case.
+
+.I \-v help
 \- Prints (to STDOUT) a list of all valid arguments to this option,
 then exits.
 
-.I 9,minutes
-\- Raw Attribute number 9 is power\-on time in minutes.  Its raw value
+Valid arguments for FORMAT are:
+
+.I raw8
+\- Print the Raw value as six 8\-bit unsigned base\-10 integers.
+This may be useful for decoding the meaning of the Raw value.
+
+.I raw16
+\- Print the Raw value as three 16\-bit unsigned base\-10 integers.
+This may be useful for decoding the meaning of the Raw value.
+
+.I raw48
+\- Print the Raw value as a 48\-bit unsigned base\-10 integer.
+This is the default for most attributes.
+
+.I hex48
+\- Print the Raw value as a 12 digit hexadecimal number.
+This may be useful for decoding the meaning of the Raw value.
+
+.I raw56
+\- Print the Raw value as a 54\-bit unsigned base\-10 integer.
+This includes the reserved byte which follows the 48\-bit raw value.
+
+.I hex56
+\- Print the Raw value as a 14 digit hexadecimal number.
+This includes the reserved byte which follows the 48\-bit raw value.
+
+.I raw64
+\- Print the Raw value as a 64\-bit unsigned base\-10 integer.
+This includes two bytes from the normalized and worst attribute value.
+This raw format is used by some SSD devices with Indilinx controller.
+
+.I hex64
+\- Print the Raw value as a 16 digit hexadecimal number.
+This includes two bytes from the normalized and worst attribute value.
+This raw format is used by some SSD devices with Indilinx controller.
+
+.I min2hour
+\- Raw Attribute is power\-on time in minutes.  Its raw value
 will be displayed in the form "Xh+Ym".  Here X is hours, and Y is
 minutes in the range 0\-59 inclusive.  Y is always printed with two
 digits, for example "06" or "31" or "00".
 
-.I 9,seconds
-\- Raw Attribute number 9 is power\-on time in seconds.  Its raw value
+.I sec2hour
+\- Raw Attribute is power\-on time in seconds.  Its raw value
 will be displayed in the form "Xh+Ym+Zs".  Here X is hours, Y is
 minutes in the range 0\-59 inclusive, and Z is seconds in the range
 0\-59 inclusive.  Y and Z are always printed with two digits, for
 example "06" or "31" or "00".
 
-.I 9,halfminutes
-\- Raw Attribute number 9 is power\-on time, measured in units of 30
+.I halfmin2hour
+\- Raw Attribute is power\-on time, measured in units of 30
 seconds.  This format is used by some Samsung disks.  Its raw value
 will be displayed in the form "Xh+Ym".  Here X is hours, and Y is
 minutes in the range 0\-59 inclusive.  Y is always printed with two
 digits, for example "06" or "31" or "00".
 
-.I 9,temp
-\- Raw Attribute number 9 is the disk temperature in Celsius.
-
-.I 192,emergencyretractcyclect
-\- Raw Attribute number 192 is the Emergency Retract Cycle Count.
-
-.I 193,loadunload
-\- Raw Attribute number 193 contains two values. The first is the
+.I msec24hour32
+\- Raw Attribute is power\-on time measured in 32\-bit hours and 24\-bit
+milliseconds since last hour update.  It will be displayed in the form
+"Xh+Ym+Z.Ms".  Here X is hours, Y is minutes, Z is seconds and M is
+milliseconds.
+
+.I tempminmax
+\- Raw Attribute is the disk temperature in Celsius.  Info about
+Min/Max temperature is printed if available.  This is the default
+for Attributes 190 and 194.  The recording interval (lifetime,
+last power cycle, last soft reset) of the min/max values is device
+specific.
+
+.I temp10x
+\- Raw Attribute is ten times the disk temperature in Celsius.
+
+.I raw16(raw16)
+\- Print the raw attribute as a 16\-bit value and two optional
+16\-bit values if these words are nonzero.  This is the default
+for Attributes 5 and 196.
+
+.I raw16(avg16)
+\- Raw attribute is spin-up time.  It is printed as a 16-bit value
+and an optional "Average" 16-bit value if the word is nonzero.
+This is the default for Attribute 3.
+
+.I raw24(raw8)
+\- Print the raw attribute as a 24\-bit value and three optional
+8\-bit values if these bytes are nonzero.  This is the default
+for Attribute 9.
+
+.I raw24/raw24
+\- Raw Attribute contains two 24\-bit values. The first is the
 number of load cycles.  The second is the number of unload cycles.
 The difference between these two values is the number of times that
 the drive was unexpectedly powered off (also called an emergency
@@ -847,59 +1371,83 @@ unload). As a rule of thumb, the mechanical stress created by one
 emergency unload is equivalent to that created by one hundred normal
 unloads.
 
+.I raw24/raw32
+\- Raw attribute is an error rate which consists of a 24\-bit error
+count and a 32\-bit total count.
+
+The following old arguments to \'\-v\' are also still valid:
+
+.I 9,minutes
+\- same as:
+.I 9,min2hour,Power_On_Minutes.
+
+.I 9,seconds
+\- same as:
+.I 9,sec2hour,Power_On_Seconds.
+
+.I 9,halfminutes
+\- same as:
+.I 9,halfmin2hour,Power_On_Half_Minutes.
+
+.I 9,temp
+\- same as:
+.I 9,tempminmax,Temperature_Celsius.
+
+.I 192,emergencyretractcyclect
+\- same as:
+.I 192,raw48,Emerg_Retract_Cycle_Ct
+
+.I 193,loadunload
+\- same as:
+.I 193,raw24/raw24.
+
 .I 194,10xCelsius
-\- Raw Attribute number 194 is ten times the disk temperature in
-Celsius.  This is used by some Samsung disks (example: model SV1204H
-with RK100\-13 firmware).
+\- same as:
+.I 194,temp10x,Temperature_Celsius_x10.
 
 .I 194,unknown
-\- Raw Attribute number 194 is NOT the disk temperature, and its
-interpretation is unknown. This is primarily useful for the \-P
-(presets) option.
+\- same as:
+.I 194,raw48,Unknown_Attribute.
+
+.I 197,increasing
+\- same as:
+.I 197,raw48,Total_Pending_Sectors.
+Also means that Attribute number 197 (Current Pending Sector Count)
+is not reset if uncorrectable sectors are reallocated
+(see \fBsmartd.conf\fP(5) man page).
+
+.I 198,increasing
+\- same as:
+.I 198,raw48,Total_Offl_Uncorrectabl.
+Also means that Attribute number 198 (Offline Uncorrectable Sector Count)
+is not reset if uncorrectable sectors are reallocated
+(see \fBsmartd.conf\fP(5) man page).
 
 .I 198,offlinescanuncsectorct
-\- Raw Attribute number 198 is the Offline Scan UNC Sector Count.
+\- same as:
+.I 198,raw48,Offline_Scan_UNC_SectCt.
 
 .I 200,writeerrorcount
-\- Raw Attribute number 200 is the Write Error Count.
+\- same as:
+.I 200,raw48,Write_Error_Count.
 
 .I 201,detectedtacount
-\- Raw Attribute number 201 is the Detected TA Count.
+\- same as:
+.I 201,raw48,Detected_TA_Count.
 
 .I 220,temp
-\- Raw Attribute number 220 is the disk temperature in Celsius.
+\- same as:
+.I 220,raw48,Temperature_Celsius.
 
 Note: a table of hard drive models, listing which Attribute
 corresponds to temperature, can be found at:
 \fBhttp://www.guzu.net/linux/hddtemp.db\fP
-
-.I N,raw8
-\- Print the Raw value of Attribute N as six 8\-bit unsigned base\-10
-integers.  This may be useful for decoding the meaning of the Raw
-value.  The form \'N,raw8\' prints Raw values for ALL Attributes in this
-form.  The form (for example) \'123,raw8\' only prints the Raw value for
-Attribute 123 in this form.
-
-.I N,raw16
-\- Print the Raw value of Attribute N as three 16\-bit unsigned base\-10
-integers.  This may be useful for decoding the meaning of the Raw
-value.  The form \'N,raw16\' prints Raw values for ALL Attributes in this
-form.  The form (for example) \'123,raw16\' only prints the Raw value for
-Attribute 123 in this form.
-
-.I N,raw48
-\- Print the Raw value of Attribute N as a 48\-bit unsigned base\-10
-integer.  This may be useful for decoding the meaning of the Raw
-value.  The form \'N,raw48\' prints Raw values for ALL Attributes in
-this form.  The form (for example) \'123,raw48\' only prints the Raw
-value for Attribute 123 in this form.
-
 .TP
 .B \-F TYPE, \-\-firmwarebug=TYPE
-Modifies the behavior of \fBsmartctl\fP to compensate for some known
-and understood device firmware bug.  The arguments to this option are
-exclusive, so that only the final option given is used.  The valid
-values are:
+[ATA only] Modifies the behavior of \fBsmartctl\fP to compensate for some
+known and understood device firmware or driver bug.  Except \'swapid\',
+the arguments to this option are exclusive, so that only the final
+option given is used.  The valid values are:
 
 .I none
 \- Assume that the device firmware obeys the ATA specifications.  This
@@ -917,23 +1465,31 @@ are (1) no self\-test log printed, even though you have run self\-tests;
 (3) strange and impossible values for the ATA error log timestamps.
 
 .I samsung2
-\- In more recent Samsung disks (firmware revisions ending in "\-23")
-the number of ATA errors reported is byte swapped.  Enabling this
-option tells \fBsmartctl\fP to evaluate this quantity in
+\- In some Samsung disks the number of ATA errors reported is byte swapped.
+Enabling this option tells \fBsmartctl\fP to evaluate this quantity in
 byte\-reversed order. An indication that your Samsung disk needs this
-option is that the self-test log is printed correctly, but there are a
+option is that the self\-test log is printed correctly, but there are a
 very large number of errors in the SMART error log.  This is because
 the error count is byte swapped.  Thus a disk with five errors
 (0x0005) will appear to have 20480 errors (0x5000).
 
+.I samsung3
+\- Some Samsung disks (at least SP2514N with Firmware VF100\-37) report
+a self\-test still in progress with 0% remaining when the test was already
+completed. Enabling this option modifies the output of the self\-test
+execution status (see options \'\-c\' or \'\-a\' above) accordingly.
+
 Note that an explicit \'\-F\' option on the command line will
 over\-ride any preset values for \'\-F\' (see the \'\-P\' option
 below).
 
+.I swapid
+\- Fixes byte swapped ATA identify strings (device name, serial number,
+firmware version) returned by some buggy device drivers.
 .TP
 .B \-P TYPE, \-\-presets=TYPE
-Specifies whether \fBsmartctl\fP should use any preset options that
-are available for this drive. By default, if the drive is recognized
+[ATA only] Specifies whether \fBsmartctl\fP should use any preset options
+that are available for this drive. By default, if the drive is recognized
 in the \fBsmartmontools\fP database, then the presets are used.
 
 \fBsmartctl\fP can automatically set appropriate options for known
@@ -974,7 +1530,8 @@ presets, then exit.
 
 .I showall
 \- list all recognized drives, and the presets that are set for them,
-then exit.
+then exit.  This also checks the drive database regular expressions
+and settings for syntax errors.
 
 The \'\-P showall\' option takes up to two optional arguments to
 match a specific drive type and firmware version. The command:
@@ -990,6 +1547,81 @@ lists all entries matching MODEL, and the command:
   smartctl \-P showall \'MODEL\' \'FIRMWARE\'
 .fi
 lists all entries for this MODEL and a specific FIRMWARE version.
+.TP
+.B \-B [+]FILE, \-\-drivedb=[+]FILE
+[ATA only] Read the drive database from FILE.  The new database replaces
+the built in database by default.  If \'+\' is specified, then the new
+entries prepend the built in entries.
+
+Optional entries are read from the file
+.\" %IF NOT OS Windows
+\fB/usr/local/etc/smart_drivedb.h\fP
+.\" %ENDIF NOT OS Windows
+.\" %IF OS ALL
+ (Windows: \fBEXEDIR/drivedb-add.h\fP)
+.\" %ENDIF OS ALL
+.\" %IF OS Windows
+.\"! \fBEXEDIR/drivedb-add.h\fP.
+.\" %ENDIF OS Windows
+.\" %IF ENABLE_DRIVEDB
+if this option is not specified.
+
+If
+.\" %IF NOT OS Windows
+\fB/usr/local/share/smartmontools/drivedb.h\fP
+.\" %ENDIF NOT OS Windows
+.\" %IF OS ALL
+(Windows: \fBEXEDIR/drivedb.h\fP)
+.\" %ENDIF OS ALL
+.\" %IF OS Windows
+.\"! \fBEXEDIR/drivedb.h\fP
+.\" %ENDIF OS Windows
+is present, the contents of this file is used instead of the built in table.
+
+Run
+.\" %IF NOT OS Windows
+\fB/usr/local/sbin/update-smart-drivedb\fP
+.\" %ENDIF NOT OS Windows
+.\" %IF OS ALL
+(Windows: \fBEXEDIR/update-smart-drivedb.exe\fP)
+.\" %ENDIF OS ALL
+.\" %IF OS Windows
+.\"! \fBEXEDIR/update-smart-drivedb.exe\fP
+.\" %ENDIF OS Windows
+to update this file from the smartmontools SVN repository.
+.\" %ENDIF ENABLE_DRIVEDB
+
+The database files use the same C/C++ syntax that is used to initialize
+the built in database array. C/C++ style comments are allowed.
+Example:
+
+.nf
+  /* Full entry: */
+  {
+    "Model family",    // Info about model family/series.
+    "MODEL1.*REGEX",   // Regular expression to match model of device.
+    "VERSION.*REGEX",  // Regular expression to match firmware version(s).
+    "Some warning",    // Warning message.
+    "\-v 9,minutes"     // String of preset \-v and \-F options.
+  },
+  /* Minimal entry: */
+  {
+    "",                // No model family/series info.
+    "MODEL2.*REGEX",   // Regular expression to match model of device.
+    "",                // All firmware versions.
+    "",                // No warning.
+    ""                 // No options preset.
+  },
+  /* USB ID entry: */
+  {
+    "USB: Device; Bridge", // Info about USB device and bridge name.
+    "0x1234:0xabcd",   // Regular expression to match vendor:product ID.
+    "0x0101",          // Regular expression to match bcdDevice.
+    "",                // Not used.
+    "\-d sat"           // String with device type option.
+  },
+  /* ... */
+.fi
 
 .TP
 .B SMART RUN/ABORT OFFLINE TEST AND SELF\-TEST OPTIONS:
@@ -1007,13 +1639,12 @@ self\-test will either be aborted or will resume automatically.
 The valid arguments to this option are:  
 
 .I offline
-\- runs SMART Immediate Offline Test.  This immediately
+\- [ATA] runs SMART Immediate Offline Test.  This immediately
 starts the test described above.  This command can be given during
 normal system operation.  The effects of this test are visible only in
 that it updates the SMART Attribute values, and if errors are
 found they will appear in the SMART error log, visible with the \'\-l error\'
-option. [In the case of SCSI devices runs the default self test in
-foreground. No entry is placed in the self test log.]
+option.
 
 If the \'\-c\' option to \fBsmartctl\fP shows that the device has the
 "Suspend Offline collection upon new command" capability then you can
@@ -1024,10 +1655,12 @@ most commands will abort the Immediate Offline Test, so you should not
 try to track the progress of the test with \'\-c\', as it will abort
 the test.
 
+.I offline
+\- [SCSI] runs the default self test in foreground. No entry is placed
+in the self test log.
+
 .I short
-\- runs SMART Short Self Test (usually under ten minutes).
-[Note: in the case of SCSI devices,
-this command option runs the "Background short" self\-test.]
+\- [ATA] runs SMART Short Self Test (usually under ten minutes).
 This command can be given during normal system operation (unless run in
 captive mode \- see the \'\-C\' option below).  This is a
 test in a different category than the immediate or automatic offline
@@ -1038,35 +1671,46 @@ the \'\-l selftest\' option.  Note that on some disks the progress of the
 self\-test can be monitored by watching this log during the self\-test; with other disks
 use the \'\-c\' option to monitor progress.
 
+.I short
+\- [SCSI] runs the "Background short" self\-test.
+
 .I long
-\- runs SMART Extended Self Test (tens of minutes).
-[Note: in the case of SCSI devices,
-this command option runs the "Background long" self\-test.]
-This is a
+\- [ATA] runs SMART Extended Self Test (tens of minutes). This is a
 longer and more thorough version of the Short Self Test described
 above.  Note that this command can be given during normal
 system operation (unless run in captive mode \- see the \'\-C\' option below).
 
+.I long
+\- [SCSI] runs the "Background long" self\-test.
+
 .I conveyance
-\- [ATA ONLY] runs a SMART Conveyance Self Test (minutes).  This
+\- [ATA only] runs a SMART Conveyance Self Test (minutes).  This
 self\-test routine is intended to identify damage incurred during
 transporting of the device. This self\-test routine should take on the
 order of minutes to complete.  Note that this command can be given
 during normal system operation (unless run in captive mode \- see the
 \'\-C\' option below).
 
-.I select,N\-M
-\- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] runs a SMART
-Selective Self Test, to test a \fBrange\fP of disk Logical Block
-Addresses (LBAs), rather than the entire disk.  Each range of LBAs
-that is checked is called a "span" and is specified by a starting LBA
-(N) and an ending LBA (M) with N less than or equal to M.  For example
-the command:
+.I select,N\-M, select,N+SIZE
+\- [ATA only] runs a SMART Selective Self Test, to test a \fBrange\fP
+of disk Logical Block Addresses (LBAs), rather than the entire disk.
+Each range of LBAs that is checked is called a "span" and is specified
+by a starting LBA (N) and an ending LBA (M) with N less than or equal
+to M. The range can also be specified as N+SIZE. A span at the end of
+a disk can be specified by N\-\fBmax\fP.
+
+For example the commands:
 .nf
   smartctl \-t select,10\-20 /dev/hda
+  smartctl \-t select,10+11 /dev/hda
+.fi
+both runs a self test on one span consisting of LBAs ten to twenty
+(inclusive). The command:
+.nf
+  smartctl \-t select,100000000\-max /dev/hda
 .fi
-runs a self test on one span consisting of LBAs ten to twenty
-(inclusive). The \'\-t\' option can be given up to five times, to test
+run a self test from LBA 100000000 up to the end of the disk.
+The \'\-t\' option can be given up to five times, to test
 up to five spans.  For example the command:
 .nf
   smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/hda
@@ -1091,14 +1735,59 @@ Logical Block Addresses (LBAs).
 Selective self\-tests can be run during normal system operation (unless
 done in captive mode \- see the \'\-C\' option below).
 
-[Note: this new experimental smartmontools feature is currently only
-available under Linux.  The Linux kernel must be compiled with the
-configuration option CONFIG_IDE_TASKFILE_IO enabled.  Please report
-unusual or incorrect behavior to the smartmontools\-support mailing
-list.]
+The following variants of the selective self\-test command use spans based
+on the ranges from past tests already stored on the disk:
+
+.I select,redo[+SIZE]
+\- [ATA only] redo the last SMART Selective Self Test using the same LBA
+range. The starting LBA is identical to the LBA used by last test, same
+for ending LBA unless a new span size is specified by optional +SIZE
+argument.
+
+For example the commands:
+.nf
+  smartctl \-t select,10\-20 /dev/hda
+  smartctl \-t select,redo /dev/hda
+  smartctl \-t select,redo+20 /dev/hda
+.fi
+have the same effect as:
+.nf
+  smartctl \-t select,10\-20 /dev/hda
+  smartctl \-t select,10\-20 /dev/hda
+  smartctl \-t select,10\-29 /dev/hda
+.fi
+
+.I select,next[+SIZE]
+\- [ATA only] runs a SMART Selective Self Test on the LBA range which
+follows the range of the last test. The starting LBA is set to (ending
+LBA +1) of the last test. A new span size may be specified by the
+optional +SIZE argument.
+
+For example the commands:
+.nf
+  smartctl \-t select,0\-999 /dev/hda
+  smartctl \-t select,next /dev/hda
+  smartctl \-t select,next+2000 /dev/hda
+.fi
+have the same effect as:
+.nf
+  smartctl \-t select,0\-999 /dev/hda
+  smartctl \-t select,1000\-1999 /dev/hda
+  smartctl \-t select,2000\-3999 /dev/hda
+.fi
+
+If the last test ended at the last LBA of the disk, the new range starts
+at LBA 0. The span size of the last span of a disk is adjusted such that
+the total number of spans to check the full disk will not be changed
+by future uses of \'\-t select,next\'.
+
+.I select,cont[+SIZE]
+\- [ATA only] performs a \'redo\' (above) if the self test status reports
+that the last test was aborted by the host. Otherwise it run the \'next\'
+(above) test.
 
 .I afterselect,on
-\- [ATA ONLY] perform an offline read scan after a Selective Self\-test
+\- [ATA only] perform an offline read scan after a Selective Self\-test
 has completed. This option must be used together with one or more of
 the \fIselect,N\-M\fP options above. If the LBAs that have been
 specified in the Selective self\-test pass the test with no errors
@@ -1109,13 +1798,13 @@ timer (see below).  The value of this option is preserved between
 selective self\-tests.
 
 .I afterselect,off
-\- [ATA ONLY] do not read scan the remainder of the disk after a
+\- [ATA only] do not read scan the remainder of the disk after a
 Selective self\-test has completed.  This option must be use together
 with one or more of the \fIselect,N\-M\fP options above.  The value of this
 option is preserved between selective self\-tests.
 
 .I pending,N 
-\- [ATA ONLY] set the pending offline read scan timer to N minutes.
+\- [ATA only] set the pending offline read scan timer to N minutes.
 Here N is an integer in the range from 0 to 65535 inclusive.  If the
 device is powered off during a read scan after a Selective self\-test,
 then resume the test automatically N minutes after power\-up.  This
@@ -1123,33 +1812,108 @@ option must be use together with one or more of the \fIselect,N\-M\fP
 options above. The value of this option is preserved between selective
 self\-tests.
 
+.I vendor,N
+\- [ATA only] issues the ATA command SMART EXECUTE OFF-LINE IMMEDIATE
+with subcommand N in LBA LOW register. The subcommand is specified as
+a hex value in the range 0x00 to 0xff.  Subcommands 0x40-0x7e and
+0x90-0xff are reserved for vendor specific use, see table 61 of
+T13/1699-D Revision 6a (ATA8-ACS).  Note that the subcommands
+0x00-0x04,0x7f,0x81-0x84 are supported by other smartctl options
+(e.g. 0x01: \'\-t short\', 0x7f: \'\-X\', 0x82: \'\-C \-t long\').
+
+\fBWARNING: Only run subcommands documented by the vendor of the
+device.\fP
+
+Example for Intel (X18\-M/X25\-M G2 and 320 Series) SSDs only:
+The subcommand 0x40 (\'\-t vendor,0x40\') clears the timed workload
+related SMART attributes (226, 227, 228).  Note that the raw values of
+these attributes are held at 65535 (0xffff) until the workload timer
+reaches 60 minutes.
+
+.I force
+\- [ATA only] start new self\-test even if another test is already running.
+By default a running self\-test will not be interrupted to begin another
+test.
+
+.I scttempint,N[,p]
+\- is no longer supported, use \'\-l scttempint,N[,p]\' instead, see above.
 .TP
 .B \-C, \-\-captive
-Runs self\-tests in captive mode.  This has no effect with \'\-t
-offline\' or if the \'\-t\' option is not used. [Note: in the case of
-SCSI devices, this command option runs the self\-test in "Foreground"
-mode.]
+[ATA] Runs self\-tests in captive mode.  This has no effect with \'\-t
+offline\' or if the \'\-t\' option is not used.
 
 \fBWARNING: Tests run in captive mode may busy out the drive for the
 length of the test.  Only run captive tests on drives without any
 mounted partitions!\fP
 
+[SCSI] Runs the self\-test in "Foreground" mode.
 .TP
 .B \-X, \-\-abort
 Aborts non\-captive SMART Self Tests.  Note that this
 command will abort the Offline Immediate Test routine only if your
 disk has the "Abort Offline collection upon new command" capability.
 .PP
+.SH ATA, SCSI command sets and SAT
+In the past there has been a clear distinction between storage devices
+that used the ATA and SCSI command sets. This distinction was often
+reflected in their device naming and hardware. Now various SCSI
+transports (e.g. SAS, FC and iSCSI) can interconnect to both SCSI
+disks (e.g. FC and SAS) and ATA disks (especially SATA). USB and
+IEEE 1394 storage devices use the SCSI command set externally but
+almost always contain ATA or SATA disks (or flash). The storage
+subsystems in some operating systems have started to remove the
+distinction between ATA and SCSI in their device naming policies.
+.PP
+99% of operations that an OS performs on a disk involve the SCSI INQUIRY,
+READ CAPACITY, READ and WRITE commands, or their ATA equivalents. Since
+the SCSI commands are slightly more general than their ATA equivalents,
+many OSes are generating SCSI commands (mainly READ and WRITE) and
+letting a lower level translate them to their ATA equivalents as the
+need arises. An important note here is that "lower level" may be in
+external equipment and hence outside the control of an OS.
+.PP
+SCSI to ATA Translation (SAT) is a standard (ANSI INCITS 431-2007) that
+specifies how this translation is done. For the other 1% of operations
+that an OS performs on a disk, SAT provides two options. First is an
+optional ATA PASS-THROUGH SCSI command (there are two variants). The
+second is a translation from the closest SCSI command. Most current
+interest is in the "pass-through" option.
+.PP
+The relevance to smartmontools (and hence smartctl) is that its
+interactions with disks fall solidly into the "1%" category. So even
+if the OS can happily treat (and name) a disk as "SCSI", smartmontools
+needs to detect the native command set and act accordingly.
+As more storage manufacturers (including external SATA drives) comply
+with SAT, smartmontools is able to automatically distinguish the native
+command set of the device. In some cases the '\-d sat' option is needed
+on the command line.
+.PP
+There are also virtual disks which typically have no useful information
+to convey to smartmontools, but could conceivably in the future. An
+example of a virtual disk is the OS's view of a RAID 1 box. There are
+most likely two SATA disks inside a RAID 1 box. Addressing those SATA
+disks from a distant OS is a challenge for smartmontools. Another
+approach is running a tool like smartmontools inside the RAID 1 box (e.g.
+a Network Attached Storage (NAS) box) and fetching the logs via a
+browser. 
+.PP
 .SH EXAMPLES
 .nf
 .B smartctl \-a /dev/hda
 .fi
-Print all SMART information for drive /dev/hda (Primary Master).
+Print a large amount of SMART information for drive /dev/hda which is
+typically an ATA (IDE) or SATA disk in Linux.
+.PP
+.nf
+.B smartctl \-a /dev/sdb
+.fi
+Print a large amount of SMART information for drive /dev/sdb . This may
+be a SCSI disk or an ATA (SATA) disk.
 .PP
 .nf
 .B smartctl \-s off /dev/hdd
 .fi
-Disable SMART on drive /dev/hdd (Secondary Slave).
+Disable SMART monitoring and data log collection on drive /dev/hdd .
 .PP
 .nf
 .B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/hda
@@ -1212,8 +1976,14 @@ RAID 6000/7000/8000 controller card.
 .nf
 .B smartctl \-a \-d 3ware,0 /dev/twa0
 .fi
-Examine all SMART data for the first ATA disk connected to a 3ware
-RAID 9000 controller card.
+Examine all SMART data for the first ATA disk connected to a
+3ware RAID 9000 controller card.
+.PP
+.nf
+.B smartctl \-a \-d 3ware,0 /dev/twl0
+.fi
+Examine all SMART data for the first SATA (not SAS) disk connected to a
+3ware RAID 9750 controller card.
 .PP
 .nf
 .B smartctl \-t short \-d 3ware,3 /dev/sdb
@@ -1222,14 +1992,22 @@ Start a short self\-test on the fourth ATA disk connected to the 3ware RAID
 controller card which is the second SCSI device /dev/sdb.
 .PP
 .nf
-.B smartctl \-a \-d hpt,1/3 /dev/sda
+.B smartctl \-t long \-d areca,4 /dev/sg2
+.fi
+Start a long self\-test on the fourth SATA disk connected to an Areca RAID
+controller addressed by /dev/sg2.
+.PP
+.nf
+.B smartctl \-a \-d hpt,1/3 /dev/sda    (under Linux)
+.B smartctl \-a \-d hpt,1/3 /dev/hptrr    (under FreeBSD)
 .fi
 Examine all SMART data for the (S)ATA disk directly connected to the third channel of the
 first HighPoint RocketRAID controller card.
 .nf
 .PP
 .nf
-.B smartctl \-t short \-d hpt,1/1/2 /dev/sda
+.B smartctl \-t short \-d hpt,1/1/2 /dev/sda    (under Linux)
+.B smartctl \-t short \-d hpt,1/1/2 /dev/hptrr    (under FreeBSD)
 .fi
 Start a short self\-test on the (S)ATA disk connected to second pmport on the
 first channel of the first HighPoint RocketRAID controller card.
@@ -1242,6 +2020,12 @@ these LBAs have been tested, read\-scan the remainder of the disk.  If the disk
 power\-cycled during the read\-scan, resume the scan 45 minutes after power to the
 device is restored.
 .PP
+.nf
+.B smartctl \-a \-d cciss,0 /dev/cciss/c0d0
+.fi
+Examine all SMART data for the first SCSI disk connected to a cciss
+RAID controller card.
+.PP
 .SH RETURN VALUES
 The return values of \fBsmartctl\fP are defined by a bitmask.  If all
 is well with the disk, the return value (exit status) of
@@ -1255,17 +2039,18 @@ may also be returned for SCSI disks.
 Command line did not parse.
 .TP
 .B Bit 1:
-Device open failed, or device did not return an IDENTIFY DEVICE structure. 
+Device open failed, device did not return an IDENTIFY DEVICE structure,
+or device is in a low-power mode (see \'\-n\' option above).
 .TP
 .B Bit 2:
-Some SMART command to the disk failed, or there was a checksum error
-in a SMART data structure (see \'\-b\' option above).
+Some SMART or other ATA command to the disk failed, or there was a checksum
+error in a SMART data structure (see \'\-b\' option above).
 .TP
 .B Bit 3:
 SMART status check returned "DISK FAILING".
 .TP
 .B Bit 4:
-SMART status check returned "DISK OK" but we found prefail Attributes <= threshold.
+We found prefail Attributes <= threshold.
 .TP
 .B Bit 5:
 SMART status check returned "DISK OK" but we found that some (usage
@@ -1277,7 +2062,9 @@ The device error log contains records of errors.
 .TP
 .B Bit 7:
 The device self\-test log contains records of errors.
-
+[ATA only] Failed self-tests outdated by a newer successful extended
+self\-test are ignored.
+.PP
 To test within the shell for whether or not the different bits are
 turned on or off, you can use the following type of construction (this
 is bash syntax):
@@ -1290,6 +2077,14 @@ This looks at only at bit 3 of the exit status
 $smartstat will be nonzero if SMART status check returned "disk
 failing" and zero otherwise.
 
+This bash script prints all status bits:
+.nf
+status=$?
+for ((i=0; i<8; i++)); do
+  echo "Bit $i: $((status & 2**i && 1))"
+done
+.fi
+
 .PP
 .SH NOTES
 The TapeAlert log page flags are cleared for the initiator when the
@@ -1302,23 +2097,26 @@ condition.
 \fBBruce Allen\fP smartmontools\-support@lists.sourceforge.net
 .fi
 University of Wisconsin \- Milwaukee Physics Department
+
 .PP
 .SH CONTRIBUTORS
 The following have made large contributions to smartmontools:
 .nf
 \fBCasper Dik\fP (Solaris SCSI interface)
-\fBChristian Franke\fP (Windows interface and Cygwin package)
+\fBChristian Franke\fP (Windows interface, C++ redesign, USB support, ...)
 \fBDouglas Gilbert\fP (SCSI subsystem)
 \fBGuido Guenther\fP (Autoconf/Automake packaging)
 \fBGeoffrey Keating\fP (Darwin ATA interface)
 \fBEduard Martinescu\fP (FreeBSD interface)
-\fBFr\*'ed\*'eric L. W. Meunier\fP (Web site and Mailing list)
+\fBFr\['e]d\['e]ric L. W. Meunier\fP (Web site and Mailing list)
+\fBGabriele Pohl\fP (Web site and Wiki, conversion from CVS to SVN)
 \fBKeiji Sawada\fP (Solaris ATA interface)
+\fBManfred Schwarb\fP (Drive database)
 \fBSergey Svishchev\fP (NetBSD interface)
 \fBDavid Snyder and Sergey Svishchev\fP (OpenBSD interface)
 \fBPhil Williams\fP (User interface and drive database)
 \fBYuri Dario\fP (OS/2, eComStation interface)
+\fBShengfeng Zhou\fP (Linux/FreeBSD HighPoint RocketRAID interface)
 .fi
 Many other individuals have made smaller contributions and corrections.
 
@@ -1346,30 +2144,24 @@ REFERENCES FOR SMART
 .fi
 An introductory article about smartmontools is \fIMonitoring Hard
 Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
-pages 74-77. This is \fBhttp://www.linuxjournal.com/article.php?sid=6983\fP
+pages 74\-77. This is \fBhttp://www.linuxjournal.com/article/6983\fP
 online.
 
 If you would like to understand better how SMART works, and what it
 does, a good place to start is with Sections 4.8 and 6.54 of the first
-volume of the \'AT Attachment with Packet Interface-7\' (ATA/ATAPI-7)
-specification.  This documents the SMART functionality which the
-\fBsmartmontools\fP utilities provide access to.  You can find
-Revision 4b of this document at
-\fBhttp://www.t13.org/docs2004/d1532v1r4b-ATA-ATAPI-7.pdf\fP .
-Earlier and later versions of this Specification are available from
-the T13 web site \fBhttp://www.t13.org/\fP .
+volume of the \'AT Attachment with Packet Interface\-7\' (ATA/ATAPI\-7)
+specification Revision 4b.  This documents the SMART functionality which the
+\fBsmartmontools\fP utilities provide access to.
 
 .fi
 The functioning of SMART was originally defined by the SFF\-8035i
 revision 2 and the SFF\-8055i revision 1.4 specifications.  These are
-publications of the Small Form Factors (SFF) Committee.  Links to
-these documents may be found in the References section of the
-\fBsmartmontools\fP home page at
-\fBhttp://smartmontools.sourceforge.net/\fP .
+publications of the Small Form Factors (SFF) Committee.
+
+Links to these and other documents may be found on the Links page of the
+\fBsmartmontools\fP Wiki at
+\fBhttp://sourceforge.net/apps/trac/smartmontools/wiki/Links\fP .
 
 .SH
-CVS ID OF THIS PAGE:
-$Id: smartctl.8.in,v 1.86 2006/09/27 21:42:03 chrfranke Exp $
-.\" Local Variables:            
-.\" mode: nroff         
-.\" End:
+SVN ID OF THIS PAGE:
+$Id: smartctl.8.in 3530 2012-03-27 19:54:06Z chrfranke $