1SMARTCTL(8)                 SMART Monitoring Tools                 SMARTCTL(8)
2
3
4

NAME

6       smartctl - Control and Monitor Utility for SMART Disks
7
8

SYNOPSIS

10       smartctl [options] device
11
12

DESCRIPTION

14       [This man page is generated for the Linux version of smartmontools.  It
15       does not contain info specific to other platforms.]
16
17       smartctl controls the Self-Monitoring, Analysis and Reporting  Technol‐
18       ogy  (SMART)  system  built into most ATA/SATA and SCSI/SAS hard drives
19       and solid-state drives.  The purpose of SMART is to monitor the  relia‐
20       bility  of  the hard drive and predict drive failures, and to carry out
21       different types of drive self-tests.  smartctl also supports some  fea‐
22       tures  not  related  to  SMART.  This version of smartctl is compatible
23       with ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7  and  earlier  standards  (see
24       REFERENCES below).
25
26       smartctl also provides support for polling TapeAlert messages from SCSI
27       tape drives and changers.
28
29       The user must specify the device to be controlled  or  interrogated  as
30       the  final  argument to smartctl. The command set used by the device is
31       often derived from the device path but may  need  help  with  the  ´-d´
32       option (for more information see the section on "ATA, SCSI command sets
33       and SAT" below). Device paths are as follows:
34
35       LINUX:   Use  the  forms  "/dev/sd[a-z]"  for  ATA/SATA  and   SCSI/SAS
36                devices.   For  SCSI  Tape  Drives and Changers with TapeAlert
37                support use the devices "/dev/nst*" and "/dev/sg*".  For disks
38                behind  3ware  controllers  you  may  need  "/dev/sd[a-z]"  or
39                "/dev/twe[0-9]",  "/dev/twa[0-9]"  or   "/dev/twl[0-9]":   see
40                details  below.  For  disks  behind  HighPoint RocketRAID con‐
41                trollers you may need "/dev/sd[a-z]".  For disks behind  Areca
42                SATA  RAID  controllers,  you  need  "/dev/sg[2-9]" (note that
43                smartmontools interacts with the Areca controllers via a  SCSI
44                generic  device  which  is different than the SCSI device used
45                for reading and writing data)!  For HP Smart Array  RAID  con‐
46                trollers,  there are three currently supported drivers: cciss,
47                hpsa, and hpahcisr.  For disks accessed via the  cciss  driver
48                the  device  nodes are of the form "/dev/cciss/c[0-9]d0".  For
49                disks accessed via the hpahcisr and hpsa drivers,  the  device
50                nodes  you  need are "/dev/sg[0-9]*".  ("lsscsi -g" is helpful
51                in determining which scsi generic device node  corresponds  to
52                which  device.)   Use the nodes corresponding to the RAID con‐
53                trollers, not the nodes corresponding to logical drives.   See
54                the  -d option below, as well.  Use the forms "/dev/nvme[0-9]"
55                (broadcast  namespace)  or  "/dev/nvme[0-9]n[1-9]"   (specific
56                namespace 1-9) for NVMe devices.
57
58       if  ´-´  is specified as the device path, smartctl reads and interprets
59       it's own debug output from standard input.  See ´-r ataioctl´ below for
60       details.
61
62       Based  on  the device path, smartctl will guess the device type (ATA or
63       SCSI).  If necessary, the ´-d´ option can  be  used  to  override  this
64       guess
65
66       Note that the printed output of smartctl displays most numerical values
67       in base 10 (decimal), but some values are displayed in base  16  (hexa‐
68       decimal).  To distinguish them, the base 16 values are always displayed
69       with a leading "0x", for example: "0xff". This  man  page  follows  the
70       same convention.
71
72

OPTIONS

74       The  options  are grouped below into several categories.  smartctl will
75       execute  the  corresponding  commands  in   the   order:   INFORMATION,
76       ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
77
78
79       SHOW INFORMATION OPTIONS:
80
81       -h, --help, --usage
82              Prints a usage message to STDOUT and exits.
83
84       -V, --version, --copyright, --license
85              Prints  version,  copyright, license, home page and SVN revision
86              information for your copy of smartctl to STDOUT and then  exits.
87              Please  include  this  information  if you are reporting bugs or
88              problems.
89
90       -i, --info
91              Prints the device model number, serial number, firmware version,
92              and  ATA  Standard  version/revision  information.   Says if the
93              device supports SMART, and if so, whether SMART support is  cur‐
94              rently  enabled  or  disabled.   If  the device supports Logical
95              Block Address mode (LBA mode) print current user drive  capacity
96              in bytes. (If drive is has a user protected area reserved, or is
97              "clipped", this may be smaller than the potential maximum  drive
98              capacity.)  Indicates if the drive is in the smartmontools data‐
99              base (see ´-v´ options below).  If so, the  drive  model  family
100              may also be printed. If ´-n´ (see below) is specified, the power
101              mode of the drive is printed.
102
103              [NVMe] [FreeBSD, Linux, Windows and Cygwin only] [NEW EXPERIMEN‐
104              TAL  SMARTCTL  FEATURE]  For  NVMe  devices  the  information is
105              obtained from the Identify Controller and the Identify Namespace
106              data structure.
107
108       --identify[=[w][nvb]]
109              [ATA  only]  Prints  an  annotated  table of the IDENTIFY DEVICE
110              data.  By default, only valid words (words not equal  to  0x0000
111              or  0xffff)  and  nonzero bits and bit fields are printed.  This
112              can be changed by the optional argument which consists of one or
113              two  characters  from the set ´wnvb´.  The character ´w´ enables
114              printing of all 256 words. The character ´n´ suppresses printing
115              of  bits, ´v´ enables printing of all bits from valid words, ´b´
116              enables printing of all bits.  For example ´--identify=n´ (valid
117              words, no bits) produces the shortest output and ´--identify=wb´
118              (all words, all bits) produces the longest output.
119
120       -a, --all
121              Prints all SMART information about the disk, or TapeAlert infor‐
122              mation about the tape drive or changer.  For ATA devices this is
123              equivalent to
124              ´-H -i -c -A -l error -l selftest -l selective´
125              and for SCSI, this is equivalent to
126              ´-H -i -A -l error -l selftest´.
127              For NVMe, this is equivalent to
128              ´-H -i -c -A -l error'.
129              Note that for ATA disks  this  does  not  enable  the  non-SMART
130              options  and  the SMART options which require support for 48-bit
131              ATA commands.
132
133       -x, --xall
134              Prints all SMART and non-SMART information about the device. For
135              ATA devices this is equivalent to
136              ´-H -i -g all -c -A -f brief -l xerror,error -l xselftest,selftest
137              -l selective -l directory -l scttemp -l scterc -l devstat -l sataphy´.
138              and for SCSI, this is equivalent to
139              ´-H -i -A -l error -l selftest -l background -l sasphy´.
140              For NVMe, this is equivalent to
141              ´-H -i -c -A -l error'.
142
143       --scan Scans  for  devices and prints each device name, device type and
144              protocol ([ATA] or [SCSI]) info.  May  be  used  in  conjunction
145              with  ´-d  TYPE´  to  restrict the scan to a specific TYPE.  See
146              also info about platform specific device scan and the DEVICESCAN
147              directive on smartd(8) man page.
148
149       --scan-open
150              Same as --scan, but also tries to open each device before print‐
151              ing device info.  The device open may change the device type due
152              to autodetection (see also ´-d test´).
153
154              This option can be used to create a draft smartd.conf file.  All
155              options after ´--´ are appended to each output line.  For  exam‐
156              ple:
157              smartctl --scan-open -- -a -W 4,45,50 -m admin@work > smartd.conf
158
159              [NEW  EXPERIMENTAL  SMARTCTL FEATURE] Multiple ´-d TYPE´ options
160              may be  specified  with  ´--scan[-open]´  to  combine  the  scan
161              results of more than one TYPE.
162
163       -g NAME, --get=NAME
164              Get  non-SMART  device settings.  See ´-s, --set´ below for fur‐
165              ther info.
166
167
168       RUN-TIME BEHAVIOR OPTIONS:
169
170       -q TYPE, --quietmode=TYPE
171              Specifies that smartctl should run in one of the two quiet modes
172              described here.  The valid arguments to this option are:
173
174              errorsonly  - only print: For the ´-l error´ option, if nonzero,
175              the number of errors recorded in the SMART  error  log  and  the
176              power-on  time when they occurred; For the ´-l selftest´ option,
177              errors recorded in  the  device  self-test  log;  For  the  ´-H´
178              option,  SMART  "disk failing" status or device Attributes (pre-
179              failure or usage) which failed either now or in  the  past;  For
180              the  ´-A´ option, device Attributes (pre-failure or usage) which
181              failed either now or in the past.
182
183              silent - print no output.  The only way to learn about what  was
184              found  is  to  use  the exit status of smartctl (see EXIT STATUS
185              below).
186
187              noserial - Do not print the serial number of the device.
188
189       -d TYPE, --device=TYPE
190              Specifies the type of the device.  The valid arguments  to  this
191              option are:
192
193              auto  - attempt to guess the device type from the device name or
194              from controller type info provided by the  operating  system  or
195              from a matching USB ID entry in the drive database.  This is the
196              default.
197
198              test - prints the guessed type, then opens the device and prints
199              the  (possibly  changed)  TYPE name and then exists without per‐
200              forming any further commands.
201
202              ata - the device type is ATA.  This prevents smartctl from issu‐
203              ing SCSI commands to an ATA device.
204
205              scsi  -  the  device  type is SCSI.  This prevents smartctl from
206              issuing ATA commands to a SCSI device.
207
208              nvme[,NSID] - [FreeBSD, Linux, Windows  and  Cygwin  only]  [NEW
209              EXPERIMENTAL  SMARTCTL  FEATURE]  the device type is NVM Express
210              (NVMe).  The optional parameter NSID specifies the namespace  id
211              (in hex) passed to the driver.  Use 0xffffffff for the broadcast
212              namespace  id.   The  default  for  NSID  is  the  namespace  id
213              addressed by the device name.
214
215              sat[,auto][,N]  -  the  device  type  is SCSI to ATA Translation
216              (SAT).  This is for ATA disks that have a SCSI to  ATA  Transla‐
217              tion  (SAT) Layer (SATL) between the disk and the operating sys‐
218              tem.  SAT defines two ATA PASS THROUGH  SCSI  commands,  one  12
219              bytes  long  and the other 16 bytes long.  The default is the 16
220              byte variant which can be overridden with either ´-d sat,12´  or
221              ´-d sat,16´.
222
223              If  ´-d  sat,auto´  is  specified, device type SAT (for ATA/SATA
224              disks) is only used if the SCSI  INQUIRY  data  reports  a  SATL
225              (VENDOR:  "ATA     ").  Otherwise device type SCSI (for SCSI/SAS
226              disks) is used.
227
228              usbcypress - this device type is for ATA disks that are behind a
229              Cypress USB to PATA bridge.  This will use the ATACB proprietary
230              scsi pass through command.  The default SCSI operation  code  is
231              0x24,  but  although  it  can  be  overridden  with  ´-d  usbcy‐
232              press,0xN´, where N is the scsi operation code,  you're  running
233              the risk of damage to the device or filesystems on it.
234
235              usbjmicron[,p][,x][,PORT]  -  this device type is for SATA disks
236              that are behind a JMicron USB to PATA/SATA bridge.   The  48-bit
237              ATA  commands  (required e.g. for ´-l xerror´, see below) do not
238              work with all of these bridges and  are  therefore  disabled  by
239              default.   These  commands  can be enabled by ´-d usbjmicron,x´.
240              If two disks are connected to a bridge with two ports, an  error
241              message  is  printed  if  no PORT is specified.  The port can be
242              specified by ´-d usbjmicron[,x],PORT´ where PORT is  0  (master)
243              or  1  (slave).  This is not necessary if the device uses a port
244              multiplier to connect multiple disks to  one  port.   The  disks
245              appear  under separate /dev/ice names then.  CAUTION: Specifying
246              ´,x´ for a device which does  not  support  it  results  in  I/O
247              errors  and  may  disconnect the drive.  The same applies if the
248              specified PORT does not exist or is not connected to a disk.
249
250              The Prolific PL2507/3507 USB bridges with older firmware support
251              a pass-through command similar to JMicron and work with ´-d usb‐
252              jmicron,0´.  Newer Prolific firmware requires a modified command
253              which can be selected by ´-d usbjmicron,p´.  Note that this does
254              not yet support the SMART status command.
255
256              usbprolific - [NEW EXPERIMENTAL SMARTCTL  FEATURE]  this  device
257              type   is   for   SATA   disks   that   are  behind  a  Prolific
258              PL2571/2771/2773/2775 USB to SATA bridge.
259
260              usbsunplus - this device type is for SATA disks that are  behind
261              a SunplusIT USB to SATA bridge.
262
263              marvell  -  [Linux only] interact with SATA disks behind Marvell
264              chip-set controllers  (using  the  Marvell  rather  than  libata
265              driver).
266
267              megaraid,N  -  [Linux  only]  the device consists of one or more
268              SCSI/SAS disks connected to a MegaRAID controller.  The non-neg‐
269              ative  integer  N  (in  the range of 0 to 127 inclusive) denotes
270              which disk on the controller is monitored.  Use syntax such as:
271              smartctl -a -d megaraid,2 /dev/sda
272              smartctl -a -d megaraid,0 /dev/sdb
273              smartctl -a -d megaraid,0 /dev/bus/0
274              This interface will also work for Dell PERC controllers.  It  is
275              possible  to  set  RAID  device name as /dev/bus/N, where N is a
276              SCSI bus number.
277
278              The following entry in /proc/devices must exist:
279              For PERC2/3/4 controllers: megadevN
280              For PERC5/6 controllers: megaraid_sas_ioctlN
281
282              aacraid,H,L,ID - [Linux, Windows and Cygwin only]  [NEW  EXPERI‐
283              MENTAL  SMARTCTL  FEATURE]  the  device  consists of one or more
284              SCSI/SAS disks connected to an AacRaid controller.  The non-neg‐
285              ative  integers  H,L,ID (Host number, Lun, ID) denote which disk
286              on the controller is monitored.  Use syntax such as:
287              smartctl -a -d aacraid,0,0,2 /dev/sda
288              smartctl -a -d aacraid,1,0,4 /dev/sdb
289
290              On Linux, the following entry in /proc/devices must exist:  aac.
291              Character  device nodes /dev/aacH (H=Host number) are created if
292              required.
293
294              3ware,N - [FreeBSD and Linux only] the device consists of one or
295              more  ATA  disks connected to a 3ware RAID controller.  The non-
296              negative integer N (in  the  range  from  0  to  127  inclusive)
297              denotes  which  disk on the controller is monitored.  Use syntax
298              such as:
299              smartctl -a -d 3ware,2 /dev/sda  [Linux only]
300              smartctl -a -d 3ware,0 /dev/twe0
301              smartctl -a -d 3ware,1 /dev/twa0
302              smartctl -a -d 3ware,1 /dev/twl0 [Linux only]
303              smartctl -a -d 3ware,1 /dev/tws0 [FreeBSD only]
304              The first two forms,  which  refer  to  devices  /dev/sda-z  and
305              /dev/twe0-15, may be used with 3ware series 6000, 7000, and 8000
306              series controllers that use the 3x-xxxx driver.  Note  that  the
307              /dev/sda-z form is deprecated starting with the Linux 2.6 kernel
308              series and may not be supported by the Linux kernel in the  near
309              future.   The  final form, which refers to devices /dev/twa0-15,
310              must be used with 3ware 9000 series controllers, which  use  the
311              3w-9xxx driver.
312
313              The  devices /dev/twl0-15 [Linux] or /dev/tws0-15 [FreeBSD] must
314              be used with the 3ware/LSI 9750 series controllers which use the
315              3w-sas driver.
316
317              Note  that  if  the special character device nodes /dev/tw[ls]?,
318              /dev/twa?  and /dev/twe? do not exist, or exist with the  incor‐
319              rect  major or minor numbers, smartctl will recreate them on the
320              fly.  Typically /dev/twa0 refers to the first  9000-series  con‐
321              troller,  /dev/twa1 refers to the second 9000 series controller,
322              and so on.  The /dev/twl0  devices  refers  to  the  first  9750
323              series  controller,  /dev/twl1 resfers to the second 9750 series
324              controller, and so on.  Likewise /dev/twe0 refers to  the  first
325              6/7/8000-series  controller,  /dev/twe1  refers  to  the  second
326              6/7/8000 series controller, and so on.
327
328              Note that for the 6/7/8000  controllers,  any  of  the  physical
329              disks  can  be queried or examined using any of the 3ware's SCSI
330              logical device  /dev/sd?   entries.   Thus,  if  logical  device
331              /dev/sda  is made up of two physical disks (3ware ports zero and
332              one) and logical device /dev/sdb is made up of two other  physi‐
333              cal  disks  (3ware ports two and three) then you can examine the
334              SMART data on any of the four physical disks using  either  SCSI
335              device  /dev/sda or /dev/sdb.  If you need to know which logical
336              SCSI device a particular physical disk (3ware port)  is  associ‐
337              ated  with, use the dmesg or SYSLOG output to show which SCSI ID
338              corresponds to a particular 3ware unit, and then use  the  3ware
339              CLI or 3dm tool to determine which ports (physical disks) corre‐
340              spond to particular 3ware units.
341
342              If the value of N corresponds to a port that does not  exist  on
343              the 3ware controller, or to a port that does not physically have
344              a disk attached to it, the behavior of smartctl depends upon the
345              specific  controller model, firmware, Linux kernel and platform.
346              In some cases you will get a warning  message  that  the  device
347              does  not  exist.   In  other  cases  you will be presented with
348              ´void´ data for a non-existent device.
349
350              Note that if the /dev/sd? addressing form is  used,  then  older
351              3w-xxxx  drivers do not pass the "Enable Autosave" (´-S on´) and
352              "Enable Automatic Offline" (´-o on´) commands to the  disk,  and
353              produce  these  types of harmless syslog error messages instead:
354              "3w-xxxx: tw_ioctl(): Passthru size (123392) too big".  This can
355              be fixed by upgrading to version 1.02.00.037 or later of the 3w-
356              xxxx driver, or by applying a patch to older versions.  Alterna‐
357              tively, use the character device /dev/twe0-15 interface.
358
359              The  selective  self-test  functions  (´-t select,A-B´) are only
360              supported using the  character  device  interface  /dev/twl0-15,
361              /dev/tws0-15,  /dev/twa0-15  and  /dev/twe0-15.   The  necessary
362              WRITE LOG commands can not be passed through the SCSI interface.
363
364              areca,N - [FreeBSD, Linux, Windows and Cygwin only]  the  device
365              consists  of  one  or more SATA disks connected to an Areca SATA
366              RAID controller.  The positive integer N (in the range from 1 to
367              24 inclusive) denotes which disk on the controller is monitored.
368              On Linux use syntax such as:
369              smartctl -a -d areca,2 /dev/sg2
370              smartctl -a -d areca,3 /dev/sg3
371              The first line above addresses the  second  disk  on  the  first
372              Areca RAID controller.  The second line addresses the third disk
373              on the second Areca RAID controller.  To help identify the  cor‐
374              rect device on Linux, use the command:
375              cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices
376              to  show  the  SCSI generic devices (one per line, starting with
377              /dev/sg0).  The correct SCSI  generic  devices  to  address  for
378              smartmontools  are  the ones with the type field equal to 3.  If
379              the incorrect device is addressed, please read the warning/error
380              messages  carefully.   They  should  provide  hints  about  what
381              devices to use.
382
383              Important: the Areca controller must have firmware version  1.46
384              or later.  Lower-numbered firmware versions will give (harmless)
385              SCSI error messages and no SMART information.
386
387              areca,N/E - [FreeBSD, Linux, Windows and Cygwin only] the device
388              consists  of one or more SATA or SAS disks connected to an Areca
389              SAS RAID controller.  The integer N (range 1 to 128) denotes the
390              channel  (slot)  and  E  (range  1  to 8) denotes the enclosure.
391              Important: This requires Areca SAS controller  firmware  version
392              1.51 or later.
393
394              cciss,N - [FreeBSD and Linux only] the device consists of one or
395              more SCSI/SAS or SATA disks  connected  to  a  cciss  RAID  con‐
396              troller.   The non-negative integer N (in the range from 0 to 15
397              inclusive) denotes which disk on the controller is monitored.
398
399              To look at disks behind HP Smart Array controllers,  use  syntax
400              such as:
401              smartctl -a -d cciss,0 /dev/cciss/c0d0    (cciss driver under Linux)
402              smartctl -a -d cciss,0 /dev/sg2    (hpsa or hpahcisr drivers under Linux)
403
404              hpt,L/M/N  - [FreeBSD and Linux only] the device consists of one
405              or more ATA disks  connected  to  a  HighPoint  RocketRAID  con‐
406              troller.   The  integer L is the controller id, the integer M is
407              the channel number, and the integer N is the PMPort number if it
408              is  available.   The  allowed values of L are from 1 to 4 inclu‐
409              sive, M are from 1 to 128 inclusive and N from 1 to 4 if  PMPort
410              available.   And  also  these values are limited by the model of
411              the HighPoint RocketRAID controller.  Use syntax such as:
412              smartctl -a -d hpt,1/3 /dev/sda    (under Linux)
413              smartctl -a -d hpt,1/2/3 /dev/sda    (under Linux)
414              Note that the /dev/sda-z form should be the  device  node  which
415              stands  for the disks derived from the HighPoint RocketRAID con‐
416              trollers under Linux and under  FreeBSD,  it  is  the  character
417              device    which   the   driver   registered   (eg,   /dev/hptrr,
418              /dev/hptmv6).
419
420       -T TYPE, --tolerance=TYPE
421              [ATA only] Specifies how tolerant smartctl should be of ATA  and
422              SMART command failures.
423
424              The  behavior  of  smartctl  depends upon whether the command is
425              "optional" or "mandatory". Here "mandatory" means  "required  by
426              the ATA Specification if the device implements the SMART command
427              set" and "optional" means "not required by the ATA Specification
428              even  if  the  device  implements  the  SMART command set."  The
429              "mandatory" ATA and SMART commands are: (1) ATA IDENTIFY DEVICE,
430              (2)   SMART   ENABLE/DISABLE   ATTRIBUTE   AUTOSAVE,  (3)  SMART
431              ENABLE/DISABLE, and (4) SMART RETURN STATUS.
432
433              The valid arguments to this option are:
434
435              normal - exit on failure of any  mandatory  SMART  command,  and
436              ignore  all  failures  of  optional SMART commands.  This is the
437              default.  Note  that  on  some  devices,  issuing  unimplemented
438              optional SMART commands doesn´t cause an error.  This can result
439              in misleading smartctl messages such as "Feature  X  not  imple‐
440              mented", followed shortly by "Feature X: enabled".  In most such
441              cases, contrary to the final message, Feature X is not enabled.
442
443              conservative - exit on failure of any optional SMART command.
444
445              permissive - ignore  failure(s)  of  mandatory  SMART  commands.
446              This option may be given more than once.  Each additional use of
447              this option  will  cause  one  more  additional  failure  to  be
448              ignored.   Note that the use of this option can lead to messages
449              like "Feature X not supported", followed shortly by  "Feature  X
450              enable failed".  In a few such cases, contrary to the final mes‐
451              sage, Feature X is enabled.
452
453              verypermissive - equivalent to giving a large number of ´-T per‐
454              missive´  options:  ignore  failures  of any number of mandatory
455              SMART commands.  Please see the note above.
456
457       -b TYPE, --badsum=TYPE
458              [ATA only] Specifies the action smartctl should take if a check‐
459              sum error is detected in the: (1) Device Identity Structure, (2)
460              SMART Self-Test Log Structure, (3) SMART Attribute Value  Struc‐
461              ture,  (4) SMART Attribute Threshold Structure, or (5) ATA Error
462              Log Structure.
463
464              The valid arguments to this option are:
465
466              warn - report the incorrect checksum but carry on  in  spite  of
467              it.  This is the default.
468
469              exit - exit smartctl.
470
471              ignore - continue silently without issuing a warning.
472
473       -r TYPE, --report=TYPE
474              Intended  primarily  to help smartmontools developers understand
475              the behavior of smartmontools on non-conforming or  poorly  con‐
476              forming  hardware.   This  option  reports  details  of smartctl
477              transactions with the device.  The option can be  used  multiple
478              times.   When  used  just once, it shows a record of the ioctl()
479              transactions with the device.  When used  more  than  once,  the
480              detail  of  these  ioctl()  transactions are reported in greater
481              detail.  The valid arguments to this option are:
482
483              ioctl - report all ioctl() transactions.
484
485              ataioctl - report only ioctl() transactions with ATA devices.
486
487              scsiioctl - report only ioctl() transactions with SCSI  devices.
488              Invoking this once shows the SCSI commands in hex and the corre‐
489              sponding status. Invoking it a second time adds a hex listing of
490              the first 64 bytes of data send to, or received from the device.
491
492              nvmeioctl  -  [FreeBSD,  Linux,  Windows  and  Cygwin only] [NEW
493              EXPERIMENTAL SMARTCTL FEATURE] report only ioctl()  transactions
494              with NVMe devices.
495
496              Any argument may include a positive integer to specify the level
497              of detail that should be reported.  The argument should be  fol‐
498              lowed  by a comma then the integer with no spaces.  For example,
499              ataioctl,2 The default level is 1, so ´-r  ataioctl,1´  and  ´-r
500              ataioctl´ are equivalent.
501
502              For testing purposes, the output of ´-r ataioctl,2´ can later be
503              parsed by smartctl itself if ´-´ is used as  device  path  argu‐
504              ment.   The ATA command input parameters, sector data and return
505              values are reconstructed from the debug report read from  stdin.
506              Then  smartctl  internally simulates an ATA device with the same
507              behaviour. This is does not work for SCSI devices yet.
508
509       -n POWERMODE, --nocheck=POWERMODE
510              [ATA only] Specifies if smartctl should exit  before  performing
511              any  checks  when  the  device is in a low-power mode. It may be
512              used to prevent a disk from being spun-up by smartctl. The power
513              mode  is  ignored by default.  A nonzero exit status is returned
514              if the device is in one of the specified  low-power  modes  (see
515              EXIT STATUS below).
516
517              Note: If this option is used it may also be necessary to specify
518              the device type with the ´-d´ option.  Otherwise the device  may
519              spin up due to commands issued during device type autodetection.
520
521              The valid arguments to this option are:
522
523              never  -  check  the  device always, but print the power mode if
524              ´-i´ is specified.
525
526              sleep - check the device unless it is in SLEEP mode.
527
528              standby - check the device unless it  is  in  SLEEP  or  STANDBY
529              mode.   In  these  modes  most disks are not spinning, so if you
530              want to prevent a disk from spinning up, this is  probably  what
531              you want.
532
533              idle  -  check the device unless it is in SLEEP, STANDBY or IDLE
534              mode.  In the IDLE state, most disks are still spinning, so this
535              is probably not what you want.
536
537
538       SMART FEATURE ENABLE/DISABLE COMMANDS:
539
540              Note:  if multiple options are used to both enable and disable a
541              feature, then both the  enable  and  disable  commands  will  be
542              issued.   The  enable  command  will always be issued before the
543              corresponding disable command.
544
545       -s VALUE, --smart=VALUE
546              Enables or disables SMART on device.   The  valid  arguments  to
547              this option are on and off.  Note that the command ´-s on´ (per‐
548              haps used with with the ´-o on´ and ´-S on´ options)  should  be
549              placed  in  a  start-up  script for your machine, for example in
550              rc.local or rc.sysinit. In principle the SMART feature  settings
551              are  preserved  over  power-cycling,  but  it doesn´t hurt to be
552              sure. It is not necessary (or useful) to enable SMART to see the
553              TapeAlert messages.
554
555       -o VALUE, --offlineauto=VALUE
556              [ATA  only]  Enables  or  disables SMART automatic offline test,
557              which scans the drive every four hours for  disk  defects.  This
558              command  can be given during normal system operation.  The valid
559              arguments to this option are on and off.
560
561              Note that the SMART automatic offline test command is listed  as
562              "Obsolete"  in every version of the ATA and ATA/ATAPI Specifica‐
563              tions.  It was originally part of  the  SFF-8035i  Revision  2.0
564              specification,  but  was  never  part  of any ATA specification.
565              However it is implemented and used by  many  vendors.   You  can
566              tell if automatic offline testing is supported by seeing if this
567              command enables and disables it, as indicated by the ´Auto  Off‐
568              line  Data  Collection´  part  of  the SMART capabilities report
569              (displayed with ´-c´).
570
571              SMART provides three basic categories  of  testing.   The  first
572              category,  called "online" testing, has no effect on the perfor‐
573              mance of the device.  It is turned on by the ´-s on´ option.
574
575              The second category of testing is called "offline" testing. This
576              type  of test can, in principle, degrade the device performance.
577              The ´-o on´ option causes this offline  testing  to  be  carried
578              out, automatically, on a regular scheduled basis.  Normally, the
579              disk will suspend offline testing while disk accesses are taking
580              place, and then automatically resume it when the disk would oth‐
581              erwise be idle, so in practice it has little effect.  Note  that
582              a one-time offline test can also be carried out immediately upon
583              receipt of a user command.  See the ´-t offline´  option  below,
584              which  causes  a one-time offline test to be carried out immedi‐
585              ately.
586
587              The choice (made by the SFF-8035i and ATA specification authors)
588              of  the  word testing for these first two categories is unfortu‐
589              nate, and often leads to confusion.  In  fact  these  first  two
590              categories  of  online  and offline testing could have been more
591              accurately described as online and offline data collection.
592
593              The results of this automatic or immediate offline testing (data
594              collection) are reflected in the values of the SMART Attributes.
595              Thus, if problems or errors are detected, the  values  of  these
596              Attributes will go below their failure thresholds; some types of
597              errors may also appear in the SMART error log. These are visible
598              with the ´-A´ and ´-l error´ options respectively.
599
600              Some  SMART  attribute  values  are updated only during off-line
601              data collection activities; the rest are updated  during  normal
602              operation of the device or during both normal operation and off-
603              line testing.  The Attribute value table produced  by  the  ´-A´
604              option  indicates this in the UPDATED column.  Attributes of the
605              first type are labeled "Offline" and Attributes  of  the  second
606              type are labeled "Always".
607
608              The  third  category of testing (and the only category for which
609              the word ´testing´ is really an appropriate  choice)  is  "self"
610              testing.   This  third  type  of test is only performed (immedi‐
611              ately) when a command to run it is issued.  The  ´-t´  and  ´-X´
612              options  can  be  used  to  carry out and abort such self-tests;
613              please see below for further details.
614
615              Any errors detected in the self testing will  be  shown  in  the
616              SMART  self-test  log, which can be examined using the ´-l self‐
617              test´ option.
618
619              Note: in this manual page, the word "Test" is used in connection
620              with  the second category just described, e.g. for the "offline"
621              testing.  The words "Self-test" are used in connection with  the
622              third category.
623
624       -S VALUE, --saveauto=VALUE
625              [ATA]  Enables  or disables SMART autosave of device vendor-spe‐
626              cific Attributes. The valid arguments to this option are on  and
627              off.   Note  that  this  feature  is preserved across disk power
628              cycles, so you should only need to issue it once.
629
630              The ATA standard does not specify  a  method  to  check  whether
631              SMART  autosave  is  enabled.  Unlike  SCSI (below), smartctl is
632              unable to print a warning if autosave is disabled.
633
634              [SCSI] For SCSI devices this toggles the  value  of  the  Global
635              Logging  Target  Save  Disabled  (GLTSD) bit in the Control Mode
636              Page. Some disk manufacturers set this bit by default. This pre‐
637              vents  error counters, power-up hours and other useful data from
638              being placed in non-volatile storage, so  these  values  may  be
639              reset  to zero the next time the device is power-cycled.  If the
640              GLTSD bit is set then ´smartctl -a´ will issue a warning. Use on
641              to  clear  the GLTSD bit and thus enable saving counters to non-
642              volatile storage. For extreme streaming-video type  applications
643              you might consider using off to set the GLTSD bit.
644
645       -g NAME, --get=NAME, -s NAME[,VALUE], --set=NAME[,VALUE]
646              Gets/sets  non-SMART  device  settings.   Note  that the ´--set´
647              option shares its short option ´-s´ with ´--smart´.  Valid argu‐
648              ments are:
649
650              all - Gets all values. This is equivalent to
651              ´-g aam -g apm -g lookahead -g security -g wcache´
652
653              aam[,N|off]  -  [ATA only] Gets/sets the Automatic Acoustic Man‐
654              agement (AAM) feature (if supported).  A value of 128  sets  the
655              most  quiet  (slowest)  mode and 254 the fastest (loudest) mode,
656              ´off´ disables AAM.  Devices may  support  intermediate  levels.
657              Values  below  128 are defined as vendor specific (0) or retired
658              (1 to 127).  Note that the AAM feature was declared obsolete  in
659              ATA ACS-2 Revision 4a (Dec 2010).
660
661              apm[,N|off] - [ATA only] Gets/sets the Advanced Power Management
662              (APM) feature on device (if supported).  If a  value  between  1
663              and  254  is provided, it will attempt to enable APM and set the
664              specified value, ´off´ disables APM.  Note the  actual  behavior
665              depends  on  the  drive,  for example some drives disable APM if
666              their value is set above 128.  Values below 128 are supposed  to
667              allow  drive  spindown,  values  128 and above adjust only head-
668              parking frequency, although the actual behavior defined is  also
669              vendor-specific.
670
671              lookahead[,on|off]  -  [ATA  only] Gets/sets the read look-ahead
672              feature (if supported).  Read look-ahead is usually  enabled  by
673              default.
674
675              security  -  [ATA  only] Gets the status of ATA Security feature
676              (if supported).  If ATA Security is enabled an ATA user password
677              is set.  The drive will be locked on next reset then.
678
679              security-freeze - [ATA only] Sets ATA Security feature to frozen
680              mode.  This prevents that the drive accepts  any  security  com‐
681              mands  until  next reset.  Note that the frozen mode may already
682              be set by BIOS or OS.
683
684              standby,[N|off] - [ATA only] Sets the standby  (spindown)  timer
685              and  places  the  drive in the IDLE mode.  A value of 0 or ´off´
686              disables the standby timer.  Values from 1 to 240 specify  time‐
687              outs  from 5 seconds to 20 minutes in 5 second increments.  Val‐
688              ues from 241 to 251 specify timeouts from 30 minutes to 330 min‐
689              utes  in  30 minute increments.  Value 252 specifies 21 minutes.
690              Value 253 specifies a vendor specific  time  between  8  and  12
691              hours.   Value  255  specifies  21 minutes and 15 seconds.  Some
692              drives may use a vendor specific interpretation for the  values.
693              Note  that  there  is no get option because ATA standards do not
694              specify a method to read the standby timer.
695
696              standby,now - [ATA only] Places the drive in the  STANDBY  mode.
697              This  usually  spins down the drive.  The setting of the standby
698              timer is not affected.
699
700              wcache[,on|off] - [ATA] Gets/sets the volatile write cache  fea‐
701              ture  (if  supported).   The  write  cache is usually enabled by
702              default.
703
704              wcache[,on|off] - [SCSI]  Gets/sets  the  ´Write  Cache  Enable´
705              (WCE) bit (if supported).  The write cache is usually enabled by
706              default.
707
708              wcreorder[,on|off] - [ATA only] Gets/sets Write  Cache  Reorder‐
709              ing.  If it is disabled (off), disk write scheduling is executed
710              on a first-in-first-out (FIFO) basis. If Write Cache  Reordering
711              is  enabled (on), then disk write scheduling may be reordered by
712              the drive. If write cache is disabled, the current  Write  Cache
713              Reordering  state  is remembered but has no effect on non-cached
714              writes, which are always written in  the  order  received.   The
715              state  of  Write Cache Reordering has no effect on either NCQ or
716              LCQ queued commands.
717
718              rcache[,on|off] - [SCSI only] Gets/sets the ´Read Cache Disable´
719              (RCE) bit.  ´Off´ value disables read cache (if supported).  The
720              read cache is usually enabled by default.
721
722
723       SMART READ AND DISPLAY DATA OPTIONS:
724
725       -H, --health
726              Prints the health status of the device or pending TapeAlert mes‐
727              sages.
728
729              If  the  device reports failing health status, this means either
730              that the device has already failed, or that it is predicting its
731              own  failure within the next 24 hours.  If this happens, use the
732              ´-a´ option to get more information, and get your data  off  the
733              disk and to someplace safe as soon as you can.
734
735              [ATA] Health status is obtained by checking the (boolean) result
736              returned by the SMART RETURN STATUS command.  The  return  value
737              of this ATA command may be unknown due to limitations or bugs in
738              some layer (e.g. RAID controller or USB bridge firmware) between
739              disk  and  operating  system.   In  this case, smartctl prints a
740              warning and checks whether any Prefailure SMART Attribute  value
741              is less than or equal to its threshold (see ´-A´ below).
742
743              [SCSI]  Health  status  is  obtained  by checking the Additional
744              Sense Code (ASC) and Additional Sense Code Qualifier (ASCQ) from
745              Informal  Exceptions  (IE)  log  page (if supported) and/or from
746              SCSI sense data.
747
748              [SCSI tape drive or changer] TapeAlert  status  is  obtained  by
749              reading  the TapeAlert log page.  Please note that the TapeAlert
750              log page flags are cleared for the initiator when  the  page  is
751              read.   This  means  that  each alert condition is reported only
752              once by smartctl for each initiator for each activation  of  the
753              condition.
754
755              [NVMe] [FreeBSD, Linux, Windows and Cygwin only] [NEW EXPERIMEN‐
756              TAL SMARTCTL FEATURE] NVMe status is  obtained  by  reading  the
757              "Critical Warning" byte from the SMART/Health Information log.
758
759       -c, --capabilities
760              [ATA]  Prints  only  the generic SMART capabilities.  These show
761              what SMART features are implemented  and  how  the  device  will
762              respond to some of the different SMART commands.  For example it
763              shows if the device logs errors, if it supports offline  surface
764              scanning,  and  so  on.  If the device can carry out self-tests,
765              this option also shows the estimated time required to run  those
766              tests.
767
768              Note  that  the  time  required to run the Self-tests (listed in
769              minutes) are fixed.  However the time required to run the  Imme‐
770              diate  Offline Test (listed in seconds) is variable.  This means
771              that if you issue a command to perform an Immediate Offline test
772              with the ´-t offline´ option, then the time may jump to a larger
773              value and then count down as the Immediate Offline Test is  car‐
774              ried  out.   Please see REFERENCES below for further information
775              about the the flags and capabilities described by this option.
776
777              [NVMe] [FreeBSD, Linux, Windows and Cygwin only] [NEW EXPERIMEN‐
778              TAL  SMARTCTL  FEATURE]  Prints various NVMe device capabilities
779              obtained from the Identify Controller and the Identify Namespace
780              data structure.
781
782       -A, --attributes
783              [ATA]  Prints  only  the  vendor specific SMART Attributes.  The
784              Attributes are numbered from 1 to 253 and  have  specific  names
785              and ID numbers. For example Attribute 12 is "power cycle count":
786              how many times has the disk been powered up.
787
788              Each Attribute has a "Raw"  value,  printed  under  the  heading
789              "RAW_VALUE",  and a "Normalized" value printed under the heading
790              "VALUE".  [Note: smartctl prints these values in  base-10.]   In
791              the  example  just given, the "Raw Value" for Attribute 12 would
792              be the actual number of times that  the  disk  has  been  power-
793              cycled,  for example 365 if the disk has been turned on once per
794              day for exactly one year.  Each vendor uses their own  algorithm
795              to convert this "Raw" value to a "Normalized" value in the range
796              from 1 to 254.  Please keep in mind that smartctl  only  reports
797              the  different  Attribute  types, values, and thresholds as read
798              from the device.  It does not carry out the  conversion  between
799              "Raw"  and  "Normalized"  values:  this  is  done  by the disk´s
800              firmware.
801
802              The conversion from Raw value to a quantity with physical  units
803              is  not specified by the SMART standard. In most cases, the val‐
804              ues printed by smartctl are sensible.  For example the  tempera‐
805              ture Attribute generally has its raw value equal to the tempera‐
806              ture in Celsius.  However in some cases vendors use unusual con‐
807              ventions.  For example the Hitachi disk on my laptop reports its
808              power-on hours in minutes, not hours. Some IBM disks track three
809              temperatures rather than one, in their raw values.  And so on.
810
811              Each  Attribute  also has a Threshold value (whose range is 0 to
812              255) which is printed under the heading "THRESH".  If  the  Nor‐
813              malized value is less than or equal to the Threshold value, then
814              the Attribute is said to have failed.  If  the  Attribute  is  a
815              pre-failure Attribute, then disk failure is imminent.
816
817              Each  Attribute also has a "Worst" value shown under the heading
818              "WORST".  This is the smallest (closest to failure)  value  that
819              the disk has recorded at any time during its lifetime when SMART
820              was enabled.  [Note however that some vendors firmware may actu‐
821              ally   increase   the   "Worst"   value   for  some  "rate-type"
822              Attributes.]
823
824              The Attribute table printed  out  by  smartctl  also  shows  the
825              "TYPE"  of  the  Attribute.  Attributes  are one of two possible
826              types: Pre-failure or Old age.  Pre-failure Attributes are  ones
827              which, if less than or equal to their threshold values, indicate
828              pending disk failure.  Old age, or usage  Attributes,  are  ones
829              which  indicate end-of-product life from old-age or normal aging
830              and wearout, if the Attribute value is less than or equal to the
831              threshold.   Please  note: the fact that an Attribute is of type
832              'Pre-fail' does not mean that your disk is about  to  fail!   It
833              only  has  this  meaning  if  the Attribute´s current Normalized
834              value is less than or equal to the threshold value.
835
836              If the Attribute´s current Normalized  value  is  less  than  or
837              equal to the threshold value, then the "WHEN_FAILED" column will
838              display "FAILING_NOW". If not, but the worst recorded  value  is
839              less than or equal to the threshold value, then this column will
840              display "In_the_past".  If the "WHEN_FAILED" column has no entry
841              (indicated  by  a  dash: ´-´) then this Attribute is OK now (not
842              failing) and has also never failed in the past.
843
844              The table column labeled "UPDATED" shows if the SMART  Attribute
845              values  are  updated  during  both normal operation and off-line
846              testing, or only during offline testing.  The former are labeled
847              "Always" and the latter are labeled "Offline".
848
849              So  to  summarize:  the  Raw  Attribute values are the ones that
850              might have a real physical interpretation, such as  "Temperature
851              Celsius",  "Hours",  or  "Start-Stop Cycles".  Each manufacturer
852              converts these, using their detailed  knowledge  of  the  disk´s
853              operations  and failure modes, to Normalized Attribute values in
854              the range 1-254.  The current and  worst  (lowest  measured)  of
855              these  Normalized Attribute values are stored on the disk, along
856              with a Threshold value that the manufacturer has determined will
857              indicate that the disk is going to fail, or that it has exceeded
858              its design age or aging limit.  smartctl does not calculate  any
859              of the Attribute values, thresholds, or types, it merely reports
860              them from the SMART data on the device.
861
862              Note that starting with ATA/ATAPI-4, revision 4, the meaning  of
863              these  Attribute  fields has been made entirely vendor-specific.
864              However most newer ATA/SATA disks seem to respect their meaning,
865              so we have retained the option of printing the Attribute values.
866
867              Solid-state  drives  use  different  meanings  for  some  of the
868              attributes.  In this case the attribute name printed by smartctl
869              is  incorrect  unless  the drive is already in the smartmontools
870              drive database.
871
872              [SCSI] For SCSI devices the "attributes" are obtained  from  the
873              temperature and start-stop cycle counter log pages. Certain ven‐
874              dor specific attributes are listed if recognised. The attributes
875              are  output  in a relatively free format (compared with ATA disk
876              attributes).
877
878              [NVMe] [FreeBSD, Linux, Windows and Cygwin only] [NEW EXPERIMEN‐
879              TAL  SMARTCTL  FEATURE]  For  NVMe  devices  the  attributes are
880              obtained from the SMART/Health Information log.
881
882       -f FORMAT, --format=FORMAT
883              [ATA only] Selects the output format of the attributes:
884
885              old - Old smartctl format. This is the default unless  the  ´-x´
886              option is specified.
887
888              brief  -  New  format  which fits into 80 colums (except in some
889              rare cases).  This format also decodes four additional attribute
890              flags.  This is the default if the '-x´ option is specified.
891
892              hex,id - Print all attribute IDs as hexadecimal numbers.
893
894              hex,val - Print all normalized values as hexadecimal numbers.
895
896              hex - Same as ´-f hex,id -f hex,val´.
897
898       -l TYPE, --log=TYPE
899              Prints  either the SMART Error Log, the SMART Self-Test Log, the
900              SMART Selective Self-Test Log [ATA only], the Log Directory [ATA
901              only],  or  the  Background  Scan  Results Log [SCSI only].  The
902              valid arguments to this option are:
903
904              error - [ATA] prints the Summary SMART error log.   SMART  disks
905              maintain  a  log of the most recent five non-trivial errors. For
906              each of these errors, the disk power-on lifetime  at  which  the
907              error  occurred  is  recorded,  as  is  the device status (idle,
908              standby, etc) at the time of the error.  For some  common  types
909              of errors, the Error Register (ER) and Status Register (SR) val‐
910              ues are decoded and printed as text. The meanings of these are:
911                 ABRT:  Command ABoRTed
912                 AMNF:  Address Mark Not Found
913                 CCTO:  Command Completion Timed Out
914                 EOM:   End Of Media
915                 ICRC:  Interface Cyclic Redundancy Code (CRC) error
916                 IDNF:  IDentity Not Found
917                 ILI:   (packet command-set specific)
918                 MC:    Media Changed
919                 MCR:   Media Change Request
920                 NM:    No Media
921                 obs:   obsolete
922                 TK0NF: TracK 0 Not Found
923                 UNC:   UNCorrectable Error in Data
924                 WP:    Media is Write Protected
925              In addition, up to the last  five  commands  that  preceded  the
926              error are listed, along with a timestamp measured from the start
927              of the corresponding power cycle. This is displayed in the  form
928              Dd+HH:MM:SS.msec  where D is the number of days, HH is hours, MM
929              is minutes, SS is seconds and msec is milliseconds.  [Note: this
930              time  stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2
931              minutes and 47.296 seconds.]  The key  ATA  disk  registers  are
932              also  recorded in the log.  The final column of the error log is
933              a text-string description of the ATA command defined by the Com‐
934              mand  Register  (CR) and Feature Register (FR) values.  Commands
935              that are obsolete in the most current spec are listed like this:
936              READ LONG (w/ retry) [OBS-4], indicating that the command became
937              obsolete with or in the  ATA-4  specification.   Similarly,  the
938              notation  [RET-N] is used to indicate that a command was retired
939              in the ATA-N specification.  Some commands are  not  defined  in
940              any version of the ATA specification but are in common use none‐
941              theless; these are marked [NS], meaning non-standard.
942
943              The ATA Specification (ATA  ACS-2  Revision  7,  Section  A.7.1)
944              says: "Error log data structures shall include, but are not lim‐
945              ited to, Uncorrectable errors, ID Not Found errors for which the
946              LBA  requested  was valid, servo errors, and write fault errors.
947              Error log data structures shall not include errors attributed to
948              the receipt of faulty commands."  The definitions of these terms
949              are:
950              UNC (UNCorrectable): data is uncorrectable.  This refers to data
951              which  has  been  read  from  the  disk, but for which the Error
952              Checking  and  Correction  (ECC)  codes  are  inconsistent.   In
953              effect, this means that the data can not be read.
954              IDNF (ID Not Found): user-accessible address could not be found.
955              For READ LOG type commands, IDNF can also indicate that a device
956              data log structure checksum was incorrect.
957
958              If  the  command  that caused the error was a READ or WRITE com‐
959              mand, then the Logical Block Address (LBA) at  which  the  error
960              occurred  will  be printed in base 10 and base 16.  The LBA is a
961              linear address, which  counts  512-byte  sectors  on  the  disk,
962              starting  from  zero.   (Because of the limitations of the SMART
963              error log, if the LBA is greater than 0xfffffff, then either  no
964              error  log  entry will be made, or the error log entry will have
965              an incorrect LBA. This may happen for  drives  with  a  capacity
966              greater  than 128 GiB or 137 GB.) On Linux systems the smartmon‐
967              tools web page has instructions about how  to  convert  the  LBA
968              address  to  the  name of the disk file containing the erroneous
969              disk sector.
970
971              Please note that some manufacturers ignore  the  ATA  specifica‐
972              tions,  and make entries in the error log if the device receives
973              a command which is not implemented or is not valid.
974
975              error - [SCSI] prints the error counter  log  pages  for  reads,
976              write  and verifies.  The verify row is only output if it has an
977              element other than zero.
978
979              error[,NUM] - [NVMe] [FreeBSD, Linux, Windows and  Cygwin  only]
980              [NEW EXPERIMENTAL SMARTCTL FEATURE] prints the NVMe Error Infor‐
981              mation log.  Only the 16 most recent log entries are printed  by
982              default.   This  number can be changed by the optional parameter
983              NUM.  The maximum number of log entries is vendor  specific  (in
984              the range from 1 to 256 inclusive).
985
986              xerror[,NUM][,error] - [ATA only] prints the Extended Comprehen‐
987              sive SMART error log (General Purpose Log address 0x03).  Unlike
988              the  Summary SMART error log (see ´-l error´ above), it provides
989              sufficient space to log the contents of the 48-bit LBA  register
990              set introduced with ATA-6.  It also supports logs with more than
991              one sector.  Each sector holds up to 4 log entries.  The  actual
992              number of log sectors is vendor specific.
993
994              Only the 8 most recent error log entries are printed by default.
995              This number can be changed by the optional parameter NUM.
996
997              If ',error' is appended and  the  Extended  Comprehensive  SMART
998              error  log  is not supported, the Summary SMART self-test log is
999              printed.
1000
1001              Please note that recent drives may report  errors  only  in  the
1002              Extended Comprehensive SMART error log.  The Summary SMART error
1003              log may be reported as supported but is always empty then.
1004
1005              selftest - [ATA] prints the SMART self-test log.  The disk main‐
1006              tains  a  self-test  log  showing the results of the self tests,
1007              which can be run using the ´-t´  option  described  below.   For
1008              each of the most recent twenty-one self-tests, the log shows the
1009              type of test (short or extended, off-line or  captive)  and  the
1010              final status of the test.  If the test did not complete success‐
1011              fully, then the percentage of the test remaining is shown.   The
1012              time  at  which  the  test took place, measured in hours of disk
1013              lifetime, is also printed. [Note: this time  stamp  wraps  after
1014              2^16  hours,  or 2730 days and 16 hours, or about 7.5 years.] If
1015              any errors were detected, the Logical Block Address (LBA) of the
1016              first  error  is  printed in decimal notation.  On Linux systems
1017              the smartmontools web page has instructions about how to convert
1018              this  LBA  address  to  the name of the disk file containing the
1019              erroneous block.
1020
1021              selftest - [SCSI] the self-test log for  a  SCSI  device  has  a
1022              slightly  different  format than for an ATA device.  For each of
1023              the most recent twenty self-tests, it shows the type of test and
1024              the  status  (final  or in progress) of the test. SCSI standards
1025              use the terms "foreground" and "background" (rather  than  ATA´s
1026              corresponding  "captive"  and "off-line") and "short" and "long"
1027              (rather than ATA´s  corresponding  "short"  and  "extended")  to
1028              describe  the  type  of the test.  The printed segment number is
1029              only relevant when a test fails in the third or later test  seg‐
1030              ment.  It identifies the test that failed and consists of either
1031              the number of the segment that failed during the  test,  or  the
1032              number  of the test that failed and the number of the segment in
1033              which the test  was  run,  using  a  vendor-specific  method  of
1034              putting  both  numbers  into  a  single byte.  The Logical Block
1035              Address (LBA) of the first error is printed in hexadecimal nota‐
1036              tion.   On Linux systems the smartmontools web page has instruc‐
1037              tions about how to convert this LBA address to the name  of  the
1038              disk file containing the erroneous block.  If provided, the SCSI
1039              Sense Key (SK), Additional Sense Code (ASC) and Additional Sense
1040              Code Qualifier (ASQ) are also printed. The self tests can be run
1041              using the ´-t´ option described below (using the ATA test termi‐
1042              nology).
1043
1044              xselftest[,NUM][,selftest]  -  [ATA  only]  prints  the Extended
1045              SMART self-test log (General Purpose Log address  0x07).  Unlike
1046              the  SMART  self-test log (see ´-l selftest´ above), it supports
1047              48-bit LBA and logs with more  than  one  sector.   Each  sector
1048              holds  up to 19 log entries. The actual number of log sectors is
1049              vendor specific.
1050
1051              Only the 25 most recent log entries are printed by default. This
1052              number can be changed by the optional parameter NUM.
1053
1054              If  ',selftest' is appended and the Extended SMART self-test log
1055              is not supported, the old SMART self-test log is printed.
1056
1057              selective - [ATA only] Please see the ´-t select´  option  below
1058              for  a description of selective self-tests.  The selective self-
1059              test log shows the start/end Logical Block  Addresses  (LBA)  of
1060              each  of the five test spans, and their current test status.  If
1061              the span is being tested or the remainder of the disk  is  being
1062              read-scanned,  the  current  65536-sector  block  of  LBAs being
1063              tested is also displayed.   The  selective  self-test  log  also
1064              shows  if  a read-scan of the remainder of the disk will be car‐
1065              ried out after the selective self-test has  completed  (see  ´-t
1066              afterselect´  option)  and the time delay before restarting this
1067              read-scan if it is interrupted (see ´-t pending´ option).
1068
1069              directory[,gs] - [ATA only] if the device supports  the  General
1070              Purpose  Logging  feature set (ATA-6 and above) then this prints
1071              the Log Directory (the log at address  0).   The  Log  Directory
1072              shows  what  logs are available and their length in sectors (512
1073              bytes).  The contents of the logs at address  1  [Summary  SMART
1074              error log] and at address 6 [SMART self-test log] may be printed
1075              using the previously-described error and selftest  arguments  to
1076              this  option.   If  your version of smartctl supports 48-bit ATA
1077              commands, both the General Purpose Log (GPL) and SMART Log  (SL)
1078              directories are printed in one combined table. The output can be
1079              restricted to the GPL directory or SL directory  by  ´-l  direc‐
1080              tory,q´ or ´-l directory,s´ respectively.
1081
1082              background - [SCSI only] the background scan results log outputs
1083              information derived from Background Media Scans (BMS) done after
1084              power  up  and/or  periodically  (e.g. every 24 hours) on recent
1085              SCSI disks. If supported, the BMS status is output first,  indi‐
1086              cating  whether  a background scan is currently underway (and if
1087              so a progress percentage), the amount of time the disk has  been
1088              powered up and the number of scans already completed. Then there
1089              is a header and a line for each background scan  "event".  These
1090              will typically be either recovered or unrecoverable errors. That
1091              latter group may need some attention. There is a description  of
1092              the  background scan mechanism in section 4.18 of SBC-3 revision
1093              6 (see www.t10.org ).
1094
1095              scttemp, scttempsts, scttemphist - [ATA only]  prints  the  disk
1096              temperature  information provided by the SMART Command Transport
1097              (SCT) commands.  The option ´scttempsts´ prints current tempera‐
1098              ture  and temperature ranges returned by the SCT Status command,
1099              ´scttemphist´ prints temperature limits and the temperature his‐
1100              tory table returned by the SCT Data Table command, and ´scttemp´
1101              prints both.  The temperature values are preserved across  power
1102              cycles.   The  logging  interval  can be configured with the ´-l
1103              scttempint,N[,p]´ option, see  below.   The  SCT  commands  were
1104              introduced  in  ATA8-ACS  and  were also supported by many ATA-7
1105              disks.
1106
1107              scttempint,N[,p] - [ATA only] clears the SCT temperature history
1108              table  and  sets  the time interval for temperature logging to N
1109              minutes.  If ´,p´ is specified, the setting is preserved  across
1110              power  cycles.   Otherwise,  the setting is volatile and will be
1111              reverted to the last  non-volatile  setting  by  the  next  hard
1112              reset.   The default interval is vendor specific, typical values
1113              are 1, 2, or 5 minutes.
1114
1115              scterc[,READTIME,WRITETIME]  -  [ATA  only]  prints  values  and
1116              descriptions  of  the SCT Error Recovery Control settings. These
1117              are equivalent to TLER (as used by Western  Digital),  CCTL  (as
1118              used  by Samsung and Hitachi/HGST) and ERC (as used by Seagate).
1119              READTIME and WRITETIME arguments (deciseconds) set the specified
1120              values.  Values of 0 disable the feature, other values less than
1121              65 are probably not supported. For RAID configurations, this  is
1122              typically set to 70,70 deciseconds.
1123
1124              devstat[,PAGE]  -  [ATA  only] prints values and descriptions of
1125              the ATA Device Statistics log pages (General Purpose Log address
1126              0x04).   If  no  PAGE number is specified, entries from all sup‐
1127              ported pages are printed.  If PAGE 0 is specified, the  list  of
1128              supported pages is printed.  Device Statistics was introduced in
1129              ACS-2 and is only supported by some recent devices.
1130
1131              sataphy[,reset] - [SATA only] prints values and descriptions  of
1132              the  SATA Phy Event Counters (General Purpose Log address 0x11).
1133              If ´-l sataphy,reset´ is specified, all counters are reset after
1134              reading  the  values.   This  also  works  for SATA devices with
1135              Packet interface like CD/DVD drives.
1136
1137              sasphy[,reset] - [SAS (SCSI) only] prints  values  and  descrip‐
1138              tions  of  the  SAS  (SSP)  Protocol Specific log page (log page
1139              0x18).  If ´-l sasphy,reset´  is  specified,  all  counters  are
1140              reset after reading the values.
1141
1142              gplog,ADDR[,FIRST[-LAST|+SIZE]]  -  [ATA only] prints a hex dump
1143              of any log accessible via General Purpose Logging (GPL) feature.
1144              The log address ADDR is the hex address listed in the log direc‐
1145              tory (see ´-l directory´  above).   The  range  of  log  sectors
1146              (pages)  can  be  specified  by  decimal  values  FIRST-LAST  or
1147              FIRST+SIZE.  FIRST defaults to 0, SIZE defaults to 1.  LAST  can
1148              be set to ´max´ to specify the last page of the log.
1149
1150              smartlog,ADDR[,FIRST[-LAST|+SIZE]]  -  [ATA  only]  prints a hex
1151              dump of any log accessible via SMART Read Log command.  See  ´-l
1152              gplog,...´ above for parameter syntax.
1153
1154              For example, all these commands:
1155                smartctl -l gplog,0x80,10-15 /dev/sda
1156                smartctl -l gplog,0x80,10+6 /dev/sda
1157                smartctl -l smartlog,0x80,10-15 /dev/sda
1158              print pages 10-15 of log 0x80 (first host vendor specific log).
1159
1160              The  hex  dump  format  is compatible with the ´xxd -r´ command.
1161              This command:
1162                smartctl -l gplog,0x11 /dev/sda | grep ^0 | xxd -r >log.bin
1163              writes a binary representation of the one sector log 0x11  (SATA
1164              Phy Event Counters) to file log.bin.
1165
1166              nvmelog,PAGE,SIZE  -  [NVMe  only]  [FreeBSD, Linux, Windows and
1167              Cygwin only] [NEW EXPERIMENTAL SMARTCTL FEATURE]  prints  a  hex
1168              dump  of  the first SIZE bytes from the NVMe log with identifier
1169              PAGE.  PAGE is a hexadecimal number in the  range  from  0x1  to
1170              0xff.   SIZE  is  a  hexadecimal number in the range from 0x4 to
1171              0x4000 (16 KiB).  WARNING: Do not specify the identifier  of  an
1172              unknown  log page.  Reading a log page may have undesirable side
1173              effects.
1174
1175              ssd - [ATA] prints the Solid State Device Statistics  log  page.
1176              This has the same effect as ´-l devstat,7´, see above.
1177
1178              ssd  -  [SCSI]  prints  the  Solid  State  Media percentage used
1179              endurance indicator. A value of 0  indicates  as  new  condition
1180              while  100 indicates the device is at the end of its lifetime as
1181              projected by the manufacturer. The value may reach 255.
1182
1183       -v   ID,FORMAT[:BYTEORDER][,NAME],   --vendorattribute=ID,FORMAT[:BYTE‐
1184       ORDER][,NAME]
1185              [ATA  only]  Sets  a  vendor-specific raw value print FORMAT, an
1186              optional BYTEORDER and an optional NAME for Attribute ID.   This
1187              option may be used multiple times.
1188
1189              The  Attribute ID can be in the range 1 to 255. If ´N´ is speci‐
1190              fied as ID, the settings for all Attributes are changed.
1191
1192              The optional BYTEORDER consists of 1 to 8  characters  from  the
1193              set ´012345rvwz´. The characters ´0´ to ´5´ select the byte 0 to
1194              5 from the 48-bit raw value, ´r´ selects the  reserved  byte  of
1195              the  attribute data block, ´v´ selects the normalized value, ´w´
1196              selects the worst value  and  ´z´  inserts  a  zero  byte.   The
1197              default  BYTEORDER is ´543210´ for all 48-bit formats, ´r543210´
1198              for the 54-bit formats, and ´543210wv´ for the  64-bit  formats.
1199              For  example,  ´-v  5,raw48:012345´  prints  the  raw  value  of
1200              attribute 5 with big endian instead of little endian byte order‐
1201              ing.
1202
1203              The  NAME  is  a  string of letters, digits and underscore.  Its
1204              length should not exceed 23 characters.  The ´-P showall´ option
1205              reports an error if this is the case.
1206
1207              -v  help  -  Prints (to STDOUT) a list of all valid arguments to
1208              this option, then exits.
1209
1210              Valid arguments for FORMAT are:
1211
1212              raw8 - Print the Raw value as six 8-bit unsigned  base-10  inte‐
1213              gers.   This  may  be useful for decoding the meaning of the Raw
1214              value.
1215
1216              raw16 - Print the Raw value as  three  16-bit  unsigned  base-10
1217              integers.   This  may  be useful for decoding the meaning of the
1218              Raw value.
1219
1220              raw48 - Print the Raw value as a 48-bit unsigned  base-10  inte‐
1221              ger.  This is the default for most attributes.
1222
1223              hex48  -  Print  the Raw value as a 12 digit hexadecimal number.
1224              This may be useful for decoding the meaning of the Raw value.
1225
1226              raw56 - Print the Raw value as a 54-bit unsigned  base-10  inte‐
1227              ger.   This  includes the reserved byte which follows the 48-bit
1228              raw value.
1229
1230              hex56 - Print the Raw value as a 14  digit  hexadecimal  number.
1231              This  includes  the  reserved  byte which follows the 48-bit raw
1232              value.
1233
1234              raw64 - Print the Raw value as a 64-bit unsigned  base-10  inte‐
1235              ger.   This  includes  two  bytes  from the normalized and worst
1236              attribute value.  This raw format is used by  some  SSD  devices
1237              with Indilinx controller.
1238
1239              hex64  -  Print  the Raw value as a 16 digit hexadecimal number.
1240              This includes two bytes from the normalized and worst  attribute
1241              value.   This raw format is used by some SSD devices with Indil‐
1242              inx controller.
1243
1244              min2hour - Raw Attribute is power-on time in minutes.   Its  raw
1245              value  will  be displayed in the form "Xh+Ym".  Here X is hours,
1246              and Y is minutes in the  range  0-59  inclusive.   Y  is  always
1247              printed with two digits, for example "06" or "31" or "00".
1248
1249              sec2hour  -  Raw Attribute is power-on time in seconds.  Its raw
1250              value will be displayed in  the  form  "Xh+Ym+Zs".   Here  X  is
1251              hours,  Y  is minutes in the range 0-59 inclusive, and Z is sec‐
1252              onds in the range 0-59 inclusive.  Y and Z  are  always  printed
1253              with two digits, for example "06" or "31" or "00".
1254
1255              halfmin2hour - Raw Attribute is power-on time, measured in units
1256              of 30 seconds.  This format is used by some Samsung disks.   Its
1257              raw  value  will  be  displayed  in the form "Xh+Ym".  Here X is
1258              hours, and Y is minutes in  the  range  0-59  inclusive.   Y  is
1259              always  printed  with  two  digits,  for example "06" or "31" or
1260              "00".
1261
1262              msec24hour32 - Raw Attribute is power-on time measured in 32-bit
1263              hours  and  24-bit milliseconds since last hour update.  It will
1264              be displayed in the form "Xh+Ym+Z.Ms".  Here X is  hours,  Y  is
1265              minutes, Z is seconds and M is milliseconds.
1266
1267              tempminmax  -  Raw Attribute is the disk temperature in Celsius.
1268              Info about Min/Max temperature is printed if available.  This is
1269              the  default for Attributes 190 and 194.  The recording interval
1270              (lifetime, last power cycle, last soft  reset)  of  the  min/max
1271              values is device specific.
1272
1273              temp10x  -  Raw  Attribute  is ten times the disk temperature in
1274              Celsius.
1275
1276              raw16(raw16) - Print the raw attribute as a 16-bit value and two
1277              optional  16-bit values if these words are nonzero.  This is the
1278              default for Attributes 5 and 196.
1279
1280              raw16(avg16) - Raw attribute is spin-up time.  It is printed  as
1281              a  16-bit  value  and  an optional "Average" 16-bit value if the
1282              word is nonzero.  This is the default for Attribute 3.
1283
1284              raw24(raw8) - Print the raw attribute  as  a  24-bit  value  and
1285              three optional 8-bit values if these bytes are nonzero.  This is
1286              the default for Attribute 9.
1287
1288              raw24/raw24 - Raw Attribute  contains  two  24-bit  values.  The
1289              first is the number of load cycles.  The second is the number of
1290              unload cycles.  The difference between these two values  is  the
1291              number  of  times  that  the  drive was unexpectedly powered off
1292              (also called an emergency unload).  As  a  rule  of  thumb,  the
1293              mechanical  stress created by one emergency unload is equivalent
1294              to that created by one hundred normal unloads.
1295
1296              raw24/raw32 - Raw attribute is an error rate which consists of a
1297              24-bit error count and a 32-bit total count.
1298
1299              The following old arguments to ´-v´ are also still valid:
1300
1301              9,minutes - same as: 9,min2hour,Power_On_Minutes.
1302
1303              9,seconds - same as: 9,sec2hour,Power_On_Seconds.
1304
1305              9,halfminutes - same as: 9,halfmin2hour,Power_On_Half_Minutes.
1306
1307              9,temp - same as: 9,tempminmax,Temperature_Celsius.
1308
1309              192,emergencyretractcyclect          -          same         as:
1310              192,raw48,Emerg_Retract_Cycle_Ct
1311
1312              193,loadunload - same as: 193,raw24/raw24.
1313
1314              194,10xCelsius - same as: 194,temp10x,Temperature_Celsius_x10.
1315
1316              194,unknown - same as: 194,raw48,Unknown_Attribute.
1317
1318              197,increasing - same as: 197,raw48,Total_Pending_Sectors.  Also
1319              means  that  Attribute number 197 (Current Pending Sector Count)
1320              is not reset  if  uncorrectable  sectors  are  reallocated  (see
1321              smartd.conf(5) man page).
1322
1323              198,increasing  -  same  as:  198,raw48,Total_Offl_Uncorrectabl.
1324              Also means that Attribute number 198 (Offline Uncorrectable Sec‐
1325              tor Count) is not reset if uncorrectable sectors are reallocated
1326              (see smartd.conf(5) man page).
1327
1328              198,offlinescanuncsectorct    -    same    as:    198,raw48,Off‐
1329              line_Scan_UNC_SectCt.
1330
1331              200,writeerrorcount - same as: 200,raw48,Write_Error_Count.
1332
1333              201,detectedtacount - same as: 201,raw48,Detected_TA_Count.
1334
1335              220,temp - same as: 220,tempminmax,Temperature_Celsius.
1336
1337       -F TYPE, --firmwarebug=TYPE
1338              [ATA  only]  Modifies the behavior of smartctl to compensate for
1339              some known and understood device firmware or driver  bug.   This
1340              option may be used multiple times.  The valid arguments are:
1341
1342              none  - Assume that the device firmware obeys the ATA specifica‐
1343              tions.  This is the default, unless the device has  presets  for
1344              ´-F´  in  the  drive database.  Using this option on the command
1345              line will override any preset values.
1346
1347              nologdir - Suppresses read attempts of SMART or  GP  Log  Direc‐
1348              tory.   Support  for  all  standard  logs  is assumed without an
1349              actual check.  Some Intel SSDs may freeze if log  address  0  is
1350              read.
1351
1352              samsung - In some Samsung disks (example: model SV4012H Firmware
1353              Version: RM100-08) some of the two- and four-byte quantities  in
1354              the  SMART data structures are byte-swapped (relative to the ATA
1355              specification).  Enabling this option tells smartctl to evaluate
1356              these  quantities  in byte-reversed order.  Some signs that your
1357              disk needs this option are (1) no self-test  log  printed,  even
1358              though  you  have  run self-tests; (2) very large numbers of ATA
1359              errors reported in the ATA error log; (3) strange and impossible
1360              values for the ATA error log timestamps.
1361
1362              samsung2  -  In  some  Samsung  disks  the  number of ATA errors
1363              reported is byte swapped.  Enabling this option  tells  smartctl
1364              to  evaluate this quantity in byte-reversed order. An indication
1365              that your Samsung disk needs this option is that  the  self-test
1366              log  is  printed correctly, but there are a very large number of
1367              errors in the SMART error log.  This is because the error  count
1368              is  byte  swapped.   Thus  a disk with five errors (0x0005) will
1369              appear to have 20480 errors (0x5000).
1370
1371              samsung3 - Some Samsung disks (at least  SP2514N  with  Firmware
1372              VF100-37) report a self-test still in progress with 0% remaining
1373              when the test was already completed. Enabling this option  modi‐
1374              fies  the  output of the self-test execution status (see options
1375              ´-c´ or ´-a´ above) accordingly.
1376
1377              xerrorlba - Fixes LBA byte ordering  in  Extended  Comprehensive
1378              SMART  error  log.   Some  disks use little endian byte ordering
1379              instead of ATA register ordering to specifiy the  LBA  addresses
1380              in the log entries.
1381
1382              swapid  -  Fixes byte swapped ATA identify strings (device name,
1383              serial number, firmware version) returned by some  buggy  device
1384              drivers.
1385
1386       -P TYPE, --presets=TYPE
1387              [ATA  only]  Specifies  whether  smartctl  should use any preset
1388              options that are available for this drive. By  default,  if  the
1389              drive is recognized in the smartmontools database, then the pre‐
1390              sets are used.
1391
1392              The argument show will show any preset options  for  your  drive
1393              and  the  argument  showall  will  show  all known drives in the
1394              smartmontools database, along with  their  preset  options.   If
1395              there  are  no presets for your drive and you think there should
1396              be (for example, a -v or -F option is needed to get smartctl  to
1397              display  correct  values)  then please contact the smartmontools
1398              developers so that this information can be added to  the  smart‐
1399              montools  database.   Contact  information is at the end of this
1400              man page.
1401
1402              The valid arguments to this option are:
1403
1404              use - if a drive is recognized, then use the stored presets  for
1405              it.   This  is  the default. Note that presets will NOT override
1406              additional Attribute interpretation (´-v N,something´)  command-
1407              line options or explicit ´-F´ command-line options..
1408
1409              ignore - do not use presets.
1410
1411              show  -  show if the drive is recognized in the database, and if
1412              so, its presets, then exit.
1413
1414              showall - list all recognized drives, and the presets  that  are
1415              set  for  them,  then exit.  This also checks the drive database
1416              regular expressions and settings for syntax errors.
1417
1418              The ´-P showall´ option takes up to two  optional  arguments  to
1419              match a specific drive type and firmware version. The command:
1420                smartctl -P showall
1421              lists all entries, the command:
1422                smartctl -P showall ´MODEL´
1423              lists all entries matching MODEL, and the command:
1424                smartctl -P showall ´MODEL´ ´FIRMWARE´
1425              lists  all  entries  for this MODEL and a specific FIRMWARE ver‐
1426              sion.
1427
1428       -B [+]FILE, --drivedb=[+]FILE
1429              [ATA only] Read the drive database from FILE.  The new  database
1430              replaces the built in database by default.  If ´+´ is specified,
1431              then the new entries prepend the built in entries.
1432
1433              Optional  entries  are  read  from   the   file   /etc/smartmon‐
1434              tools/smart_drivedb.h if this option is not specified.
1435
1436              If  /usr/share/smartmontools/drivedb.h  is present, the contents
1437              of this file is used instead of the built in table.
1438
1439              Run /usr/sbin/update-smart-drivedb to update this file from  the
1440              smartmontools SVN repository.
1441
1442              The  database  files  use  the same C/C++ syntax that is used to
1443              initialize the built in database array. C/C++ style comments are
1444              allowed.  Example:
1445
1446                /* Full entry: */
1447                {
1448                  "Model family",    // Info about model family/series.
1449                  "MODEL1.*REGEX",   // Regular expression to match model of device.
1450                  "VERSION.*REGEX",  // Regular expression to match firmware version(s).
1451                  "Some warning",    // Warning message.
1452                  "-v 9,minutes"     // String of preset -v and -F options.
1453                },
1454                /* Minimal entry: */
1455                {
1456                  "",                // No model family/series info.
1457                  "MODEL2.*REGEX",   // Regular expression to match model of device.
1458                  "",                // All firmware versions.
1459                  "",                // No warning.
1460                  ""                 // No options preset.
1461                },
1462                /* USB ID entry: */
1463                {
1464                  "USB: Device; Bridge", // Info about USB device and bridge name.
1465                  "0x1234:0xabcd",   // Regular expression to match vendor:product ID.
1466                  "0x0101",          // Regular expression to match bcdDevice.
1467                  "",                // Not used.
1468                  "-d sat"           // String with device type option.
1469                },
1470                /* ... */
1471
1472
1473       SMART RUN/ABORT OFFLINE TEST AND self-test OPTIONS:
1474
1475       -t TEST, --test=TEST
1476              Executes  TEST immediately.  The ´-C´ option can be used in con‐
1477              junction with this option to run the short or long (and also for
1478              ATA devices, selective or conveyance) self-tests in captive mode
1479              (known as "foreground mode" for SCSI devices).  Note  that  only
1480              one test type can be run at a time, so only one test type should
1481              be specified per command line.  Note also that if a computer  is
1482              shutdown  or  power  cycled  during  a self-test, no harm should
1483              result.  The self-test will either be  aborted  or  will  resume
1484              automatically.
1485
1486              All  ´-t TEST´ commands can be given during normal system opera‐
1487              tion unless captive mode (´-C´ option) is used.  A running self-
1488              test  can,  however, degrade performance of the drive.  Frequent
1489              I/O requests from the operating system increase the duration  of
1490              a test.  These impacts may vary from device to device.
1491
1492              If  a  test  failure  occurs then the device may discontinue the
1493              testing and report the result immediately.
1494
1495              The valid arguments to this option are:
1496
1497              offline - [ATA] runs SMART Immediate Offline Test.  This immedi‐
1498              ately  starts  the  test  described  above.  This command can be
1499              given during normal system operation.  The effects of this  test
1500              are  visible only in that it updates the SMART Attribute values,
1501              and if errors are found they will appear in the SMART error log,
1502              visible with the ´-l error´ option.
1503
1504              If  the  ´-c´  option  to smartctl shows that the device has the
1505              "Suspend Offline collection upon new  command"  capability  then
1506              you  can  track the progress of the Immediate Offline test using
1507              the ´-c´ option to smartctl.  If the ´-c´ option show  that  the
1508              device has the "Abort Offline collection upon new command" capa‐
1509              bility then most commands will abort the Immediate Offline Test,
1510              so  you  should  not  try to track the progress of the test with
1511              ´-c´, as it will abort the test.
1512
1513              offline - [SCSI] runs the default self test  in  foreground.  No
1514              entry is placed in the self test log.
1515
1516              short - [ATA] runs SMART Short Self Test (usually under ten min‐
1517              utes).  This command can be given during normal system operation
1518              (unless  run in captive mode - see the ´-C´ option below).  This
1519              is a test in a different category than the  immediate  or  auto‐
1520              matic  offline tests.  The "Self" tests check the electrical and
1521              mechanical performance as well as the read  performance  of  the
1522              disk.   Their  results  are reported in the Self Test Error Log,
1523              readable with the ´-l selftest´ option.  Note that on some disks
1524              the  progress of the self-test can be monitored by watching this
1525              log during the self-test; with other disks use the  ´-c´  option
1526              to monitor progress.
1527
1528              short - [SCSI] runs the "Background short" self-test.
1529
1530              long  -  [ATA]  runs SMART Extended Self Test (tens of minutes).
1531              This is a longer and more thorough version  of  the  Short  Self
1532              Test  described above.  Note that this command can be given dur‐
1533              ing normal system operation (unless run in captive  mode  -  see
1534              the ´-C´ option below).
1535
1536              long - [SCSI] runs the "Background long" self-test.
1537
1538              conveyance  - [ATA only] runs a SMART Conveyance Self Test (min‐
1539              utes).  This self-test routine is intended  to  identify  damage
1540              incurred  during transporting of the device. This self-test rou‐
1541              tine should take on the order of minutes to complete.  Note that
1542              this command can be given during normal system operation (unless
1543              run in captive mode - see the ´-C´ option below).
1544
1545              select,N-M, select,N+SIZE - [ATA only] runs  a  SMART  Selective
1546              Self  Test,  to  test  a  range  of disk Logical Block Addresses
1547              (LBAs), rather than the entire disk.  Each range of LBAs that is
1548              checked  is  called  a "span" and is specified by a starting LBA
1549              (N) and an ending LBA (M) with N less than or equal  to  M.  The
1550              range  can  also  be specified as N+SIZE. A span at the end of a
1551              disk can be specified by N-max.
1552
1553              For example the commands:
1554                smartctl -t select,10-20 /dev/sda
1555                smartctl -t select,10+11 /dev/sda
1556              both runs a self test on one span  consisting  of  LBAs  ten  to
1557              twenty (inclusive). The command:
1558                smartctl -t select,100000000-max /dev/sda
1559              run  a  self  test from LBA 100000000 up to the end of the disk.
1560              The ´-t´ option can be given up to five times,  to  test  up  to
1561              five spans.  For example the command:
1562                smartctl -t select,0-100 -t select,1000-2000 /dev/sda
1563              runs  a  self test on two spans.  The first span consists of 101
1564              LBAs and the second span consists of 1001 LBAs.  Note  that  the
1565              spans can overlap partially or completely, for example:
1566                smartctl -t select,0-10 -t select,5-15 -t select,10-20 /dev/sda
1567              The  results  of  the  selective self-test can be obtained (both
1568              during and after the test) by printing the SMART self-test  log,
1569              using the ´-l selftest´ option to smartctl.
1570
1571              Selective  self tests are particularly useful as disk capacities
1572              increase: an extended self test (smartctl -t long) can take sev‐
1573              eral  hours.  Selective self-tests are helpful if (based on SYS‐
1574              LOG error messages, previous failed self-tests, or  SMART  error
1575              log  entries)  you  suspect  that a disk is having problems at a
1576              particular range of Logical Block Addresses (LBAs).
1577
1578              Selective self-tests can be run during normal  system  operation
1579              (unless done in captive mode - see the ´-C´ option below).
1580
1581              The  following  variants  of the selective self-test command use
1582              spans based on the ranges from past tests already stored on  the
1583              disk:
1584
1585              select,redo[+SIZE]  -  [ATA  only] redo the last SMART Selective
1586              Self Test using the same LBA range. The starting LBA is  identi‐
1587              cal  to  the LBA used by last test, same for ending LBA unless a
1588              new span size is specified by optional +SIZE argument.
1589
1590              For example the commands:
1591                smartctl -t select,10-20 /dev/sda
1592                smartctl -t select,redo /dev/sda
1593                smartctl -t select,redo+20 /dev/sda
1594              have the same effect as:
1595                smartctl -t select,10-20 /dev/sda
1596                smartctl -t select,10-20 /dev/sda
1597                smartctl -t select,10-29 /dev/sda
1598
1599              select,next[+SIZE] - [ATA only] runs a SMART Selective Self Test
1600              on  the  LBA range which follows the range of the last test. The
1601              starting LBA is set to (ending LBA +1) of the last test.  A  new
1602              span size may be specified by the optional +SIZE argument.
1603
1604              For example the commands:
1605                smartctl -t select,0-999 /dev/sda
1606                smartctl -t select,next /dev/sda
1607                smartctl -t select,next+2000 /dev/sda
1608              have the same effect as:
1609                smartctl -t select,0-999 /dev/sda
1610                smartctl -t select,1000-1999 /dev/sda
1611                smartctl -t select,2000-3999 /dev/sda
1612
1613              If  the  last  test  ended  at the last LBA of the disk, the new
1614              range starts at LBA 0. The span size of the last span of a  disk
1615              is  adjusted  such  that  the total number of spans to check the
1616              full  disk  will  not  be  changed  by  future   uses   of   ´-t
1617              select,next´.
1618
1619              select,cont[+SIZE] - [ATA only] performs a ´redo´ (above) if the
1620              self test status reports that the last test was aborted  by  the
1621              host. Otherwise it run the ´next´ (above) test.
1622
1623              afterselect,on - [ATA only] perform an offline read scan after a
1624              Selective self-test has completed.  This  option  must  be  used
1625              together  with  one  or more of the select,N-M options above. If
1626              the LBAs that have been specified  in  the  Selective  self-test
1627              pass the test with no errors found, then read scan the remainder
1628              of the disk.  If the device is powered-cycled  while  this  read
1629              scan is in progress, the read scan will be automatically resumed
1630              after a time specified by the pending timer  (see  below).   The
1631              value of this option is preserved between selective self-tests.
1632
1633              afterselect,off  -  [ATA only] do not read scan the remainder of
1634              the disk after a Selective self-test has completed.  This option
1635              must  be use together with one or more of the select,N-M options
1636              above.  The value of this option is preserved between  selective
1637              self-tests.
1638
1639              pending,N  -  [ATA only] set the pending offline read scan timer
1640              to N minutes.  Here N is an integer in the range from 0 to 65535
1641              inclusive.   If  the  device  is  powered off during a read scan
1642              after a Selective self-test, then resume the test  automatically
1643              N minutes after power-up.  This option must be use together with
1644              one or more of the select,N-M options above. The value  of  this
1645              option is preserved between selective self-tests.
1646
1647              vendor,N  - [ATA only] issues the ATA command SMART EXECUTE OFF-
1648              LINE IMMEDIATE with subcommand N in LBA LOW register.  The  sub‐
1649              command  is  specified as a hex value in the range 0x00 to 0xff.
1650              Subcommands 0x40-0x7e and 0x90-0xff are reserved for vendor spe‐
1651              cific  use,  see  table 61 of T13/1699-D Revision 6a (ATA8-ACS).
1652              Note that the subcommands 0x00-0x04,0x7f,0x81-0x84 are supported
1653              by  other  smartctl  options (e.g. 0x01: ´-t short´, 0x7f: ´-X´,
1654              0x82: ´-C -t long´).
1655
1656              WARNING: Only run subcommands documented by the  vendor  of  the
1657              device.
1658
1659              Example  for some Intel SSDs only: The subcommand 0x40 (´-t ven‐
1660              dor,0x40´) clears the timed workload  related  SMART  attributes
1661              (226,  227,  228).  Note that the raw values of these attributes
1662              are held at 65535 (0xffff) until the workload timer  reaches  60
1663              minutes.
1664
1665              force - start new self-test even if another test is already run‐
1666              ning.  By default a running self-test will not be interrupted to
1667              begin another test.
1668
1669       -C, --captive
1670              [ATA]  Runs self-tests in captive mode.  This has no effect with
1671              ´-t offline´ or if the ´-t´ option is not used.
1672
1673              WARNING: Tests run in captive mode may busy out  the  drive  for
1674              the  length of the test.  Only run captive tests on drives with‐
1675              out any mounted partitions!
1676
1677              [SCSI] Runs the self-test in "Foreground" mode.
1678
1679       -X, --abort
1680              Aborts non-captive SMART Self Tests.   Note  that  this  command
1681              will  abort the Offline Immediate Test routine only if your disk
1682              has the "Abort Offline collection upon new command" capability.
1683
1684

ATA, SCSI command sets and SAT

1686       In the past there has been a clear distinction between storage  devices
1687       that  used  the  ATA  and SCSI command sets. This distinction was often
1688       reflected in their device naming and hardware. Now various SCSI  trans‐
1689       ports  (e.g.  SAS,  FC  and  iSCSI) can interconnect to both SCSI disks
1690       (e.g. FC and SAS) and ATA disks (especially SATA). USB  and  IEEE  1394
1691       storage  devices  use the SCSI command set externally but almost always
1692       contain ATA or SATA disks (or flash). The storage  subsystems  in  some
1693       operating  systems  have  started to remove the distinction between ATA
1694       and SCSI in their device naming policies.
1695
1696       99% of operations that an OS  performs  on  a  disk  involve  the  SCSI
1697       INQUIRY,  READ  CAPACITY, READ and WRITE commands, or their ATA equiva‐
1698       lents. Since the SCSI commands are slightly more general than their ATA
1699       equivalents,  many  OSes  are generating SCSI commands (mainly READ and
1700       WRITE) and letting a lower level translate them to  their  ATA  equiva‐
1701       lents  as the need arises. An important note here is that "lower level"
1702       may be in external equipment and hence outside the control of an OS.
1703
1704       SCSI to ATA Translation (SAT) is a standard (ANSI INCITS 431-2007) that
1705       specifies  how this translation is done. For the other 1% of operations
1706       that an OS performs on a disk, SAT provides two options.  First  is  an
1707       optional  ATA  PASS-THROUGH  SCSI command (there are two variants). The
1708       second is a translation from the closest  SCSI  command.  Most  current
1709       interest is in the "pass-through" option.
1710
1711       The  relevance to smartmontools (and hence smartctl) is that its inter‐
1712       actions with disks fall solidly into the "1%" category. So even if  the
1713       OS  can  happily treat (and name) a disk as "SCSI", smartmontools needs
1714       to detect the native command set and act accordingly.  As more  storage
1715       manufacturers  (including external SATA drives) comply with SAT, smart‐
1716       montools is able to automatically distinguish the native command set of
1717       the  device. In some cases the '-d sat' option is needed on the command
1718       line.
1719
1720       There are also virtual disks which typically have no useful information
1721       to  convey  to  smartmontools,  but could conceivably in the future. An
1722       example of a virtual disk is the OS's view of a RAID 1 box.  There  are
1723       most  likely  two SATA disks inside a RAID 1 box. Addressing those SATA
1724       disks from a distant OS  is  a  challenge  for  smartmontools.  Another
1725       approach  is  running  a  tool like smartmontools inside the RAID 1 box
1726       (e.g.  a Network Attached Storage (NAS) box) and fetching the logs  via
1727       a browser.
1728
1729

EXAMPLES

1731       smartctl -a /dev/sda
1732       Print a large amount of SMART information for drive /dev/sda .
1733
1734       smartctl -s off /dev/sdd
1735       Disable SMART monitoring and data log collection on drive /dev/sdd .
1736
1737       smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda
1738       Enable  SMART on drive /dev/sda, enable automatic offline testing every
1739       four hours, and enable autosaving of SMART Attributes.  This is a  good
1740       start-up line for your system´s init files.  You can issue this command
1741       on a running system.
1742
1743       smartctl -t long /dev/sdc
1744       Begin an extended self-test of drive /dev/sdc.  You can issue this com‐
1745       mand on a running system.  The results can be seen in the self-test log
1746       visible with the ´-l selftest´ option after it has completed.
1747
1748       smartctl -s on -t offline /dev/sda
1749       Enable SMART on the disk, and begin an immediate offline test of  drive
1750       /dev/sda.  You can issue this command on a running system.  The results
1751       are only used to update the SMART Attributes,  visible  with  the  ´-A´
1752       option.  If any device errors occur, they are logged to the SMART error
1753       log, which can be seen with the ´-l error´ option.
1754
1755       smartctl -A -v 9,minutes /dev/sda
1756       Shows the vendor Attributes, when the disk  stores  its  power-on  time
1757       internally in minutes rather than hours.
1758
1759       smartctl -q errorsonly -H -l selftest /dev/sda
1760       Produces  output only if the device returns failing SMART status, or if
1761       some of the logged self-tests ended with errors.
1762
1763       smartctl -q silent -a /dev/sda
1764       Examine all SMART data for device /dev/sda, but produce no printed out‐
1765       put.  You must use the exit status (the $?  shell variable) to learn if
1766       any Attributes are out of bound, if the SMART  status  is  failing,  if
1767       there  are errors recorded in the self-test log, or if there are errors
1768       recorded in the disk error log.
1769
1770       smartctl -a -d 3ware,0 /dev/sda
1771       Examine all SMART data for the first ATA disk connected to a 3ware RAID
1772       controller card.
1773
1774       smartctl -a -d 3ware,0 /dev/twe0
1775       Examine all SMART data for the first ATA disk connected to a 3ware RAID
1776       6000/7000/8000 controller card.
1777
1778       smartctl -a -d 3ware,0 /dev/twa0
1779       Examine all SMART data for the first ATA disk connected to a 3ware RAID
1780       9000 controller card.
1781
1782       smartctl -a -d 3ware,0 /dev/twl0
1783       Examine all SMART data for the first SATA (not SAS) disk connected to a
1784       3ware RAID 9750 controller card.
1785
1786       smartctl -t short -d 3ware,3 /dev/sdb
1787       Start a short self-test on the fourth ATA disk connected to  the  3ware
1788       RAID controller card which is the second SCSI device /dev/sdb.
1789
1790       smartctl -t long -d areca,4 /dev/sg2
1791       Start  a  long  self-test on the fourth SATA disk connected to an Areca
1792       RAID controller addressed by /dev/sg2.
1793
1794       smartctl -a -d hpt,1/3 /dev/sda (under Linux)
1795       smartctl -a -d hpt,1/3 /dev/hptrr (under FreeBSD)
1796       Examine all SMART data for the (S)ATA disk directly  connected  to  the
1797       third channel of the first HighPoint RocketRAID controller card.
1798
1799       smartctl -t short -d hpt,1/1/2 /dev/sda (under Linux)
1800       smartctl -t short -d hpt,1/1/2 /dev/hptrr (under FreeBSD)
1801       Start  a  short self-test on the (S)ATA disk connected to second pmport
1802       on the first channel of the first HighPoint RocketRAID controller card.
1803
1804       smartctl -t select,10-100 -t select,30-300 -t afterselect,on -t pending,45 /dev/sda
1805       Run a selective self-test on LBAs 10 to 100 and 30 to 300.   After  the
1806       these  LBAs  have been tested, read-scan the remainder of the disk.  If
1807       the disk is power-cycled during the read-scan, resume the scan 45  min‐
1808       utes after power to the device is restored.
1809
1810       smartctl -a -d cciss,0 /dev/cciss/c0d0
1811       Examine  all  SMART  data  for the first SCSI disk connected to a cciss
1812       RAID controller card.
1813
1814

EXIT STATUS

1816       The exit statuses of smartctl are defined by a bitmask.  If all is well
1817       with  the  disk,  the  exit status (return value) of smartctl is 0 (all
1818       bits turned off).  If a problem occurs, or an error,  potential  error,
1819       or  fault  is  detected,  then  a non-zero status is returned.  In this
1820       case, the eight different bits in the exit status  have  the  following
1821       meanings  for  ATA disks; some of these values may also be returned for
1822       SCSI disks.
1823
1824       Bit 0: Command line did not parse.
1825
1826       Bit 1: Device open failed, device did not  return  an  IDENTIFY  DEVICE
1827              structure,  or  device  is  in a low-power mode (see ´-n´ option
1828              above).
1829
1830       Bit 2: Some SMART or other ATA command to the disk failed, or there was
1831              a  checksum  error  in  a  SMART data structure (see ´-b´ option
1832              above).
1833
1834       Bit 3: SMART status check returned "DISK FAILING".
1835
1836       Bit 4: We found prefail Attributes <= threshold.
1837
1838       Bit 5: SMART status check returned "DISK OK" but  we  found  that  some
1839              (usage  or  prefail)  Attributes  have been <= threshold at some
1840              time in the past.
1841
1842       Bit 6: The device error log contains records of errors.
1843
1844       Bit 7: The device self-test log contains records of errors.  [ATA only]
1845              Failed  self-tests outdated by a newer successful extended self-
1846              test are ignored.
1847
1848       To test within the shell for whether or  not  the  different  bits  are
1849       turned on or off, you can use the following type of construction (which
1850       should work with any POSIX compatible shell):
1851       smartstat=$(($? & 8))
1852       This looks at only at bit 3 of the exit status $?  (since 8=2^3).   The
1853       shell  variable  $smartstat  will  be  nonzero  if  SMART  status check
1854       returned "disk failing" and zero otherwise.
1855
1856       This shell script prints all status bits:
1857       val=$?; mask=1
1858       for i in 0 1 2 3 4 5 6 7; do
1859         echo "Bit $i: $(((val & mask) && 1))"
1860         mask=$((mask << 1))
1861       done
1862
1863

FILES

1865       /usr/sbin/smartctl
1866              full path of this executable.
1867
1868       /usr/share/smartmontools/drivedb.h
1869              drive database (see ´-B´ option).
1870
1871       /etc/smartmontools/smart_drivedb.h
1872              optional local drive database (see ´-B´ option).
1873
1874

AUTHORS

1876       Bruce Allen (project initiator),
1877       Christian Franke  (project  manager,  Windows  port  and  all  sort  of
1878       things),
1879       Douglas Gilbert (SCSI subsystem),
1880       Volker Kuhlmann (moderator of support and database mailing list),
1881       Gabriele Pohl (wiki & development team support),
1882       Alex Samorukov (FreeBSD port and more, new Trac wiki).
1883
1884       Many  other  individuals  have  made contributions and corrections, see
1885       AUTHORS, ChangeLog and repository files.
1886
1887       The first smartmontools code was derived from the  smartsuite  package,
1888       written by Michael Cornwell and Andre Hedrick.
1889
1890

REPORTING BUGS

1892       To submit a bug report, create a ticket in smartmontools wiki:
1893       <http://www.smartmontools.org/>.
1894       Alternatively send the info to the smartmontools support mailing list:
1895       <https://lists.sourceforge.net/lists/listinfo/smartmontools-support>.
1896
1897

SEE ALSO

1899       smartd(8).
1900       update-smart-drivedb(8).
1901
1902

REFERENCES

1904       Please  see  the following web site for more info: http://www.smartmon
1905       tools.org/
1906
1907       An introductory article about smartmontools is  Monitoring  Hard  Disks
1908       with  SMART,  by Bruce Allen, Linux Journal, January 2004, pages 74-77.
1909       This is http://www.linuxjournal.com/article/6983 online.
1910
1911       If you would like to understand better how SMART  works,  and  what  it
1912       does,  a good place to start is with Sections 4.8 and 6.54 of the first
1913       volume of the ´AT Attachment  with  Packet  Interface-7´  (ATA/ATAPI-7)
1914       specification  Revision  4b.   This  documents  the SMART functionality
1915       which the smartmontools utilities provide access to.
1916
1917       The functioning of SMART was originally defined by the SFF-8035i  revi‐
1918       sion 2 and the SFF-8055i revision 1.4 specifications.  These are publi‐
1919       cations of the Small Form Factors (SFF) Committee.
1920
1921       Links to these and other documents may be found on the  Links  page  of
1922       the smartmontools Wiki at http://www.smartmontools.org/wiki/Links .
1923
1924

PACKAGE VERSION

1926       smartmontools-6.5 2016-05-07 r4318
1927       $Id: smartctl.8.in 4311 2016-04-27 21:03:01Z chrfranke $
1928
1929
1930
1931smartmontools-6.5                 2016-05-07                       SMARTCTL(8)
Impressum