]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - smartctl.8.in
Closes #831504
[mirror_smartmontools-debian.git] / smartctl.8.in
index e7a2dcea1e49331fde9551e23310518c5e85ebbc..943b6221d7b045730947d156903af031a0285a34 100644 (file)
@@ -1,8 +1,8 @@
 .ig
-Copyright (C) 2002-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
-Copyright (C) 2004-13 Christian Franke <smartmontools-support@lists.sourceforge.net>
+Copyright (C) 2002-10 Bruce Allen
+Copyright (C) 2004-16 Christian Franke
 
-$Id: smartctl.8.in 3832 2013-07-20 14:49:31Z chrfranke $
+$Id: smartctl.8.in 4311 2016-04-27 21:03:01Z 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
@@ -18,21 +18,13 @@ Research Center), Jack Baskin School of Engineering, University of
 California, Santa Cruz. http://ssrc.soe.ucsc.edu/
 
 ..
-.TH SMARTCTL 8 CURRENT_SVN_DATE CURRENT_SVN_VERSION CURRENT_SVN_DATE
+.TH SMARTCTL 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
 .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_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.
@@ -47,7 +39,7 @@ and predict drive failures, and to carry out different types of drive
 self-tests.
 \fBsmartctl\fP also supports some features not related to SMART.
 This version of \fBsmartctl\fP is compatible with
-ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
+ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
 (see \fBREFERENCES\fP below).
 
 \fBsmartctl\fP also provides support for polling TapeAlert messages
@@ -60,11 +52,9 @@ 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
+Use the forms \fB"/dev/sd[a\-z]"\fP for ATA/SATA and SCSI/SAS devices.
+For SCSI Tape Drives and Changers with TapeAlert support use the
+devices \fB"/dev/nst*"\fP and \fB"/dev/sg*"\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
@@ -79,6 +69,8 @@ the hpahcisr and hpsa drivers, the device nodes you need are \fB"/dev/sg[0\-9]*"
 ("lsscsi \-g" is helpful in determining which scsi generic device node corresponds
 to which device.)  Use the nodes corresponding to the RAID controllers,
 not the nodes corresponding to logical drives.  See the \fB\-d\fP option below, as well.
+Use the forms \fB"/dev/nvme[0\-9]"\fP (broadcast namespace) or
+\fB"/dev/nvme[0\-9]n[1\-9]"\fP (specific namespace 1\-9) for NVMe devices.
 .\" %ENDIF OS Linux
 .\" %IF OS Darwin
 .IP \fBDARWIN\fP: 9
@@ -140,8 +132,15 @@ For disks behind an Intel ICHxR controller with RST driver use
 \fB"/dev/csmi[0\-9],N"\fP where N specifies the port behind the logical
 scsi controller "\\\\.\\Scsi[0\-9]:".
 
-[NEW EXPERIMENTAL SMARTCTL FEATURE] For SATA or SAS disks behind an Areca
-controller use \fB"/dev/arcmsr[0\-9]"\fP, see \'\-d areca,N[/E]\' below.
+For SATA or SAS disks behind an Areca controller use
+\fB"/dev/arcmsr[0\-9]"\fP, see \'\-d areca,N[/E]\' below.
+
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+Use the forms \fB"/dev/nvme[0\-9]"\fP (broadcast namespace) or
+\fB"/dev/nvme[0\-9]n[1\-9]"\fP (specific namespace 1\-9) for first,
+second, ..., NVMe device.
+Alternatively use the forms \fB"/dev/nvmes[0\-9][n[1\-9]]"\fP for NVMe devices
+behind the logical scsi controller "\\\\.\\Scsi[0\-9]:".
 
 The prefix \fB"/dev/"\fP is optional.
 .\" %ENDIF OS Windows Cygwin
@@ -164,9 +163,7 @@ values in base 10 (decimal), but some values are displayed in base 16
 displayed with a leading \fB"0x"\fP, for example: "0xff". This man
 page follows the same convention.
 
-.PP
 .SH OPTIONS
-.PP
 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.
@@ -193,10 +190,16 @@ than the potential maximum drive capacity.)  Indicates if the drive is
 in the smartmontools database (see \'\-v\' options below).  If so, the
 drive model family may also be printed. If \'\-n\' (see below) is
 specified, the power mode of the drive is printed.
+.\" %IF OS FreeBSD Linux Windows Cygwin
+
+[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+For NVMe devices the information is obtained from the Identify Controller
+and the Identify Namespace data structure.
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 .TP
 .B \-\-identify[=[w][nvb]]
-[ATA only] [NEW EXPERIMENTAL SMARTCTL FEATURE] Prints an annotated
-table of the IDENTIFY DEVICE data.
+[ATA only] Prints an annotated table of the IDENTIFY DEVICE data.
 By default, only valid words (words not equal to 0x0000 or 0xffff)
 and nonzero bits and bit fields are printed.
 This can be changed by the optional argument which consists of one or
@@ -219,6 +222,12 @@ and for SCSI, this is equivalent to
 .nf
 \'\-H \-i \-A \-l error \-l selftest\'.
 .fi
+.\" %IF OS FreeBSD Linux Windows Cygwin
+For NVMe, this is equivalent to
+.nf
+\'\-H \-i \-c \-A \-l error'.
+.fi
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 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
@@ -233,6 +242,12 @@ and for SCSI, this is equivalent to
 .nf
 \'\-H \-i \-A \-l error \-l selftest \-l background \-l sasphy\'.
 .fi
+.\" %IF OS FreeBSD Linux Windows Cygwin
+For NVMe, this is equivalent to
+.nf
+\'\-H \-i \-c \-A \-l error'.
+.fi
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 .TP
 .B \-\-scan
 Scans for devices and prints each device name, device type and protocol
@@ -252,6 +267,10 @@ For example:
 .nf
 smartctl \-\-scan\-open \-\- \-a \-W 4,45,50 \-m admin@work > smartd.conf
 .fi
+
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+Multiple \'\-d TYPE\' options may be specified with \'\-\-scan[\-open]\'
+to combine the scan results of more than one TYPE.
 .TP
 .B \-g NAME, \-\-get=NAME
 Get non-SMART device settings.  See \'\-s, \-\-set\' below for further info.
@@ -274,7 +293,7 @@ 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).
+use the exit status of \fBsmartctl\fP (see EXIT STATUS below).
 
 .I noserial
 \- Do not print the serial number of the device.
@@ -305,6 +324,19 @@ from issuing SCSI commands to an ATA device.
 \fBsmartctl\fP
 from issuing ATA commands to a SCSI device.
 
+.\" %ENDIF NOT OS Darwin
+.\" %IF OS FreeBSD Linux Windows Cygwin
+.I nvme[,NSID]
+\- [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+the device type is NVM Express (NVMe).
+The optional parameter NSID specifies the namespace id (in hex) passed
+to the driver.
+Use 0xffffffff for the broadcast namespace id.
+The default for NSID is the namespace id addressed by the device name.
+
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
+.\" %IF NOT OS Darwin
 .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
@@ -339,13 +371,17 @@ 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.
 
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
 The Prolific PL2507/3507 USB bridges with older firmware support a pass-through
 command similar to JMicron and work with \'\-d usbjmicron,0\'.
 Newer Prolific firmware requires a modified command which can be selected by
 \'\-d usbjmicron,p\'.
 Note that this does not yet support the SMART status command.
 
+.I usbprolific
+\- [NEW EXPERIMENTAL SMARTCTL FEATURE]
+this device type is for SATA disks that are behind a Prolific PL2571/2771/2773/2775
+USB to SATA bridge.
+
 .I usbsunplus
 \- this device type is for SATA disks that are behind a SunplusIT USB to SATA
 bridge.
@@ -375,12 +411,37 @@ It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus
 number.
 
 The following entry in /proc/devices must exist:
-.fi
+.br
 For PERC2/3/4 controllers: \fBmegadevN\fP
-.fi
+.br
 For PERC5/6 controllers: \fBmegaraid_sas_ioctlN\fP
 
 .\" %ENDIF OS Linux
+.\" %IF OS Linux Windows Cygwin
+.I aacraid,H,L,ID
+\- [Linux, Windows and Cygwin only] [NEW EXPERIMENTAL SMARTCTL FEATURE]
+the device consists of one or more SCSI/SAS disks connected to an AacRaid controller.
+The non-negative integers H,L,ID (Host number, Lun, ID) denote which disk
+on the controller is monitored.
+Use syntax such as:
+.nf
+\fBsmartctl \-a \-d aacraid,0,0,2 /dev/sda\fP
+.fi
+.nf
+\fBsmartctl \-a \-d aacraid,1,0,4 /dev/sdb\fP
+.fi
+
+.\" %ENDIF OS Linux Windows Cygwin
+.\" %IF OS Linux
+On Linux, the following entry in /proc/devices must exist: \fBaac\fP.
+Character device nodes /dev/aacH (H=Host number) are created if required.
+
+.\" %ENDIF OS Linux
+.\" %IF OS Windows Cygwin
+On Windows, the device name parameter /dev/sdX is ignored if \'-d aacraid\'
+is specified.
+
+.\" %ENDIF OS Windows Cygwin
 .\" %IF OS FreeBSD Linux
 .I 3ware,N
 \- [FreeBSD and Linux only] the device consists of one or more ATA disks
@@ -486,7 +547,7 @@ On FreeBSD use syntax such as:
 .fi
 .\" %ENDIF OS FreeBSD
 .\" %IF OS Windows Cygwin
-[NEW EXPERIMENTAL SMARTCTL FEATURE] On Windows and Cygwin use syntax such as:
+On Windows and Cygwin use syntax such as:
 .nf
 \fBsmartctl \-a \-d areca,2 /dev/arcmsr0\fP
 .fi
@@ -517,8 +578,8 @@ later.  Lower-numbered firmware versions will give (harmless) SCSI
 error messages and no SMART information.
 
 .I areca,N/E
-\- [FreeBSD, Linux, Windows and Cygwin only] [NEW EXPERIMENTAL SMARTCTL FEATURE] the
-device consists of one or more SATA or SAS disks connected to an Areca SAS RAID controller.
+\- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one
+or more SATA or SAS disks connected to an Areca SAS RAID controller.
 The integer N (range 1 to 128) denotes the channel (slot) and E (range
 1 to 8) denotes the enclosure.
 Important: This requires Areca SAS controller firmware version 1.51 or later.
@@ -661,6 +722,13 @@ shows the SCSI commands in hex and the corresponding status. Invoking
 it a second time adds a hex listing of the first 64 bytes of data send to, 
 or received from the device.
 
+.\" %IF OS FreeBSD Linux Windows Cygwin
+.I nvmeioctl
+\- [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+report only ioctl() transactions with NVMe devices.
+
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 Any argument may include a positive integer to specify the level of detail
 that should be reported.  The argument should be followed by a comma then
 the integer with no spaces.  For example, 
@@ -680,7 +748,7 @@ behaviour. This is does not work for SCSI devices yet.
 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).
+specified low-power modes (see EXIT STATUS 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
@@ -736,11 +804,7 @@ Note that the SMART automatic offline test command is listed as
 "Obsolete" in every version of the ATA and ATA/ATAPI Specifications.
 It was originally part of the SFF-8035i Revision 2.0 specification,
 but was never part of any ATA specification.  However it is
-implemented and used by many vendors. [Good documentation can be found
-in IBM\'s Official Published Disk Specifications.  For example the IBM
-Travelstar 40GNX Hard Disk Drive Specifications (Revision 1.1, 22
-April 2002, Publication # 1541, Document S07N-7715-02) page 164. You
-can also read the SFF-8035i Specification -- see REFERENCES below.]
+implemented and used by many vendors.
 You can tell if automatic offline testing is supported by seeing if
 this command enables and disables it, as indicated by the \'Auto
 Offline Data Collection\' part of the SMART capabilities report
@@ -880,13 +944,11 @@ the drive.  The setting of the standby timer is not affected.
 The write cache is usually enabled by default.
 
 .I wcache[,on|off]
-\- [SCSI] [NEW EXPERIMENTAL SMARTCTL FEATURE]
-Gets/sets the \'Write Cache Enable\' (WCE) bit (if supported).
+\- [SCSI] Gets/sets the \'Write Cache Enable\' (WCE) bit (if supported).
 The write cache is usually enabled by default.
 
 .I wcreorder[,on|off]
-\- [ATA only] [NEW EXPERIMENTAL SMARTCTL FEATURE]
-Gets/sets Write Cache Reordering.
+\- [ATA only] Gets/sets Write Cache Reordering.
 If it is disabled (off), disk write scheduling is executed on a 
 first-in-first-out (FIFO) basis. If Write Cache Reordering is enabled (on),
 then disk write scheduling may be reordered by the drive. If write cache is
@@ -896,21 +958,15 @@ The state of Write Cache Reordering has no effect on either NCQ or LCQ queued
 commands.
 
 .I rcache[,on|off]
-\- [SCSI only] [NEW EXPERIMENTAL SMARTCTL FEATURE]
-Gets/sets the \'Read Cache Disable\' (RCE) bit. \'Off\' value disables read cache
-(if supported).
+\- [SCSI only] Gets/sets the \'Read Cache Disable\' (RCE) bit.
+\'Off\' value disables read cache (if supported).
 The read cache is usually enabled by default.
 
 .TP
 .B SMART READ AND DISPLAY DATA OPTIONS:
 .TP
 .B \-H, \-\-health
-Check: Ask the device to report its SMART health status or pending
-TapeAlert messages.  SMART status is based on
-information that it has gathered from online and offline
-tests, which were used to determine/update its
-SMART vendor-specific Attribute values. TapeAlert status is obtained
-by reading the TapeAlert log page.
+Prints the health status of the device or pending TapeAlert messages.
 
 If the device reports failing health status, this means
 .B either
@@ -919,9 +975,36 @@ that the device has already failed,
 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 to someplace safe as soon as you can.
+
+[ATA] Health status is obtained by checking the (boolean) result returned
+by the SMART RETURN STATUS command.
+The return value of this ATA command may be unknown due to limitations or
+bugs in some layer (e.g. RAID controller or USB bridge firmware) between
+disk and operating system.
+In this case, \fBsmartctl\fP prints a warning and checks whether any
+Prefailure SMART Attribute value is less than or equal to its threshold
+(see \'\-A\' below).
+
+[SCSI] Health status is obtained by checking the Additional Sense Code
+(ASC) and Additional Sense Code Qualifier (ASCQ) from Informal Exceptions
+(IE) log page (if supported) and/or from SCSI sense data.
+
+[SCSI tape drive or changer] TapeAlert status is obtained by reading the
+TapeAlert log page.
+Please note that the TapeAlert log page flags are cleared for the initiator
+when the page is read.
+This means that each alert condition is reported only once by \fBsmartctl\fP
+for each initiator for each activation of the condition.
+.\" %IF OS FreeBSD Linux Windows Cygwin
+
+[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+NVMe status is obtained by reading the "Critical Warning" byte from
+the SMART/Health Information log.
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 .TP
 .B \-c, \-\-capabilities
-[ATA only] Prints only the generic SMART capabilities.  These
+[ATA] 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
@@ -936,6 +1019,13 @@ then the time may jump to a larger value and then count down as the
 Immediate Offline Test is carried out.  Please see REFERENCES below
 for further information about the the flags and capabilities described
 by this option.
+.\" %IF OS FreeBSD Linux Windows Cygwin
+
+[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+Prints various NVMe device capabilities obtained from the Identify Controller
+and the Identify Namespace data structure.
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 .TP
 .B \-A, \-\-attributes
 [ATA] Prints only the vendor specific SMART Attributes.  The Attributes
@@ -1028,6 +1118,13 @@ the drive is already in the smartmontools drive database.
 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).
+.\" %IF OS FreeBSD Linux Windows Cygwin
+
+[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+For NVMe devices the attributes are obtained from the SMART/Health
+Information log.
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 .TP
 .B \-f FORMAT, \-\-format=FORMAT
 [ATA only] Selects the output format of the attributes:
@@ -1098,13 +1195,12 @@ specification.  Some commands are not defined in any version of the
 ATA specification but are in common use nonetheless; these are marked
 \fB[NS]\fP, meaning non-standard.
 
-The ATA Specification (ATA-5 Revision 1c, Section 8.41.6.8.2) says:
-\fB"Error log structures shall include UNC errors, IDNF errors for
-which the address requested was valid, servo errors, write fault
-errors, etc.  Error log data structures shall not include errors
-attributed to the receipt of faulty commands such as command codes not
-implemented by the device or requests with invalid parameters or
-invalid addresses."\fP The definitions of these terms are:
+The ATA Specification (ATA ACS-2 Revision 7, Section A.7.1) says:
+\fB"Error log data structures shall include, but are not limited to,
+Uncorrectable errors, ID Not Found errors for which the LBA requested was
+valid, servo errors, and write fault errors.  Error log data structures
+shall not include errors attributed to the receipt of faulty commands."\fP
+The definitions of these terms are:
 .br
 \fBUNC\fP (\fBUNC\fPorrectable): data is uncorrectable.  This refers
 to data which has been read from the disk, but for which the Error
@@ -1135,6 +1231,17 @@ receives a command which is not implemented or is not valid.
 \- [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.
 
+.\" %IF OS FreeBSD Linux Windows Cygwin
+.I error[,NUM]
+\- [NVMe] [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+prints the NVMe Error Information log.
+Only the 16 most recent log entries are printed by default.
+This number can be changed by the optional parameter NUM.
+The maximum number of log entries is vendor specific
+(in the range from 1 to 256 inclusive).
+
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 .I xerror[,NUM][,error]
 \- [ATA only] prints the Extended Comprehensive SMART error log
 (General Purpose Log address 0x03).  Unlike the Summary SMART error
@@ -1142,8 +1249,7 @@ 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).
+specific.
 
 Only the 8 most recent error log entries are printed by default.
 This number can be changed by the optional parameter NUM.
@@ -1197,7 +1303,7 @@ test terminology).
 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).
+is vendor specific.
 
 Only the 25 most recent log entries are printed by default. This number
 can be changed by the optional parameter NUM.
@@ -1270,7 +1376,7 @@ 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
+Digital), CCTL (as used by Samsung and Hitachi/HGST) 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
@@ -1281,9 +1387,7 @@ typically set to 70,70 deciseconds.
 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 ACS-2 and is only supported by some recent devices
-(e.g. Hitachi 7K3000, Intel 320, 330, 520 and 710 Series SSDs, Crucial/Micron
-m4 SSDs).
+introduced in ACS-2 and is only supported by some recent devices.
 
 .I sataphy[,reset]
 \- [SATA only] prints values and descriptions of the SATA Phy Event
@@ -1325,6 +1429,18 @@ This command:
 writes a binary representation of the one sector log 0x11
 (SATA Phy Event Counters) to file log.bin.
 
+.\" %IF OS FreeBSD Linux Windows Cygwin
+.I nvmelog,PAGE,SIZE
+\- [NVMe only] [FreeBSD, Linux, Windows and Cygwin only]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+prints a hex dump of the first SIZE bytes from the NVMe log with
+identifier PAGE.
+PAGE is a hexadecimal number in the range from 0x1 to 0xff.
+SIZE is a hexadecimal number in the range from 0x4 to 0x4000 (16 KiB).
+\fBWARNING: Do not specify the identifier of an unknown log page.
+Reading a log page may have undesirable side effects.\fP
+
+.\" %ENDIF OS FreeBSD Linux Windows Cygwin
 .I ssd
 \- [ATA] prints the Solid State Device Statistics log page.
 This has the same effect as \'\-l devstat,7\', see above.
@@ -1525,10 +1641,6 @@ is not reset if uncorrectable sectors are reallocated
 .I 220,temp
 \- same as:
 .I 220,tempminmax,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
 .TP
 .B \-F TYPE, \-\-firmwarebug=TYPE
 [ATA only] Modifies the behavior of \fBsmartctl\fP to compensate for some
@@ -1538,7 +1650,7 @@ multiple times.  The valid arguments are:
 .I none
 \- Assume that the device firmware obeys the ATA specifications.  This
 is the default, unless the device has presets for \'\-F\' in the
-drive database.  Using this option on the command line will over-ride any
+drive database.  Using this option on the command line will override any
 preset values.
 
 .I nologdir
@@ -1573,7 +1685,7 @@ execution status (see options \'\-c\' or \'\-a\' above) accordingly.
 
 .I xerrorlba
 \- Fixes LBA byte ordering in Extended Comprehensive SMART error log.
-Some disk use little endian byte ordering instead of ATA register
+Some disks use little endian byte ordering instead of ATA register
 ordering to specifiy the LBA addresses in the log entries.
 
 .I swapid
@@ -1585,15 +1697,6 @@ firmware version) returned by some buggy device drivers.
 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
-drives.  For example, the Maxtor 4D080H4 uses Attribute 9 to stores
-power-on time in minutes whereas most drives use that Attribute to
-store the power-on time in hours.  The command-line option \'\-v
-9,minutes\' ensures that \fBsmartctl\fP correctly interprets Attribute
-9 in this case, but that option is preset for the Maxtor 4D080H4 and
-so need not be specified by the user on the \fBsmartctl\fP command
-line.
-
 The argument
 .I show
 will show any preset options for your drive and the argument
@@ -1670,6 +1773,7 @@ If
 .\"! \fBEXEDIR/drivedb.h\fP
 .\" %ENDIF OS Windows
 is present, the contents of this file is used instead of the built in table.
+.\" %IF ENABLE_UPDATE_SMART_DRIVEDB
 
 Run
 .\" %IF NOT OS Windows
@@ -1682,6 +1786,7 @@ Run
 .\"! \fBEXEDIR/update-smart-drivedb.exe\fP
 .\" %ENDIF OS Windows
 to update this file from the smartmontools SVN repository.
+.\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
 .\" %ENDIF ENABLE_DRIVEDB
 
 The database files use the same C/C++ syntax that is used to initialize
@@ -1803,25 +1908,25 @@ 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
+  smartctl \-t select,10\-20 /dev/sda
+  smartctl \-t select,10+11 /dev/sda
 .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
+  smartctl \-t select,100000000\-max /dev/sda
 .fi
 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
+  smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/sda
 .fi
 runs a self test on two spans.  The first span consists of 101 LBAs
 and the second span consists of 1001 LBAs.  Note that the spans can
 overlap partially or completely, for example:
 .nf
-  smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/hda
+  smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/sda
 .fi
 The results of the selective self-test can be obtained (both during
 and after the test) by printing the SMART self-test log, using the
@@ -1848,15 +1953,15 @@ 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
+  smartctl \-t select,10\-20 /dev/sda
+  smartctl \-t select,redo /dev/sda
+  smartctl \-t select,redo+20 /dev/sda
 .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
+  smartctl \-t select,10\-20 /dev/sda
+  smartctl \-t select,10\-20 /dev/sda
+  smartctl \-t select,10\-29 /dev/sda
 .fi
 
 .I select,next[+SIZE]
@@ -1867,15 +1972,15 @@ 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
+  smartctl \-t select,0\-999 /dev/sda
+  smartctl \-t select,next /dev/sda
+  smartctl \-t select,next+2000 /dev/sda
 .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
+  smartctl \-t select,0\-999 /dev/sda
+  smartctl \-t select,1000\-1999 /dev/sda
+  smartctl \-t select,2000\-3999 /dev/sda
 .fi
 
 If the last test ended at the last LBA of the disk, the new range starts
@@ -1926,7 +2031,7 @@ T13/1699-D Revision 6a (ATA8-ACS).  Note that the subcommands
 \fBWARNING: Only run subcommands documented by the vendor of the
 device.\fP
 
-Example for Intel (X18/X25-M G2, 320, 520 and 710 Series) SSDs only:
+Example for some Intel 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
@@ -1951,7 +2056,7 @@ mounted partitions!\fP
 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
@@ -1995,65 +2100,58 @@ 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
+.B smartctl \-a /dev/sda
 .fi
-Print a large amount of SMART information for drive /dev/hda which is
-typically an ATA (IDE) or SATA disk in Linux.
+Print a large amount of SMART information for drive /dev/sda .
 .PP
 .nf
-.B smartctl \-a /dev/sdb
+.B smartctl \-s off /dev/sdd
 .fi
-Print a large amount of SMART information for drive /dev/sdb . This may
-be a SCSI disk or an ATA (SATA) disk.
+Disable SMART monitoring and data log collection on drive /dev/sdd .
 .PP
 .nf
-.B smartctl \-s off /dev/hdd
+.B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/sda
 .fi
-Disable SMART monitoring and data log collection on drive /dev/hdd .
-.PP
-.nf
-.B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/hda
-.fi
-Enable SMART on drive /dev/hda, enable automatic offline
+Enable SMART on drive /dev/sda, enable automatic offline
 testing every four hours, and enable autosaving of
 SMART Attributes.  This is a good start-up line for your system\'s
 init files.  You can issue this command on a running system.
 .PP
 .nf
-.B smartctl \-t long /dev/hdc
+.B smartctl \-t long /dev/sdc
 .fi
-Begin an extended self-test of drive /dev/hdc.  You can issue this
+Begin an extended self-test of drive /dev/sdc.  You can issue this
 command on a running system.  The results can be seen in the self-test
 log visible with the \'\-l selftest\' option after it has completed.
 .PP
 .nf
-.B smartctl \-s on \-t offline /dev/hda
+.B smartctl \-s on \-t offline /dev/sda
 .fi
 Enable SMART on the disk, and begin an immediate offline test of
-drive /dev/hda.  You can issue this command on a running system.  The
+drive /dev/sda.  You can issue this command on a running system.  The
 results are only used to update the SMART Attributes, visible
 with the \'\-A\' option.  If any device errors occur, they are logged to
 the SMART error log, which can be seen with the \'\-l error\' option.
 .PP
 .nf
-.B smartctl \-A \-v 9,minutes /dev/hda
+.B smartctl \-A \-v 9,minutes /dev/sda
 .fi
 Shows the vendor Attributes, when the disk stores its power-on time
 internally in minutes rather than hours.
 .PP
 .nf
-.B smartctl \-q errorsonly \-H \-l selftest /dev/hda
+.B smartctl \-q errorsonly \-H \-l selftest /dev/sda
 .fi
 Produces output only if the device returns failing SMART status,
 or if some of the logged self-tests ended with errors.
 .PP
 .nf
-.B smartctl \-q silent \-a /dev/hda
+.B smartctl \-q silent \-a /dev/sda
 .fi
-Examine all SMART data for device /dev/hda, but produce no
+Examine all SMART data for device /dev/sda, but produce no
 printed output.  You must use the exit status (the
 .B $?
 shell variable) to learn if any Attributes are out of bound, if the
@@ -2112,7 +2210,7 @@ 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.
 .PP
 .nf
-.B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/hda
+.B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/sda
 .fi
 Run a selective self-test on LBAs 10 to 100 and 30 to 300.  After the
 these LBAs have been tested, read-scan the remainder of the disk.  If the disk is
@@ -2124,14 +2222,14 @@ device is restored.
 .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
+
+.SH EXIT STATUS
+The exit statuses of \fBsmartctl\fP are defined by a bitmask.
+If all is well with the disk, the exit status (return value) of
 \fBsmartctl\fP is 0 (all bits turned off).  If a problem occurs, or an
 error, potential error, or fault is detected, then a non-zero status
-is returned.  In this case, the eight different bits in the return
-value have the following meanings for ATA disks; some of these values
+is returned.  In this case, the eight different bits in the exit status
+have the following meanings for ATA disks; some of these values
 may also be returned for SCSI disks.
 .TP
 .B Bit 0:
@@ -2165,8 +2263,8 @@ The device self-test log contains records of errors.
 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):
+turned on or off, you can use the following type of construction
+(which should work with any POSIX compatible shell):
 .nf
 .B smartstat=$(($? & 8))
 .fi
@@ -2175,76 +2273,70 @@ This looks at only at bit 3 of the exit status
 (since 8=2^3).  The shell variable
 $smartstat will be nonzero if SMART status check returned "disk
 failing" and zero otherwise.
-
-This bash script prints all status bits:
+.PP
+This shell script prints all status bits:
 .nf
-status=$?
-for ((i=0; i<8; i++)); do
-  echo "Bit $i: $((status & 2**i && 1))"
+val=$?; mask=1
+for i in 0 1 2 3 4 5 6 7; do
+  echo "Bit $i: $(((val & mask) && 1))"
+  mask=$((mask << 1))
 done
 .fi
 
-.PP
-.SH NOTES
-The TapeAlert log page flags are cleared for the initiator when the
-page is read. This means that each alert condition is reported only
-once by \fBsmartctl\fP for each initiator for each activation of the
-condition.
+.\" %IF NOT OS Windows
+.SH FILES
+.TP
+.B /usr/local/sbin/smartctl
+full path of this executable.
+.\" %IF ENABLE_DRIVEDB
+.TP
+.B /usr/local/share/smartmontools/drivedb.h
+drive database (see \'\-B\' option).
+.\" %ENDIF ENABLE_DRIVEDB
+.TP
+.B /usr/local/etc/smart_drivedb.h
+optional local drive database (see \'\-B\' option).
 
-.PP
+.\" %ENDIF NOT OS Windows
 .SH AUTHORS
-\fBBruce Allen\fP
+\fBBruce Allen\fP (project initiator),
 .br
-University of Wisconsin \- Milwaukee Physics Department
+\fBChristian Franke\fP (project manager, Windows port and all sort of things),
 .br
-\fBChristian Franke\fP (Windows interface, C++ redesign, most enhancements
-since 2009)
+\fBDouglas Gilbert\fP (SCSI subsystem),
 .br
-\fBsmartmontools\-support@lists.sourceforge.net\fP
+\fBVolker Kuhlmann\fP (moderator of support and database mailing list),
+.br
+\fBGabriele Pohl\fP (wiki & development team support),
+.br
+\fBAlex Samorukov\fP (FreeBSD port and more, new Trac wiki).
 
-.PP
-.SH CONTRIBUTORS
-The following have made large contributions to smartmontools:
-.nf
-\fBCasper Dik\fP (Solaris SCSI interface)
-\fBDouglas Gilbert\fP (SCSI subsystem)
-\fBGuido Guenther\fP (Autoconf/Automake packaging)
-\fBGeoffrey Keating\fP (Darwin ATA interface)
-\fBEduard Martinescu\fP (FreeBSD interface)
-\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.
+Many other individuals have made contributions and corrections,
+see AUTHORS, ChangeLog and repository files.
+
+The first smartmontools code was derived from the smartsuite package,
+written by Michael Cornwell and Andre Hedrick.
+
+.SH REPORTING BUGS
+To submit a bug report, create a ticket in smartmontools wiki:
+.br
+<\fBhttp://www.smartmontools.org/\fP>.
+.br
+Alternatively send the info to the smartmontools support mailing list:
+.br
+<\fBhttps://lists.sourceforge.net/lists/listinfo/smartmontools-support\fB>.
+
+.SH SEE ALSO
+\fBsmartd\fP(8).
+.\" %IF ENABLE_UPDATE_SMART_DRIVEDB
+.br
+\fBupdate-smart-drivedb\fP(8).
+.\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
+
+.SH REFERENCES
+Please see the following web site for more info:
+\fBhttp://www.smartmontools.org/\fP
 
-.PP
-.SH CREDITS
-.fi
-This code was derived from the smartsuite package, written by Michael
-Cornwell, and from the previous UCSC smartsuite package.  It extends
-these to cover ATA-5 disks.  This code was originally developed as a
-Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
-(now part of the Storage Systems Research Center), Jack Baskin School
-of Engineering, University of California, Santa
-Cruz. \fBhttp://ssrc.soe.ucsc.edu/\fP .
-.SH
-HOME PAGE FOR SMARTMONTOOLS: 
-.fi
-Please see the following web site for updates, further documentation, bug
-reports and patches: \fBhttp://smartmontools.sourceforge.net/\fP
-
-.SH
-SEE ALSO:
-\fBsmartd\fP(8), \fBbadblocks\fP(8), \fBide\-smart\fP(8).
-.SH
-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/6983\fP
@@ -2256,15 +2348,14 @@ 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 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 .
+\fBsmartmontools\fP Wiki at \fBhttp://www.smartmontools.org/wiki/Links\fP .
 
-.SH
-SVN ID OF THIS PAGE:
-$Id: smartctl.8.in 3832 2013-07-20 14:49:31Z chrfranke $
+.SH PACKAGE VERSION
+CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
+.br
+$Id: smartctl.8.in 4311 2016-04-27 21:03:01Z chrfranke $