1SMARTCTL(8) SMART Monitoring Tools SMARTCTL(8)
2
3
4
6 smartctl - Control and Monitor Utility for SMART Disks
7
8
10 smartctl [options] device
11
12
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 SCSI tape drives and changers (see
27 TAPE DRIVES below).
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' op‐
32 tion (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 de‐
36 vices. For SCSI Tape Drives and Changers use the devices
37 "/dev/nst*" and "/dev/sg*". For disks behind 3ware con‐
38 trollers you may need "/dev/sd[a-z]" or "/dev/twe[0-9]",
39 "/dev/twa[0-9]" or "/dev/twl[0-9]": see details below. For
40 disks behind HighPoint RocketRAID controllers you may need
41 "/dev/sd[a-z]". For disks behind Areca SATA RAID controllers,
42 you need "/dev/sg[2-9]" (note that smartmontools interacts
43 with the Areca controllers via a SCSI generic device which is
44 different than the SCSI device used for reading and writing
45 data)! For HP Smart Array RAID controllers, there are three
46 currently supported drivers: cciss, hpsa, and hpahcisr. For
47 disks accessed via the cciss driver the device nodes are of
48 the form "/dev/cciss/c[0-9]d0". For disks accessed via the
49 hpahcisr and hpsa drivers, the device nodes you need are
50 "/dev/sg[0-9]*". ("lsscsi -g" is helpful in determining which
51 scsi generic device node corresponds to which device.) Use
52 the nodes corresponding to the RAID controllers, not the nodes
53 corresponding to logical drives. See the -d option below, as
54 well. Use the forms "/dev/nvme[0-9]" (broadcast namespace) or
55 "/dev/nvme[0-9]n[1-9]" (specific namespace 1-9) for NVMe de‐
56 vices.
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 smartctl guesses the device type if possible. If necessary, the '-d'
63 option can be used to override this guess.
64
65 Note that the printed output of smartctl displays most numerical values
66 in base 10 (decimal), but some values are displayed in base 16 (hexa‐
67 decimal). To distinguish them, the base 16 values are always displayed
68 with a leading "0x", for example: "0xff". This man page follows the
69 same convention.
70
71
73 The options are grouped below into several categories. smartctl will
74 execute the corresponding commands in the order: INFORMATION, EN‐
75 ABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
76
77
78 SHOW INFORMATION OPTIONS:
79
80 -h, --help, --usage
81 Prints a usage message to STDOUT and exits.
82
83 -V, --version, --copyright, --license
84 Prints version, copyright, license, home page and SVN revision
85 information for your copy of smartctl to STDOUT and then exits.
86
87 -i, --info
88 Prints the device model number, serial number, firmware version,
89 and ATA Standard version/revision information. Says if the de‐
90 vice supports SMART, and if so, whether SMART support is cur‐
91 rently enabled or disabled. If the device supports Logical
92 Block Address mode (LBA mode) print current user drive capacity
93 in bytes. (If drive has a user protected area reserved, or is
94 "clipped", this may be smaller than the potential maximum drive
95 capacity.) Indicates if the drive is in the smartmontools data‐
96 base (see '-v' options below). If so, the drive model family
97 may also be printed. If '-n' (see below) is specified, the
98 power mode of the drive is printed.
99
100 [NVMe] For NVMe devices the information is obtained from the
101 Identify Controller and the Identify Namespace data structure.
102
103 --identify[=[w][nvb]]
104 [ATA only] Prints an annotated table of the IDENTIFY DEVICE
105 data. By default, only valid words (words not equal to 0x0000
106 or 0xffff) and nonzero bits and bit fields are printed. This
107 can be changed by the optional argument which consists of one or
108 two characters from the set 'wnvb'. The character 'w' enables
109 printing of all 256 words. The character 'n' suppresses print‐
110 ing of bits, 'v' enables printing of all bits from valid words,
111 'b' enables printing of all bits. For example '--identify=n'
112 (valid words, no bits) produces the shortest output and '--iden‐
113 tify=wb' (all words, all bits) produces the longest output.
114
115 -a, --all
116 Prints all SMART information about the disk. For ATA devices
117 this is equivalent to
118 '-H -i -c -A -l error -l selftest -l selective'
119 and for SCSI, this is equivalent to
120 '-H -i -A -l error -l selftest'.
121 For NVMe, this is equivalent to
122 '-H -i -c -A -l error'.
123 Note that for ATA disks this does not enable the non-SMART op‐
124 tions and the SMART options which require support for 48-bit ATA
125 commands.
126
127 -x, --xall
128 Prints all SMART and non-SMART information about the device.
129 For ATA devices this is equivalent to
130 '-H -i -g all -g wcreorder -c -A -f brief -l xerror,error -l
131 xselftest,selftest -l selective -l directory -l scttemp -l sc‐
132 terc -l devstat -l defects -l sataphy'.
133 and for SCSI disks, this is equivalent to
134 '-H -i -g all -A -l error -l selftest -l background -l sasphy -l
135 defects -l env_rep'.
136 and for SCSI zoned disks, add -l zdevstat
137 and for SCSI tape drivers and changers, add -l tapedevstat
138 For NVMe, this is equivalent to
139 '-H -i -c -A -l error'.
140
141 --scan Scans for devices and prints each device name, device type and
142 protocol ([ATA] or [SCSI]) info. May be used in conjunction
143 with '-d TYPE' to restrict the scan to a specific TYPE. See
144 also info about platform specific device scan and the DEVICESCAN
145 directive on smartd(8) man page.
146
147 --scan-open
148 Same as --scan, but also tries to open each device before print‐
149 ing device info. The device open may change the device type due
150 to autodetection (see also '-d test').
151
152 This option can be used to create a draft smartd.conf file. All
153 options after '--' are appended to each output line. For exam‐
154 ple:
155 smartctl --scan-open -- -a -W 4,45,50 -m admin@work > smartd.conf
156
157 Multiple '-d TYPE' options may be specified with '--scan[-open]'
158 to combine the scan results of more than one TYPE.
159
160 -g NAME, --get=NAME
161 Get non-SMART device settings. See '-s, --set' below for fur‐
162 ther info.
163
164
165 RUN-TIME BEHAVIOR OPTIONS:
166
167 -j, --json[=cgiosuvy]
168 Enables JSON or YAML output mode.
169
170 The output could be modified or enhanced by the optional argu‐
171 ment which consists of one or more characters from the set
172 'cgiosuvy':
173 'c': Outputs compact format without extra spaces and newlines.
174 By default, output is pretty-printed. If used with YAML format,
175 the indentation of arrays is reduced.
176 'g': Outputs JSON structure as single assignments to allow the
177 usage of grep. Each assignment reflects the absolute path of a
178 value. The syntax is compatible with gron:
179 'json.KEY1[INDEX2].KEY3 = VALUE;'.
180 'o': Includes the full original plaintext output of smartctl as
181 a JSON array 'smartctl.output[]'.
182 's': Outputs JSON object elements sorted by key. By default,
183 object elements are ordered as generated internally.
184 'v': Enables verbose output of possible unsafe integers. If
185 specified, values which may exceed JSON safe integer (53-bit)
186 range are always output as a number (with some 'KEY') and a
187 string ('KEY_s'), regardless of the actual value. Values which
188 may exceed 64-bit range are also output as a little endian byte
189 array ('KEY_le'). By default, the additional elements are only
190 output if the value actually exceeds the range.
191 'y': [NEW EXPERIMENTAL SMARTCTL FEATURE] Outputs in YAML format.
192
193 The following two arguments are primarily indented for develop‐
194 ment:
195 'i': Includes lines from the plaintext output which print info
196 already implemented for JSON output. The lines appear as
197 strings with key 'smartctl_NNNN_i'.
198 'u': Includes lines from the plaintext output which print info
199 still unimplemented for JSON output. The lines appear as
200 strings with key 'smartctl_NNNN_u'.
201
202 -q TYPE, --quietmode=TYPE
203 Specifies that smartctl should run in one of the quiet modes de‐
204 scribed here. The valid arguments to this option are:
205
206 errorsonly - only print: For the '-l error' option, if nonzero,
207 the number of errors recorded in the SMART error log and the
208 power-on time when they occurred; For the '-l selftest' option,
209 errors recorded in the device self-test log; For the '-H' op‐
210 tion, SMART "disk failing" status or device Attributes (pre-
211 failure or usage) which failed either now or in the past; For
212 the '-A' option, device Attributes (pre-failure or usage) which
213 failed either now or in the past.
214
215 silent - print no output. The only way to learn about what was
216 found is to use the exit status of smartctl (see EXIT STATUS be‐
217 low).
218
219 noserial - Do not print the serial number of the device.
220
221 -d TYPE, --device=TYPE
222 Specifies the type of the device. The valid arguments to this
223 option are:
224
225 auto - attempt to guess the device type from the device name or
226 from controller type info provided by the operating system or
227 from a matching USB ID entry in the drive database. This is the
228 default.
229
230 test - prints the guessed TYPE, then opens the device and prints
231 the (possibly changed) TYPE name and then exits without perform‐
232 ing any further commands.
233
234 ata - the device type is ATA. This prevents smartctl from issu‐
235 ing SCSI commands to an ATA device.
236
237 scsi - the device type is SCSI. This prevents smartctl from is‐
238 suing ATA commands to a SCSI device.
239
240 nvme[,NSID] - the device type is NVM Express (NVMe). The op‐
241 tional parameter NSID specifies the namespace id (in hex) passed
242 to the driver. Use 0xffffffff for the broadcast namespace id.
243 The default for NSID is the namespace id addressed by the device
244 name.
245
246 sat[,auto][,N] - the device type is SCSI to ATA Translation
247 (SAT). This is for ATA disks that have a SCSI to ATA Transla‐
248 tion Layer (SATL) between the disk and the operating system.
249 SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes
250 long and the other 16 bytes long. The default is the 16 byte
251 variant which can be overridden with either '-d sat,12' or '-d
252 sat,16'.
253
254 If '-d sat,auto' is specified, device type SAT (for ATA/SATA
255 disks) is only used if the SCSI INQUIRY data reports a SATL
256 (VENDOR: "ATA "). Otherwise device type SCSI (for SCSI/SAS
257 disks) is used.
258
259 usbcypress - this device type is for ATA disks that are behind a
260 Cypress USB to PATA bridge. This will use the ATACB proprietary
261 scsi pass through command. The default SCSI operation code is
262 0x24, but although it can be overridden with '-d usbcy‐
263 press,0xN', where N is the scsi operation code, you're running
264 the risk of damage to the device or filesystems on it.
265
266 usbjmicron[,p][,x][,PORT] - this device type is for SATA disks
267 that are behind a JMicron USB to PATA/SATA bridge. The 48-bit
268 ATA commands (required e.g. for '-l xerror', see below) do not
269 work with all of these bridges and are therefore disabled by de‐
270 fault. These commands can be enabled by '-d usbjmicron,x'. If
271 two disks are connected to a bridge with two ports, an error
272 message is printed if no PORT is specified. The port can be
273 specified by '-d usbjmicron[,x],PORT' where PORT is 0 (master)
274 or 1 (slave). This is not necessary if the device uses a port
275 multiplier to connect multiple disks to one port. The disks ap‐
276 pear under separate /dev/ice names then. CAUTION: Specifying
277 ',x' for a device which does not support it results in I/O er‐
278 rors and may disconnect the drive. The same applies if the
279 specified PORT does not exist or is not connected to a disk.
280
281 The Prolific PL2507/3507 USB bridges with older firmware support
282 a pass-through command similar to JMicron and work with '-d usb‐
283 jmicron,0'. Newer Prolific firmware requires a modified command
284 which can be selected by '-d usbjmicron,p'. Note that this does
285 not yet support the SMART status command.
286
287 usbprolific - this device type is for SATA disks that are behind
288 a Prolific PL2571/2771/2773/2775 USB to SATA bridge.
289
290 usbsunplus - this device type is for SATA disks that are behind
291 a SunplusIT USB to SATA bridge.
292
293 sntasmedia - [NEW EXPERIMENTAL SMARTCTL FEATURE] this device
294 type is for NVMe disks that are behind an ASMedia USB to NVMe
295 bridge.
296
297 sntjmicron[,NSID] - this device type is for NVMe disks that are
298 behind a JMicron USB to NVMe bridge. The optional parameter
299 NSID specifies the namespace id (in hex) passed to the driver.
300 The default namespace id is the broadcast namespace id
301 (0xffffffff).
302
303 sntrealtek - [NEW EXPERIMENTAL SMARTCTL FEATURE] this device
304 type is for NVMe disks that are behind a Realtek USB to NVMe
305 bridge.
306
307 marvell - [Linux only] interact with SATA disks behind Marvell
308 chip-set controllers (using the Marvell rather than libata
309 driver).
310
311 megaraid,N - [FreeBSD and Linux only] the device consists of one
312 or more SCSI/SAS disks connected to a MegaRAID controller. The
313 non-negative integer N (in the range of 0 to 127 inclusive) de‐
314 notes which disk on the controller is monitored. This interface
315 will also work for Dell PERC controllers. Use syntax such as:
316 smartctl -a -d megaraid,2 /dev/sda
317 smartctl -a -d megaraid,0 /dev/sdb
318 smartctl -a -d megaraid,0 /dev/bus/0
319 It is possible to set RAID device name as /dev/bus/N, where N is
320 a SCSI bus number.
321
322 The following entry in /proc/devices must exist:
323 For PERC2/3/4 controllers: megadevN
324 For PERC5/6 controllers: megaraid_sas_ioctlN
325
326 aacraid,H,L,ID - [Linux, Windows and Cygwin only] the device
327 consists of one or more SCSI/SAS or SATA disks connected to an
328 AacRaid controller. The non-negative integers H,L,ID (Host num‐
329 ber, Lun, ID) denote which disk on the controller is monitored.
330 Use syntax such as:
331 smartctl -a -d aacraid,0,0,2 /dev/sda
332 smartctl -a -d aacraid,1,0,4 /dev/sdb
333
334 Option '-d sat,auto+...' is implicitly enabled to detect SATA
335 disks. Use '-d scsi+aacraid,H,L,ID' to disable it.
336
337 On Linux, the following entry in /proc/devices must exist: aac.
338 Character device nodes /dev/aacH (H=Host number) are created if
339 required.
340
341 3ware,N - [FreeBSD and Linux only] the device consists of one or
342 more ATA disks connected to a 3ware RAID controller. The non-
343 negative integer N (in the range from 0 to 127 inclusive) de‐
344 notes which disk on the controller is monitored. Use syntax
345 such as:
346 smartctl -a -d 3ware,2 /dev/sda [Linux only]
347 smartctl -a -d 3ware,0 /dev/twe0
348 smartctl -a -d 3ware,1 /dev/twa0
349 smartctl -a -d 3ware,1 /dev/twl0 [Linux only]
350 smartctl -a -d 3ware,1 /dev/tws0 [FreeBSD only]
351 The first two forms, which refer to devices /dev/sda-z (depre‐
352 cated) and /dev/twe0-15, may be used with 3ware series 6000,
353 7000, and 8000 series controllers that use the 3x-xxxx driver.
354 The devices /dev/twa0-15, must be used with 3ware 9000 series
355 controllers, which use the 3w-9xxx driver. The devices
356 /dev/twl0-15 [Linux] or /dev/tws0-15 [FreeBSD] must be used with
357 the 3ware/LSI 9750 series controllers which use the 3w-sas
358 driver.
359
360 Note that if the special character device nodes /dev/tw[ls]?,
361 /dev/twa? and /dev/twe? do not exist, or exist with the incor‐
362 rect major or minor numbers, smartctl will recreate them on the
363 fly.
364
365 areca,N - [FreeBSD, Linux, Windows and Cygwin only] the device
366 consists of one or more SATA disks connected to an Areca SATA
367 RAID controller. The positive integer N (in the range from 1 to
368 24 inclusive) denotes which disk on the controller is monitored.
369 On Linux use syntax such as:
370 smartctl -a -d areca,2 /dev/sg2
371 smartctl -a -d areca,3 /dev/sg3
372 The first line above addresses the second disk on the first
373 Areca RAID controller. The second line addresses the third disk
374 on the second Areca RAID controller. To help identify the cor‐
375 rect device on Linux, use the command:
376 cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices
377 to show the SCSI generic devices (one per line, starting with
378 /dev/sg0). The correct SCSI generic devices to address for
379 smartmontools are the ones with the type field equal to 3. If
380 the incorrect device is addressed, please read the warning/error
381 messages carefully. They should provide hints about what de‐
382 vices to use.
383
384 Important: the Areca controller must have firmware version 1.46
385 or later. Lower-numbered firmware versions will give (harmless)
386 SCSI error messages and no SMART information.
387
388 areca,N/E - [FreeBSD, Linux, Windows and Cygwin only] the device
389 consists of one or more SATA or SAS disks connected to an Areca
390 SAS RAID controller. The integer N (range 1 to 128) denotes the
391 channel (slot) and E (range 1 to 8) denotes the enclosure. Im‐
392 portant: This requires Areca SAS controller firmware version
393 1.51 or later.
394
395 cciss,N - [FreeBSD and Linux only] the device consists of one or
396 more SCSI/SAS or SATA disks connected to a cciss RAID con‐
397 troller. The non-negative integer N (in the range from 0 to 15
398 inclusive) denotes which disk on the controller is monitored.
399
400 Option '-d sat,auto+...' is implicitly enabled to detect SATA
401 disks. Use '-d scsi+cciss,N' to disable it.
402
403 To look at disks behind HP Smart Array controllers, use syntax
404 such as:
405 smartctl -a -d cciss,0 /dev/cciss/c0d0 (cciss driver under
406 Linux)
407 smartctl -a -d cciss,0 /dev/sg2 (hpsa or hpahcisr drivers un‐
408 der Linux)
409
410 hpt,L/M/N - [FreeBSD and Linux only] the device consists of one
411 or more ATA disks connected to a HighPoint RocketRAID con‐
412 troller. The integer L is the controller id, the integer M is
413 the channel number, and the integer N is the PMPort number if it
414 is available. The allowed values of L are from 1 to 4 inclu‐
415 sive, M are from 1 to 128 inclusive and N from 1 to 4 if PMPort
416 available. And also these values are limited by the model of
417 the HighPoint RocketRAID controller. Use syntax such as:
418 smartctl -a -d hpt,1/3 /dev/sda (under Linux)
419 smartctl -a -d hpt,1/2/3 /dev/sda (under Linux)
420 Note that the /dev/sda-z form should be the device node which
421 stands for the disks derived from the HighPoint RocketRAID con‐
422 trollers under Linux and under FreeBSD, it is the character de‐
423 vice which the driver registered (eg, /dev/hptrr, /dev/hptmv6).
424
425 intelliprop,N[+TYPE] - the device consists of multiple ATA disks
426 connected to an Intelliprop controller. The integer N is the
427 port number from 0 to 3 of the ATA drive to be targeted. The
428 TYPE can be ata(default), sat, or a USB controller listed above.
429 Note: if a type of ATA does not work, try a type of sat. Use
430 syntax such as:
431 smartctl -a -d intelliprop,1 /dev/sda (under Linux)
432 smartctl -a -d intelliprop,1+sat /dev/sda (under Linux)
433 WARNING: The disks are selected by write commands to the ATA De‐
434 vice Vendor Specific Log at address 0xc0. Using this option
435 with other devices may have undesirable side effects.
436
437 jmb39x[-q],N[,sLBA][,force][+TYPE] - [NEW EXPERIMENTAL SMARTCTL
438 FEATURE] the device consists of multiple SATA disks connected to
439 a JMicron JMB39x RAID port multiplier. The suffix '-q' selects
440 a slightly different command variant used by some QNAP NAS de‐
441 vices. The integer N is the port number from 0 to 4.
442 WARNING: The ATA pass-through commands are issued via READ/WRITE
443 commands to LBA 33 of the RAID volume. Using this option with
444 other devices may overwrite this sector.
445 The LBA could be selected in the range 33 (last sector of a GPT)
446 to 62 (last sector of traditional boot area).
447 By default, access to the device is refused if the selected sec‐
448 tor is not zero filled. The 'force' flag disables this check.
449 WARNING: Original sector data is not written back if smartctl is
450 aborted with a signal.
451
452 jms56x,N[,sLBA][,force][+TYPE] - [NEW EXPERIMENTAL SMARTCTL FEA‐
453 TURE] the device consists of multiple SATA disks connected to a
454 JMicron JMS56x USB to SATA RAID bridge. See 'jmb39x...' above
455 for valid arguments.
456
457 -T TYPE, --tolerance=TYPE
458 [ATA only] Specifies how tolerant smartctl should be of ATA and
459 SMART command failures.
460
461 The behavior of smartctl depends upon whether the command is
462 "optional" or "mandatory". Here "mandatory" means "required by
463 the ATA Specification if the device implements the SMART command
464 set" and "optional" means "not required by the ATA Specification
465 even if the device implements the SMART command set." The
466 "mandatory" ATA and SMART commands are: (1) ATA IDENTIFY DEVICE,
467 (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3) SMART EN‐
468 ABLE/DISABLE, and (4) SMART RETURN STATUS.
469
470 The valid arguments to this option are:
471
472 normal - exit on failure of any mandatory SMART command, and ig‐
473 nore all failures of optional SMART commands. This is the de‐
474 fault. Note that on some devices, issuing unimplemented op‐
475 tional SMART commands doesn't cause an error. This can result
476 in misleading smartctl messages such as "Feature X not imple‐
477 mented", followed shortly by "Feature X: enabled". In most such
478 cases, contrary to the final message, Feature X is not enabled.
479
480 conservative - exit on failure of any optional SMART command.
481
482 permissive - ignore failure(s) of mandatory SMART commands.
483 This option may be given more than once. Each additional use of
484 this option will cause one more additional failure to be ig‐
485 nored. Note that the use of this option can lead to messages
486 like "Feature X not supported", followed shortly by "Feature X
487 enable failed". In a few such cases, contrary to the final mes‐
488 sage, Feature X is enabled.
489
490 verypermissive - equivalent to giving a large number of '-T per‐
491 missive' options: ignore failures of any number of mandatory
492 SMART commands. Please see the note above.
493
494 -b TYPE, --badsum=TYPE
495 [ATA only] Specifies the action smartctl should take if a check‐
496 sum error is detected in the: (1) Device Identity Structure, (2)
497 SMART Self-Test Log Structure, (3) SMART Attribute Value Struc‐
498 ture, (4) SMART Attribute Threshold Structure, or (5) ATA Error
499 Log Structure.
500
501 The valid arguments to this option are:
502
503 warn - report the incorrect checksum but carry on in spite of
504 it. This is the default.
505
506 exit - exit smartctl.
507
508 ignore - continue silently without issuing a warning.
509
510 -r TYPE, --report=TYPE
511 Intended primarily to help smartmontools developers understand
512 the behavior of smartmontools on non-conforming or poorly con‐
513 forming hardware. This option reports details of smartctl
514 transactions with the device. The option can be used multiple
515 times. When used just once, it shows a record of the ioctl()
516 transactions with the device. When used more than once, the de‐
517 tail of these ioctl() transactions are reported in greater de‐
518 tail. The valid arguments to this option are:
519
520 ioctl - report all ioctl() transactions.
521
522 ataioctl - report only ioctl() transactions with ATA devices.
523
524 scsiioctl - report only ioctl() transactions with SCSI devices.
525 Invoking this once shows the SCSI commands in hex and the corre‐
526 sponding status. Invoking it a second time adds a hex listing
527 of the first 64 bytes of data send to, or received from the de‐
528 vice.
529
530 nvmeioctl - report only ioctl() transactions with NVMe devices.
531
532 Any argument may include a positive integer to specify the level
533 of detail that should be reported. The argument should be fol‐
534 lowed by a comma then the integer with no spaces. For example,
535 ataioctl,2 The default level is 1, so '-r ataioctl,1' and '-r
536 ataioctl' are equivalent.
537
538 For testing purposes, the output of '-r ataioctl,2' can later be
539 parsed by smartctl itself if '-' is used as device path argu‐
540 ment. The ATA command input parameters, sector data and return
541 values are reconstructed from the debug report read from stdin.
542 Then smartctl internally simulates an ATA device with the same
543 behaviour. This is does not work for SCSI devices yet.
544
545 -n POWERMODE[,STATUS[,STATUS2]], --nocheck=POWERMODE[,STATUS[,STATUS2]]
546 [ATA] [SCSI: NEW EXPERIMENTAL SMARTCTL FEATURE] Specifies if
547 smartctl should exit before performing any checks when the de‐
548 vice is in a low-power mode. It may be used to prevent a disk
549 from being spun-up by smartctl. The power mode is ignored by
550 default.
551
552 Note: If this option is used it may also be necessary to specify
553 the device type with the '-d' option. Otherwise the device may
554 spin up due to commands issued during device type autodetection.
555
556 By default, exit status 2 is returned if the device is in one of
557 the specified low-power modes. This status is also returned if
558 the device open or identification failed (see EXIT STATUS be‐
559 low). The optional STATUS parameter allows one to override this
560 default. STATUS is an integer in the range from 0 to 255 inclu‐
561 sive. For example use '-n standby,0' to return success if a de‐
562 vice is in SLEEP or STANDBY mode. Use '-n standby,3' to return
563 a unique exit status in this case.
564
565 The valid arguments to this option are:
566
567 never - check the device always, but print the power mode if
568 '-i' is specified.
569
570 sleep[,STATUS[,STATUS2]] - check the device unless it is in
571 SLEEP mode.
572
573 standby[,STATUS[,STATUS2]] - check the device unless it is in
574 SLEEP or STANDBY mode. In these modes most disks are not spin‐
575 ning, so if you want to prevent a disk from spinning up, this is
576 probably what you want.
577
578 idle[,STATUS[,STATUS2]] - check the device unless it is in
579 SLEEP, STANDBY or IDLE mode. In the IDLE state, most disks are
580 still spinning, so this is probably not what you want.
581
582 The '-n' option is ignored if the power mode check is not sup‐
583 ported or returns an unknown value.
584 [ATA only][NEW EXPERIMENTAL SMARTCTL FEATURE] If the optional
585 STATUS2 parameter is specified, smartctl exits immediately with
586 STATUS2 in this case. For example use '-n standby,3,5' to re‐
587 turn unique exit statuses in the STANDBY and UNSUPPORTED cases.
588
589 SMART FEATURE ENABLE/DISABLE COMMANDS:
590
591 Note: if multiple options are used to both enable and disable a
592 feature, then both the enable and disable commands will be is‐
593 sued. The enable command will always be issued before the cor‐
594 responding disable command.
595
596 -s VALUE, --smart=VALUE
597 Enables or disables SMART on device. The valid arguments to
598 this option are on and off.
599
600 [ATA] Note that the ATA commands SMART ENABLE/DISABLE OPERATIONS
601 were declared obsolete in ATA ACS-4 Revision 10 (Nov 2015).
602
603 [SCSI tape drive or changer] It is not necessary (or useful) to
604 enable SMART to see the TapeAlert messages.
605
606 -o VALUE, --offlineauto=VALUE
607 [ATA only] Enables or disables SMART automatic offline test,
608 which scans the drive every four hours for disk defects. This
609 command can be given during normal system operation. The valid
610 arguments to this option are on and off.
611
612 Note that the SMART automatic offline test command is listed as
613 "Obsolete" in every version of the ATA and ATA/ATAPI Specifica‐
614 tions. It was originally part of the SFF-8035i Revision 2.0
615 specification, but was never part of any ATA specification.
616 However it is implemented and used by many vendors. You can
617 tell if automatic offline testing is supported by seeing if this
618 command enables and disables it, as indicated by the 'Auto Off‐
619 line Data Collection' part of the SMART capabilities report
620 (displayed with '-c').
621
622 SMART provides three basic categories of testing. The first
623 category, called "online" testing, has no effect on the perfor‐
624 mance of the device. It is turned on by the '-s on' option.
625
626 The second category of testing is called "offline" testing.
627 This type of test can, in principle, degrade the device perfor‐
628 mance. The '-o on' option causes this offline testing to be
629 carried out, automatically, on a regular scheduled basis. Nor‐
630 mally, the disk will suspend offline testing while disk accesses
631 are taking place, and then automatically resume it when the disk
632 would otherwise be idle, so in practice it has little effect.
633 Note that a one-time offline test can also be carried out imme‐
634 diately upon receipt of a user command. See the '-t offline'
635 option below, which causes a one-time offline test to be carried
636 out immediately.
637
638 The choice (made by the SFF-8035i and ATA specification authors)
639 of the word testing for these first two categories is unfortu‐
640 nate, and often leads to confusion. In fact these first two
641 categories of online and offline testing could have been more
642 accurately described as online and offline data collection.
643
644 The results of this automatic or immediate offline testing (data
645 collection) are reflected in the values of the SMART Attributes.
646 Thus, if problems or errors are detected, the values of these
647 Attributes will go below their failure thresholds; some types of
648 errors may also appear in the SMART error log. These are visi‐
649 ble with the '-A' and '-l error' options respectively.
650
651 Some SMART attribute values are updated only during off-line
652 data collection activities; the rest are updated during normal
653 operation of the device or during both normal operation and off-
654 line testing. The Attribute value table produced by the '-A'
655 option indicates this in the UPDATED column. Attributes of the
656 first type are labeled "Offline" and Attributes of the second
657 type are labeled "Always".
658
659 The third category of testing (and the only category for which
660 the word 'testing' is really an appropriate choice) is "self"
661 testing. This third type of test is only performed (immedi‐
662 ately) when a command to run it is issued. The '-t' and '-X'
663 options can be used to carry out and abort such self-tests;
664 please see below for further details.
665
666 Any errors detected in the self testing will be shown in the
667 SMART self-test log, which can be examined using the '-l self‐
668 test' option.
669
670 Note: in this manual page, the word "Test" is used in connection
671 with the second category just described, e.g. for the "offline"
672 testing. The words "Self-test" are used in connection with the
673 third category.
674
675 -S VALUE, --saveauto=VALUE
676 [ATA] Enables or disables SMART autosave of device vendor-spe‐
677 cific Attributes. The valid arguments to this option are on and
678 off. Note that this feature is preserved across disk power cy‐
679 cles, so you should only need to issue it once.
680
681 The ATA standard does not specify a method to check whether
682 SMART autosave is enabled. Unlike SCSI (below), smartctl is un‐
683 able to print a warning if autosave is disabled.
684
685 Note that the ATA commands SMART ENABLE/DISABLE AUTOSAVE were
686 declared obsolete in ATA ACS-4 Revision 10 (Nov 2015).
687
688 [SCSI] For SCSI devices this toggles the value of the Global
689 Logging Target Save Disabled (GLTSD) bit in the Control Mode
690 Page. Some disk manufacturers set this bit by default. This
691 prevents error counters, power-up hours and other useful data
692 from being placed in non-volatile storage, so these values may
693 be reset to zero the next time the device is power-cycled. If
694 the GLTSD bit is set then 'smartctl -a' will issue a warning.
695 Use on to clear the GLTSD bit and thus enable saving counters to
696 non-volatile storage. For extreme streaming-video type applica‐
697 tions you might consider using off to set the GLTSD bit.
698
699 -g NAME, --get=NAME, -s NAME[,VALUE], --set=NAME[,VALUE]
700 Gets/sets non-SMART device settings. Note that the '--set' op‐
701 tion shares its short option '-s' with '--smart'. Valid argu‐
702 ments are:
703
704 all - Gets all values. This is equivalent to
705 '-g aam -g apm -g lookahead -g security -g wcache -g rcache -g
706 dsn'
707
708 aam[,N|off] - [ATA only] Gets/sets the Automatic Acoustic Man‐
709 agement (AAM) feature (if supported). A value of 128 sets the
710 most quiet (slowest) mode and 254 the fastest (loudest) mode,
711 'off' disables AAM. Devices may support intermediate levels.
712 Values below 128 are defined as vendor specific (0) or retired
713 (1 to 127). Note that the AAM feature was declared obsolete in
714 ATA ACS-2 Revision 4a (Dec 2010).
715
716 apm[,N|off] - [ATA only] Gets/sets the Advanced Power Management
717 (APM) feature on device (if supported). If a value between 1
718 and 254 is provided, it will attempt to enable APM and set the
719 specified value, 'off' disables APM. Note the actual behavior
720 depends on the drive, for example some drives disable APM if
721 their value is set above 128. Values below 128 are supposed to
722 allow drive spindown, values 128 and above adjust only head-
723 parking frequency, although the actual behavior defined is also
724 vendor-specific.
725
726 lookahead[,on|off] - [ATA only] Gets/sets the read look-ahead
727 feature (if supported). Read look-ahead is usually enabled by
728 default.
729
730 security - [ATA only] Gets the status of ATA Security feature
731 (if supported). If ATA Security is enabled an ATA user password
732 is set. The drive will be locked on next reset then.
733
734 security-freeze - [ATA only] Sets ATA Security feature to frozen
735 mode. This prevents that the drive accepts any security com‐
736 mands until next reset. Note that the frozen mode may already
737 be set by BIOS or OS.
738
739 standby,[N|off] - [ATA] Sets the standby (spindown) timer and
740 places the drive in the IDLE mode. A value of 0 or 'off' dis‐
741 ables the standby timer. Values from 1 to 240 specify timeouts
742 from 5 seconds to 20 minutes in 5 second increments. Values
743 from 241 to 251 specify timeouts from 30 minutes to 330 minutes
744 in 30 minute increments. Value 252 specifies 21 minutes. Value
745 253 specifies a vendor specific time between 8 and 12 hours.
746 Value 255 specifies 21 minutes and 15 seconds. Some drives may
747 use a vendor specific interpretation for the values. Note that
748 there is no get option because ATA standards do not specify a
749 method to read the standby timer. If '-s standby,now' is also
750 specified, the drive is immediately placed in the STANDBY mode
751 without temporarily placing it in the IDLE mode. Note that ATA
752 standards do not specify a command to set the standby timer
753 without affecting the power mode.
754 [SCSI: NEW EXPERIMENTAL SMARTCTL FEATURE] Only the set option
755 with 'standby,off' or 'standby,0' is accepted and will place the
756 SCSI disk into "ACTIVE" power condition.
757
758 standby,now - [ATA] Places the drive in the STANDBY mode. This
759 usually spins down the drive. The setting of the standby timer
760 is not affected unless '-s standby,[N|off]' is also specified.
761 [SCSI: NEW EXPERIMENTAL SMARTCTL FEATURE] Only the set option is
762 accepted and will place the SCSI disk into "STANDBY_Z" power
763 condition.
764
765 wcache[,on|off] - [ATA] Gets/sets the volatile write cache fea‐
766 ture (if supported). The write cache is usually enabled by de‐
767 fault.
768
769 wcache[,on|off] - [SCSI] Gets/sets the 'Write Cache Enable'
770 (WCE) bit (if supported). The write cache is usually enabled by
771 default.
772
773 wcache-sct[,ata|on|off[,p]] - [ATA only] Gets/sets the write
774 cache feature through SCT Feature Control (if supported). The
775 state of write cache in SCT Feature Control could be "Controlled
776 by ATA", "Force Enabled", or "Force Disabled". SCT Feature con‐
777 trol overwrites the setting by ATA Set Features command
778 (wcache[,on|off] option). If SCT Feature Control sets write
779 cache as "Force Enabled" or "Force Disabled", the setting of
780 wcache[,on|off] is ignored by the drive. SCT Feature Control
781 usually sets write cache as "Controlled by ATA" by default. If
782 ',p' is specified, the setting is preserved across power cycles.
783
784 wcreorder[,on|off[,p]] - [ATA only] Gets/sets Write Cache Re‐
785 ordering. If it is disabled (off), disk write scheduling is ex‐
786 ecuted on a first-in-first-out (FIFO) basis. If Write Cache Re‐
787 ordering is enabled (on), then disk write scheduling may be re‐
788 ordered by the drive. If write cache is disabled, the current
789 Write Cache Reordering state is remembered but has no effect on
790 non-cached writes, which are always written in the order re‐
791 ceived. The state of Write Cache Reordering has no effect on
792 either NCQ or LCQ queued commands. If ',p' is specified, the
793 setting is preserved across power cycles.
794
795 rcache[,on|off] - [SCSI only] Gets/sets the 'Read Cache Disable'
796 (RCE) bit. 'Off' value disables read cache (if supported). The
797 read cache is usually enabled by default.
798
799 dsn[,on|off] - [ATA only] Gets/sets the DSN feature (if sup‐
800 ported). The dsn is usually disabled by default.
801
802
803 SMART READ AND DISPLAY DATA OPTIONS:
804
805 -H, --health
806 Prints the health status of the device.
807
808 [SCSI tape drive or changer] For SCSI tape drives the TapeAlert
809 log page is not checked for pending alerts unless this option is
810 given twice (see TAPE DRIVES for the rationale).
811
812 If the device reports failing health status, this means either
813 that the device has already failed, or that it is predicting its
814 own failure within the next 24 hours. If this happens, use the
815 '-a' option to get more information, and get your data off the
816 disk and to someplace safe as soon as you can.
817
818 [ATA] Health status is obtained by checking the (boolean) result
819 returned by the SMART RETURN STATUS command. The return value
820 of this ATA command may be unknown due to limitations or bugs in
821 some layer (e.g. RAID controller or USB bridge firmware) between
822 disk and operating system. In this case, smartctl prints a
823 warning and checks whether any Prefailure SMART Attribute value
824 is less than or equal to its threshold (see '-A' below).
825
826 [SCSI] Health status is obtained by checking the Additional
827 Sense Code (ASC) and Additional Sense Code Qualifier (ASCQ) from
828 Informal Exceptions (IE) log page (if supported) and/or from
829 SCSI sense data.
830
831 [SCSI tape drive or changer] TapeAlert status is obtained by
832 reading the TapeAlert log page only when this option is given
833 twice.
834
835 [NVMe] NVMe status is obtained by reading the "Critical Warning"
836 byte from the SMART/Health Information log.
837
838 -c, --capabilities
839 [ATA] Prints only the generic SMART capabilities. These show
840 what SMART features are implemented and how the device will re‐
841 spond to some of the different SMART commands. For example it
842 shows if the device logs errors, if it supports offline surface
843 scanning, and so on. If the device can carry out self-tests,
844 this option also shows the estimated time required to run those
845 tests.
846
847 [NVMe] Prints various NVMe device capabilities obtained from the
848 Identify Controller and the Identify Namespace data structure.
849
850 -A, --attributes
851 [ATA] Prints only the vendor specific SMART Attributes. The At‐
852 tributes are numbered from 1 to 253 and have specific names and
853 ID numbers. For example Attribute 12 is "power cycle count":
854 how many times has the disk been powered up.
855
856 Each Attribute has a "Raw" value, printed under the heading
857 "RAW_VALUE", and a "Normalized" value printed under the heading
858 "VALUE". [Note: smartctl prints these values in base-10.] In
859 the example just given, the "Raw Value" for Attribute 12 would
860 be the actual number of times that the disk has been power-cy‐
861 cled, for example 365 if the disk has been turned on once per
862 day for exactly one year. Each vendor uses their own algorithm
863 to convert this "Raw" value to a "Normalized" value in the range
864 from 1 to 254. Please keep in mind that smartctl only reports
865 the different Attribute types, values, and thresholds as read
866 from the device. It does not carry out the conversion between
867 "Raw" and "Normalized" values: this is done by the disk's
868 firmware.
869
870 The conversion from Raw value to a quantity with physical units
871 is not specified by the SMART standard. In most cases, the val‐
872 ues printed by smartctl are sensible. For example the tempera‐
873 ture Attribute generally has its raw value equal to the tempera‐
874 ture in Celsius. However in some cases vendors use unusual con‐
875 ventions. For example the Hitachi disk on my laptop reports its
876 power-on hours in minutes, not hours. Some IBM disks track
877 three temperatures rather than one, in their raw values. And so
878 on.
879
880 Each Attribute also has a Threshold value (whose range is 0 to
881 255) which is printed under the heading "THRESH". If the Nor‐
882 malized value is less than or equal to the Threshold value, then
883 the Attribute is said to have failed. If the Attribute is a
884 pre-failure Attribute, then disk failure is imminent.
885
886 Each Attribute also has a "Worst" value shown under the heading
887 "WORST". This is the smallest (closest to failure) value that
888 the disk has recorded at any time during its lifetime when SMART
889 was enabled. [Note however that some vendors firmware may actu‐
890 ally increase the "Worst" value for some "rate-type" At‐
891 tributes.]
892
893 The Attribute table printed out by smartctl also shows the
894 "TYPE" of the Attribute. Attributes are one of two possible
895 types: Pre-failure or Old age. Pre-failure Attributes are ones
896 which, if less than or equal to their threshold values, indicate
897 pending disk failure. Old age, or usage Attributes, are ones
898 which indicate end-of-product life from old-age or normal aging
899 and wearout, if the Attribute value is less than or equal to the
900 threshold. Please note: the fact that an Attribute is of type
901 'Pre-fail' does not mean that your disk is about to fail! It
902 only has this meaning if the Attribute's current Normalized
903 value is less than or equal to the threshold value.
904
905 If the Attribute's current Normalized value is less than or
906 equal to the threshold value, then the "WHEN_FAILED" column will
907 display "FAILING_NOW". If not, but the worst recorded value is
908 less than or equal to the threshold value, then this column will
909 display "In_the_past". If the "WHEN_FAILED" column has no entry
910 (indicated by a dash: '-') then this Attribute is OK now (not
911 failing) and has also never failed in the past.
912
913 The table column labeled "UPDATED" shows if the SMART Attribute
914 values are updated during both normal operation and off-line
915 testing, or only during offline testing. The former are labeled
916 "Always" and the latter are labeled "Offline".
917
918 So to summarize: the Raw Attribute values are the ones that
919 might have a real physical interpretation, such as "Temperature
920 Celsius", "Hours", or "Start-Stop Cycles". Each manufacturer
921 converts these, using their detailed knowledge of the disk's op‐
922 erations and failure modes, to Normalized Attribute values in
923 the range 1–254. The current and worst (lowest measured) of
924 these Normalized Attribute values are stored on the disk, along
925 with a Threshold value that the manufacturer has determined will
926 indicate that the disk is going to fail, or that it has exceeded
927 its design age or aging limit. smartctl does not calculate any
928 of the Attribute values, thresholds, or types, it merely reports
929 them from the SMART data on the device.
930
931 Note that starting with ATA/ATAPI-4, revision 4, the meaning of
932 these Attribute fields has been made entirely vendor-specific.
933 However most newer ATA/SATA disks seem to respect their meaning,
934 so we have retained the option of printing the Attribute values.
935
936 Solid-state drives use different meanings for some of the at‐
937 tributes. In this case the attribute name printed by smartctl
938 is incorrect unless the drive is already in the smartmontools
939 drive database.
940
941 Note that the ATA command SMART READ DATA was declared obsolete
942 in ATA ACS-4 Revision 10 (Nov 2015).
943
944 [SCSI] For SCSI devices the "attributes" are obtained from the
945 temperature and start-stop cycle counter log pages. Certain
946 vendor specific attributes are listed if recognised. The at‐
947 tributes are output in a relatively free format (compared with
948 ATA disk attributes).
949
950 [NVMe] For NVMe devices the attributes are obtained from the
951 SMART/Health Information log.
952
953 -f FORMAT, --format=FORMAT
954 [ATA only] Selects the output format of the attributes:
955
956 old - Old smartctl format. This is the default unless the '-x'
957 option is specified.
958
959 brief - New format which fits into 80 columns (except in some
960 rare cases). This format also decodes four additional attribute
961 flags. This is the default if the '-x' option is specified.
962
963 hex,id - Print all attribute IDs as hexadecimal numbers.
964
965 hex,val - Print all normalized values as hexadecimal numbers.
966
967 hex - Same as '-f hex,id -f hex,val'.
968
969 -l TYPE, --log=TYPE
970 Prints various device logs. The valid arguments to this option
971 are:
972
973 error - [ATA] prints the Summary SMART error log. SMART disks
974 maintain a log of the most recent five non-trivial errors. For
975 each of these errors, the disk power-on lifetime at which the
976 error occurred is recorded, as is the device status (idle,
977 standby, etc) at the time of the error. For some common types
978 of errors, the Error Register (ER) and Status Register (SR) val‐
979 ues are decoded and printed as text. The meanings of these are:
980 ABRT: Command ABoRTed
981 AMNF: Address Mark Not Found
982 CCTO: Command Completion Timed Out
983 EOM: End Of Media
984 ICRC: Interface Cyclic Redundancy Code (CRC) error
985 IDNF: IDentity Not Found
986 ILI: (packet command-set specific)
987 MC: Media Changed
988 MCR: Media Change Request
989 NM: No Media
990 obs: obsolete
991 TK0NF: TracK 0 Not Found
992 UNC: UNCorrectable Error in Data
993 WP: Media is Write Protected
994 In addition, up to the last five commands that preceded the er‐
995 ror are listed, along with a timestamp measured from the start
996 of the corresponding power cycle. This is displayed in the form
997 Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM
998 is minutes, SS is seconds and msec is milliseconds. [Note: this
999 time stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2
1000 minutes and 47.296 seconds.] The key ATA disk registers are
1001 also recorded in the log. The final column of the error log is
1002 a text-string description of the ATA command defined by the Com‐
1003 mand Register (CR) and Feature Register (FR) values. Commands
1004 that are obsolete in the most current spec are listed like this:
1005 READ LONG (w/ retry) [OBS-4], indicating that the command became
1006 obsolete with or in the ATA-4 specification. Similarly, the no‐
1007 tation [RET-N] is used to indicate that a command was retired in
1008 the ATA-N specification. Some commands are not defined in any
1009 version of the ATA specification but are in common use nonethe‐
1010 less; these are marked [NS], meaning non-standard.
1011
1012 The ATA Specification (ATA ACS-2 Revision 7, Section A.7.1)
1013 says: "Error log data structures shall include, but are not lim‐
1014 ited to, Uncorrectable errors, ID Not Found errors for which the
1015 LBA requested was valid, servo errors, and write fault errors.
1016 Error log data structures shall not include errors attributed to
1017 the receipt of faulty commands." The definitions of these terms
1018 are:
1019 UNC (UNCorrectable): data is uncorrectable. This refers to data
1020 which has been read from the disk, but for which the Error
1021 Checking and Correction (ECC) codes are inconsistent. In ef‐
1022 fect, this means that the data can not be read.
1023 IDNF (ID Not Found): user-accessible address could not be found.
1024 For READ LOG type commands, IDNF can also indicate that a device
1025 data log structure checksum was incorrect.
1026
1027 If the command that caused the error was a READ or WRITE com‐
1028 mand, then the Logical Block Address (LBA) at which the error
1029 occurred will be printed in base 10 and base 16. The LBA is a
1030 linear address, which counts 512-byte sectors on the disk,
1031 starting from zero. (Because of the limitations of the SMART
1032 error log, if the LBA is greater than 0xfffffff, then either no
1033 error log entry will be made, or the error log entry will have
1034 an incorrect LBA. This may happen for drives with a capacity
1035 greater than 128 GiB or 137 GB.) On Linux systems the smartmon‐
1036 tools web page has instructions about how to convert the LBA ad‐
1037 dress to the name of the disk file containing the erroneous disk
1038 sector.
1039
1040 Please note that some manufacturers ignore the ATA specifica‐
1041 tions, and make entries in the error log if the device receives
1042 a command which is not implemented or is not valid.
1043
1044 error - [SCSI] prints the error counter log pages for reads,
1045 write and verifies. The verify row is only output if it has an
1046 element other than zero.
1047
1048 error[,NUM] - [NVMe] prints the NVMe Error Information log.
1049 Only the 16 most recent log entries are printed by default.
1050 This number can be changed by the optional parameter NUM. The
1051 maximum number of log entries is vendor specific (in the range
1052 from 1 to 256 inclusive).
1053
1054 xerror[,NUM][,error] - [ATA only] prints the Extended Comprehen‐
1055 sive SMART error log (General Purpose Log address 0x03). Unlike
1056 the Summary SMART error log (see '-l error' above), it provides
1057 sufficient space to log the contents of the 48-bit LBA register
1058 set introduced with ATA-6. It also supports logs with more than
1059 one sector. Each sector holds up to 4 log entries. The actual
1060 number of log sectors is vendor specific.
1061
1062 Only the 8 most recent error log entries are printed by default.
1063 This number can be changed by the optional parameter NUM.
1064
1065 If ',error' is appended and the Extended Comprehensive SMART er‐
1066 ror log is not supported, the Summary SMART self-test log is
1067 printed.
1068
1069 Please note that recent drives may report errors only in the Ex‐
1070 tended Comprehensive SMART error log. The Summary SMART error
1071 log may be reported as supported but is always empty then.
1072
1073 selftest - [ATA] prints the SMART self-test log. The disk main‐
1074 tains a self-test log showing the results of the self tests,
1075 which can be run using the '-t' option described below. For
1076 each of the most recent twenty-one self-tests, the log shows the
1077 type of test (short or extended, off-line or captive) and the
1078 final status of the test. If the test did not complete success‐
1079 fully, then the percentage of the test remaining is shown. The
1080 time at which the test took place, measured in hours of disk
1081 lifetime, is also printed. [Note: this time stamp wraps after
1082 2^16 hours, or 2730 days and 16 hours, or about 7.5 years.] If
1083 any errors were detected, the Logical Block Address (LBA) of the
1084 first error is printed in decimal notation.
1085
1086 selftest - [SCSI] the self-test log for a SCSI device has a
1087 slightly different format than for an ATA device. For each of
1088 the most recent twenty self-tests, it shows the type of test and
1089 the status (final or in progress) of the test. SCSI standards
1090 use the terms "foreground" and "background" (rather than ATA's
1091 corresponding "captive" and "off-line") and "short" and "long"
1092 (rather than ATA's corresponding "short" and "extended") to de‐
1093 scribe the type of the test. The printed segment number is only
1094 relevant when a test fails in the third or later test segment.
1095 It identifies the test that failed and consists of either the
1096 number of the segment that failed during the test, or the number
1097 of the test that failed and the number of the segment in which
1098 the test was run, using a vendor-specific method of putting both
1099 numbers into a single byte. The Logical Block Address (LBA) of
1100 the first error is printed in hexadecimal notation. If pro‐
1101 vided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and
1102 Additional Sense Code Qualifier (ASCQ) are also printed. The
1103 self tests can be run using the '-t' option described below (us‐
1104 ing the ATA test terminology).
1105
1106 xselftest[,NUM][,selftest] - [ATA only] prints the Extended
1107 SMART self-test log (General Purpose Log address 0x07). Unlike
1108 the SMART self-test log (see '-l selftest' above), it supports
1109 48-bit LBA and logs with more than one sector. Each sector
1110 holds up to 19 log entries. The actual number of log sectors is
1111 vendor specific.
1112
1113 Only the 25 most recent log entries are printed by default.
1114 This number can be changed by the optional parameter NUM.
1115
1116 If ',selftest' is appended and the Extended SMART self-test log
1117 is not supported, the old SMART self-test log is printed.
1118
1119 selective - [ATA only] Please see the '-t select' option below
1120 for a description of selective self-tests. The selective self-
1121 test log shows the start/end Logical Block Addresses (LBA) of
1122 each of the five test spans, and their current test status. If
1123 the span is being tested or the remainder of the disk is being
1124 read-scanned, the current 65536-sector block of LBAs being
1125 tested is also displayed. The selective self-test log also
1126 shows if a read-scan of the remainder of the disk will be car‐
1127 ried out after the selective self-test has completed (see '-t
1128 afterselect' option) and the time delay before restarting this
1129 read-scan if it is interrupted (see '-t pending' option).
1130
1131 directory[,gs] - [ATA only] if the device supports the General
1132 Purpose Logging feature set (ATA-6 and above) then this prints
1133 the Log Directory (the log at address 0). The Log Directory
1134 shows what logs are available and their length in sectors (512
1135 bytes). The contents of the logs at address 1 [Summary SMART
1136 error log] and at address 6 [SMART self-test log] may be printed
1137 using the previously-described error and selftest arguments to
1138 this option. If your version of smartctl supports 48-bit ATA
1139 commands, both the General Purpose Log (GPL) and SMART Log (SL)
1140 directories are printed in one combined table. The output can
1141 be restricted to the GPL directory or SL directory by '-l direc‐
1142 tory,q' or '-l directory,s' respectively.
1143
1144 background - [SCSI only] the background scan results log outputs
1145 information derived from Background Media Scans (BMS) done after
1146 power up and/or periodically (e.g. every 24 hours) on recent
1147 SCSI disks. If supported, the BMS status is output first, indi‐
1148 cating whether a background scan is currently underway (and if
1149 so a progress percentage), the amount of time the disk has been
1150 powered up and the number of scans already completed. Then
1151 there is a header and a line for each background scan "event".
1152 These will typically be either recovered or unrecoverable er‐
1153 rors. That latter group may need some attention. There is a
1154 description of the background scan mechanism in section 4.18 of
1155 SBC-3 revision 6 (see www.t10.org ).
1156
1157 scttemp, scttempsts, scttemphist - [ATA only] prints the disk
1158 temperature information provided by the SMART Command Transport
1159 (SCT) commands. The option 'scttempsts' prints current tempera‐
1160 ture and temperature ranges returned by the SCT Status command,
1161 'scttemphist' prints temperature limits and the temperature his‐
1162 tory table returned by the SCT Data Table command, and 'scttemp'
1163 prints both. The temperature values are preserved across power
1164 cycles. The logging interval can be configured with the '-l
1165 scttempint,N[,p]' option, see below. The SCT commands were in‐
1166 troduced in ATA8-ACS and were also supported by many ATA-7
1167 disks.
1168
1169 scttempint,N[,p] - [ATA only] clears the SCT temperature history
1170 table and sets the time interval for temperature logging to N
1171 minutes. If ',p' is specified, the setting is preserved across
1172 power cycles. Otherwise, the setting is volatile and will be
1173 reverted to the last non-volatile setting by the next hard re‐
1174 set. The default interval is vendor specific, typical values
1175 are 1, 2, or 5 minutes.
1176
1177 scterc[,READTIME,WRITETIME][,p|reset] - [ATA only] prints values
1178 and descriptions of the SCT Error Recovery Control settings.
1179 These are equivalent to TLER (as used by Western Digital), CCTL
1180 (as used by Samsung and Hitachi/HGST) and ERC (as used by Sea‐
1181 gate). READTIME and WRITETIME arguments (deciseconds) set the
1182 specified values. Values of 0 disable the feature, other values
1183 less than 65 are probably not supported. For RAID configura‐
1184 tions, this is typically set to 70,70 deciseconds.
1185 [NEW EXPERIMENTAL SMARTCTL FEATURE] If 'scterc,READTIME,WRITE‐
1186 TIME,p' is specified, these time values will be persistent over
1187 a power-on reset. If 'scterc,p' is specified, the persistent
1188 over power-on values are printed. If 'scterc,reset' is speci‐
1189 fied, all SCT timer settings are restored to the manufacturer's
1190 default value. The ',p' and ',reset' options require the device
1191 to support ATA ACS-4 or higher.
1192
1193 devstat[,PAGE] - [ATA only] prints values and descriptions of
1194 the ATA Device Statistics log pages (General Purpose Log address
1195 0x04). If no PAGE number is specified, entries from all sup‐
1196 ported pages are printed. If PAGE 0 is specified, the list of
1197 supported pages is printed. Device Statistics was introduced in
1198 ACS-2 and is only supported by some recent devices.
1199
1200 defects[,NUM] - [ATA] prints LBA and hours values from the ATA
1201 Pending Defects log (General Purpose Log address 0x0c). Only
1202 the 31 entries from first log page are printed by default. This
1203 number can be changed by the optional parameter NUM. The size
1204 of the log and the order of the entries are vendor specific.
1205 The Pending Defects log was introduced in ACS-4 Revision 01 (Mar
1206 2014).
1207
1208 defects - [SCSI: NEW EXPERIMENTAL SMARTCTL FEATURE] prints LBAs
1209 that the background scan was unable to read (i.e. a defect). En‐
1210 tries, if any, show the defective LBA and the value of the
1211 power-on hours (since manufacture) when the background scan
1212 found the defect. Note these pending defects may appear in ad‐
1213 vance of any application trying to read a defective LBA.
1214
1215 envrep - [SCSI only: NEW EXPERIMENTAL SMARTCTL FEATURE] prints
1216 values and descriptions of the SCSI Environmental reporting log
1217 page. This includes one or more temperatures and may include
1218 relative humidities. Lifetime maximums and minimums are also re‐
1219 ported.
1220
1221 sataphy[,reset] - [SATA only] prints values and descriptions of
1222 the SATA Phy Event Counters (General Purpose Log address 0x11).
1223 If '-l sataphy,reset' is specified, all counters are reset after
1224 reading the values. This also works for SATA devices with
1225 Packet interface like CD/DVD drives.
1226
1227 sasphy[,reset] - [SAS (SCSI) only] prints values and descrip‐
1228 tions of the SAS (SSP) Protocol Specific log page (log page
1229 0x18). If '-l sasphy,reset' is specified, all counters are re‐
1230 set after reading the values.
1231
1232 tapealert - [SCSI tape drives and changers: NEW EXPERIMENTAL
1233 SMARTCTL FEATURE] prints values and descriptions of the (SSC)
1234 Tape Alert log page. See TAPE DRIVES below for issue associated
1235 with printing this log page.
1236
1237 tapedevstat - [SCSI tape drives and changers: NEW EXPERIMENTAL
1238 SMARTCTL FEATURE] prints values and descriptions of the (SSC)
1239 Device Statistics log page.
1240
1241 zdevstat - [SCSI zoned disks: NEW EXPERIMENTAL SMARTCTL FEATURE]
1242 prints values and descriptions of the Zoned Block Device Statis‐
1243 tics log page (ZBC-2).
1244
1245 gplog,ADDR[,FIRST[-LAST|+SIZE]] - [ATA only] prints a hex dump
1246 of any log accessible via General Purpose Logging (GPL) feature.
1247 The log address ADDR is the hex address listed in the log direc‐
1248 tory (see '-l directory' above). The range of log sectors
1249 (pages) can be specified by decimal values FIRST-LAST or
1250 FIRST+SIZE. FIRST defaults to 0, SIZE defaults to 1. LAST can
1251 be set to 'max' to specify the last page of the log.
1252
1253 smartlog,ADDR[,FIRST[-LAST|+SIZE]] - [ATA only] prints a hex
1254 dump of any log accessible via SMART Read Log command. See '-l
1255 gplog,...' above for parameter syntax.
1256
1257 For example, all these commands:
1258 smartctl -l gplog,0x80,10-15 /dev/sda
1259 smartctl -l gplog,0x80,10+6 /dev/sda
1260 smartctl -l smartlog,0x80,10-15 /dev/sda
1261 print pages 10–15 of log 0x80 (first host vendor specific log).
1262
1263 The hex dump format is compatible with the 'xxd -r' command.
1264 This command:
1265 smartctl -l gplog,0x11 /dev/sda | grep ^0 | xxd -r >log.bin
1266 writes a binary representation of the one sector log 0x11 (SATA
1267 Phy Event Counters) to file log.bin.
1268
1269 nvmelog,PAGE,SIZE - [NVMe only] prints a hex dump of the first
1270 SIZE bytes from the NVMe log with identifier PAGE. PAGE is a
1271 hexadecimal number in the range from 0x1 to 0xff. SIZE is a
1272 hexadecimal number in the range from 0x4 to 0x4000 (16 KiB).
1273 WARNING: Do not specify the identifier of an unknown log page.
1274 Reading a log page may have undesirable side effects.
1275
1276 ssd - [ATA] prints the Solid State Device Statistics log page.
1277 This has the same effect as '-l devstat,7', see above.
1278
1279 ssd - [SCSI] prints the Solid State Media percentage used en‐
1280 durance indicator. A value of 0 indicates as new condition
1281 while 100 indicates the device is at the end of its lifetime as
1282 projected by the manufacturer. The value may reach 255.
1283
1284 -v ID,FORMAT[:BYTEORDER][,NAME], --vendorattribute=ID,FORMAT...
1285 [ATA only] Sets a vendor-specific raw value print FORMAT, an op‐
1286 tional BYTEORDER and an optional NAME for Attribute ID. This
1287 option may be used multiple times.
1288
1289 The Attribute ID can be in the range 1 to 255. If 'N' is speci‐
1290 fied as ID, the settings for all Attributes are changed.
1291
1292 The optional BYTEORDER consists of 1 to 8 characters from the
1293 set '012345rvwz'. The characters '0' to '5' select the byte 0
1294 to 5 from the 48-bit raw value, 'r' selects the reserved byte of
1295 the attribute data block, 'v' selects the normalized value, 'w'
1296 selects the worst value and 'z' inserts a zero byte. The de‐
1297 fault BYTEORDER is '543210' for all 48-bit formats, 'r543210'
1298 for the 54-bit formats, and '543210wv' for the 64-bit formats.
1299 For example, '-v 5,raw48:012345' prints the raw value of attri‐
1300 bute 5 with big endian instead of little endian byte ordering.
1301
1302 The NAME is a string of letters, digits and underscore. Its
1303 length should not exceed 23 characters. The '-P showall' option
1304 reports an error if this is the case.
1305
1306 -v help - Prints (to STDOUT) a list of all valid arguments to
1307 this option, then exits.
1308
1309 Valid arguments for FORMAT are:
1310
1311 raw8 - Print the Raw value as six 8-bit unsigned base-10 inte‐
1312 gers. This may be useful for decoding the meaning of the Raw
1313 value.
1314
1315 raw16 - Print the Raw value as three 16-bit unsigned base-10 in‐
1316 tegers. This may be useful for decoding the meaning of the Raw
1317 value.
1318
1319 raw48 - Print the Raw value as a 48-bit unsigned base-10 inte‐
1320 ger. This is the default for most attributes.
1321
1322 hex48 - Print the Raw value as a 12 digit hexadecimal number.
1323 This may be useful for decoding the meaning of the Raw value.
1324
1325 raw56 - Print the Raw value as a 54-bit unsigned base-10 inte‐
1326 ger. This includes the reserved byte which follows the 48-bit
1327 raw value.
1328
1329 hex56 - Print the Raw value as a 14 digit hexadecimal number.
1330 This includes the reserved byte which follows the 48-bit raw
1331 value.
1332
1333 raw64 - Print the Raw value as a 64-bit unsigned base-10 inte‐
1334 ger. This includes two bytes from the normalized and worst at‐
1335 tribute value. This raw format is used by some SSD devices with
1336 Indilinx controller.
1337
1338 hex64 - Print the Raw value as a 16 digit hexadecimal number.
1339 This includes two bytes from the normalized and worst attribute
1340 value. This raw format is used by some SSD devices with Indil‐
1341 inx controller.
1342
1343 min2hour - Raw Attribute is power-on time in minutes. Its raw
1344 value will be displayed in the form "Xh+Ym". Here X is hours,
1345 and Y is minutes in the range 0–59 inclusive. Y is always
1346 printed with two digits, for example "06" or "31" or "00".
1347
1348 sec2hour - Raw Attribute is power-on time in seconds. Its raw
1349 value will be displayed in the form "Xh+Ym+Zs". Here X is
1350 hours, Y is minutes in the range 0–59 inclusive, and Z is sec‐
1351 onds in the range 0–59 inclusive. Y and Z are always printed
1352 with two digits, for example "06" or "31" or "00".
1353
1354 halfmin2hour - Raw Attribute is power-on time, measured in units
1355 of 30 seconds. This format is used by some Samsung disks. Its
1356 raw value will be displayed in the form "Xh+Ym". Here X is
1357 hours, and Y is minutes in the range 0–59 inclusive. Y is al‐
1358 ways printed with two digits, for example "06" or "31" or "00".
1359
1360 msec24hour32 - Raw Attribute is power-on time measured in 32-bit
1361 hours and 24-bit milliseconds since last hour update. It will
1362 be displayed in the form "Xh+Ym+Z.Ms". Here X is hours, Y is
1363 minutes, Z is seconds and M is milliseconds.
1364
1365 tempminmax - Raw Attribute is the disk temperature in Celsius.
1366 Info about Min/Max temperature is printed if available. This is
1367 the default for Attributes 190 and 194. The recording interval
1368 (lifetime, last power cycle, last soft reset) of the min/max
1369 values is device specific.
1370
1371 temp10x - Raw Attribute is ten times the disk temperature in
1372 Celsius.
1373
1374 raw16(raw16) - Print the raw attribute as a 16-bit value and two
1375 optional 16-bit values if these words are nonzero. This is the
1376 default for Attributes 5 and 196.
1377
1378 raw16(avg16) - Raw attribute is spin-up time. It is printed as
1379 a 16-bit value and an optional "Average" 16-bit value if the
1380 word is nonzero. This is the default for Attribute 3.
1381
1382 raw24(raw8) - Print the raw attribute as a 24-bit value and
1383 three optional 8-bit values if these bytes are nonzero. This is
1384 the default for Attribute 9.
1385
1386 raw24/raw24 - Raw Attribute contains two 24-bit values. The
1387 first is the number of load cycles. The second is the number of
1388 unload cycles. The difference between these two values is the
1389 number of times that the drive was unexpectedly powered off
1390 (also called an emergency unload). As a rule of thumb, the me‐
1391 chanical stress created by one emergency unload is equivalent to
1392 that created by one hundred normal unloads.
1393
1394 raw24/raw32 - Raw attribute is an error rate which consists of a
1395 24-bit error count and a 32-bit total count.
1396
1397 The following old arguments to '-v' are also still valid:
1398
1399 9,minutes - same as: 9,min2hour,Power_On_Minutes.
1400
1401 9,seconds - same as: 9,sec2hour,Power_On_Seconds.
1402
1403 9,halfminutes - same as: 9,halfmin2hour,Power_On_Half_Minutes.
1404
1405 9,temp - same as: 9,tempminmax,Temperature_Celsius.
1406
1407 192,emergencyretractcyclect - same as: 192,raw48,Emerg_Re‐
1408 tract_Cycle_Ct
1409
1410 193,loadunload - same as: 193,raw24/raw24.
1411
1412 194,10xCelsius - same as: 194,temp10x,Temperature_Celsius_x10.
1413
1414 194,unknown - same as: 194,raw48,Unknown_Attribute.
1415
1416 197,increasing - same as: 197,raw48,Total_Pending_Sectors. Also
1417 means that Attribute number 197 (Current Pending Sector Count)
1418 is not reset if uncorrectable sectors are reallocated (see
1419 smartd.conf(5) man page).
1420
1421 198,increasing - same as: 198,raw48,Total_Offl_Uncorrectabl.
1422 Also means that Attribute number 198 (Offline Uncorrectable Sec‐
1423 tor Count) is not reset if uncorrectable sectors are reallocated
1424 (see smartd.conf(5) man page).
1425
1426 198,offlinescanuncsectorct - same as: 198,raw48,Off‐
1427 line_Scan_UNC_SectCt.
1428
1429 200,writeerrorcount - same as: 200,raw48,Write_Error_Count.
1430
1431 201,detectedtacount - same as: 201,raw48,Detected_TA_Count.
1432
1433 220,temp - same as: 220,tempminmax,Temperature_Celsius.
1434
1435 -F TYPE, --firmwarebug=TYPE
1436 [ATA only] Modifies the behavior of smartctl to compensate for
1437 some known and understood device firmware or driver bug. This
1438 option may be used multiple times. The valid arguments are:
1439
1440 none - Assume that the device firmware obeys the ATA specifica‐
1441 tions. This is the default, unless the device has presets for
1442 '-F' in the drive database. Using this option on the command
1443 line will override any preset values.
1444
1445 nologdir - Suppresses read attempts of SMART or GP Log Direc‐
1446 tory. Support for all standard logs is assumed without an ac‐
1447 tual check. Some Intel SSDs may freeze if log address 0 is
1448 read.
1449
1450 samsung - In some Samsung disks (example: model SV4012H Firmware
1451 Version: RM100-08) some of the two- and four-byte quantities in
1452 the SMART data structures are byte-swapped (relative to the ATA
1453 specification). Enabling this option tells smartctl to evaluate
1454 these quantities in byte-reversed order. Some signs that your
1455 disk needs this option are (1) no self-test log printed, even
1456 though you have run self-tests; (2) very large numbers of ATA
1457 errors reported in the ATA error log; (3) strange and impossible
1458 values for the ATA error log timestamps.
1459
1460 samsung2 - In some Samsung disks the number of ATA errors re‐
1461 ported is byte swapped. Enabling this option tells smartctl to
1462 evaluate this quantity in byte-reversed order. An indication
1463 that your Samsung disk needs this option is that the self-test
1464 log is printed correctly, but there are a very large number of
1465 errors in the SMART error log. This is because the error count
1466 is byte swapped. Thus a disk with five errors (0x0005) will ap‐
1467 pear to have 20480 errors (0x5000).
1468
1469 samsung3 - Some Samsung disks (at least SP2514N with Firmware
1470 VF100-37) report a self-test still in progress with 0% remaining
1471 when the test was already completed. Enabling this option modi‐
1472 fies the output of the self-test execution status (see options
1473 '-c' or '-a' above) accordingly.
1474
1475 xerrorlba - Fixes LBA byte ordering in Extended Comprehensive
1476 SMART error log. Some disks use little endian byte ordering in‐
1477 stead of ATA register ordering to specify the LBA addresses in
1478 the log entries.
1479
1480 swapid - Fixes byte swapped ATA identify strings (device name,
1481 serial number, firmware version) returned by some buggy device
1482 drivers.
1483
1484 -P TYPE, --presets=TYPE
1485 [ATA only] Specifies whether smartctl should use any preset op‐
1486 tions that are available for this drive. By default, if the
1487 drive is recognized in the smartmontools database, then the pre‐
1488 sets are used.
1489
1490 The argument show will show any preset options for your drive
1491 and the argument showall will show all known drives in the
1492 smartmontools database, along with their preset options. If
1493 there are no presets for your drive and you think there should
1494 be (for example, a -v or -F option is needed to get smartctl to
1495 display correct values) then please contact the smartmontools
1496 developers so that this information can be added to the smart‐
1497 montools database. Contact information is at the end of this
1498 man page.
1499
1500 The valid arguments to this option are:
1501
1502 use - if a drive is recognized, then use the stored presets for
1503 it. This is the default. Note that presets will NOT override
1504 additional Attribute interpretation ('-v N,something') command-
1505 line options or explicit '-F' command-line options..
1506
1507 ignore - do not use presets.
1508
1509 show - show if the drive is recognized in the database, and if
1510 so, its presets, then exit.
1511
1512 showall - list all recognized drives, and the presets that are
1513 set for them, then exit. This also checks the drive database
1514 regular expressions and settings for syntax errors.
1515
1516 The '-P showall' option takes up to two optional arguments to
1517 match a specific drive type and firmware version. The command:
1518 smartctl -P showall
1519 lists all entries, the command:
1520 smartctl -P showall 'MODEL'
1521 lists all entries matching MODEL, and the command:
1522 smartctl -P showall 'MODEL' 'FIRMWARE'
1523 lists all entries for this MODEL and a specific FIRMWARE ver‐
1524 sion.
1525
1526 -B [+]FILE, --drivedb=[+]FILE
1527 [ATA only] Read the drive database from FILE. The new database
1528 replaces the built in database by default. If '+' is specified,
1529 then the new entries prepend the built in entries.
1530
1531 Optional entries are read from the file /etc/smartmon‐
1532 tools/smart_drivedb.h if this option is not specified.
1533
1534 If /usr/share/smartmontools/drivedb.h is present, the contents
1535 of this file is used instead of the built in table.
1536
1537 Run /usr/sbin/update-smart-drivedb to update this file from the
1538 smartmontools SVN repository.
1539
1540 The database files use the same C/C++ syntax that is used to
1541 initialize the built in database array. C/C++ style comments
1542 are allowed. Example:
1543
1544 /* Full entry: */
1545 {
1546 "Model family", // Info about model family/series.
1547 "MODEL1.*REGEX", // Regular expression to match model of device.
1548 "VERSION.*REGEX", // Regular expression to match firmware version(s).
1549 "Some warning", // Warning message.
1550 "-v 9,minutes" // String of preset -v and -F options.
1551 },
1552 /* Minimal entry: */
1553 {
1554 "", // No model family/series info.
1555 "MODEL2.*REGEX", // Regular expression to match model of device.
1556 "", // All firmware versions.
1557 "", // No warning.
1558 "" // No options preset.
1559 },
1560 /* USB ID entry: */
1561 {
1562 "USB: Device; Bridge", // Info about USB device and bridge name.
1563 "0x1234:0xabcd", // Regular expression to match vendor:product ID.
1564 "0x0101", // Regular expression to match bcdDevice.
1565 "", // Not used.
1566 "-d sat" // String with device type option.
1567 },
1568 /* ... */
1569
1570
1571 SMART RUN/ABORT OFFLINE TEST AND self-test OPTIONS:
1572
1573 -t TEST, --test=TEST
1574 Executes TEST immediately. The '-C' option can be used in con‐
1575 junction with this option to run the short or long (and also for
1576 ATA devices, selective or conveyance) self-tests in captive mode
1577 (known as "foreground mode" for SCSI devices). Note that only
1578 one test type can be run at a time, so only one test type should
1579 be specified per command line. Note also that if a computer is
1580 shutdown or power cycled during a self-test, no harm should re‐
1581 sult. The self-test will either be aborted or will resume auto‐
1582 matically.
1583
1584 All '-t TEST' commands can be given during normal system opera‐
1585 tion unless captive mode ('-C' option) is used. A running self-
1586 test can, however, degrade performance of the drive. Frequent
1587 I/O requests from the operating system increase the duration of
1588 a test. These impacts may vary from device to device.
1589
1590 If a test failure occurs then the device may discontinue the
1591 testing and report the result immediately.
1592
1593 [ATA] Note that the ATA command SMART EXECUTE OFF-LINE IMMEDIATE
1594 (the command to start a test) was declared obsolete in ATA ACS-4
1595 Revision 10 (Nov 2015).
1596
1597 The valid arguments to this option are:
1598
1599 offline - [ATA] runs SMART Immediate Offline Test. This immedi‐
1600 ately starts the test described above. This command can be
1601 given during normal system operation. The effects of this test
1602 are visible only in that it updates the SMART Attribute values,
1603 and if errors are found they will appear in the SMART error log,
1604 visible with the '-l error' option.
1605
1606 If the '-c' option to smartctl shows that the device has the
1607 "Suspend Offline collection upon new command" capability then
1608 you can track the progress of the Immediate Offline test using
1609 the '-c' option to smartctl. If the '-c' option show that the
1610 device has the "Abort Offline collection upon new command" capa‐
1611 bility then most commands will abort the Immediate Offline Test,
1612 so you should not try to track the progress of the test with
1613 '-c', as it will abort the test.
1614
1615 offline - [SCSI] runs the default self test in foreground. No
1616 entry is placed in the self test log.
1617
1618 short - [ATA] runs SMART Short Self Test (usually under ten min‐
1619 utes). This command can be given during normal system operation
1620 (unless run in captive mode - see the '-C' option below). This
1621 is a test in a different category than the immediate or auto‐
1622 matic offline tests. The "Self" tests check the electrical and
1623 mechanical performance as well as the read performance of the
1624 disk. Their results are reported in the Self Test Error Log,
1625 readable with the '-l selftest' option. Note that on some disks
1626 the progress of the self-test can be monitored by watching this
1627 log during the self-test; with other disks use the '-c' option
1628 to monitor progress.
1629
1630 short - [SCSI] runs the "Background short" self-test.
1631
1632 long - [ATA] runs SMART Extended Self Test (tens of minutes to
1633 several hours). This is a longer and more thorough version of
1634 the Short Self Test described above. Note that this command can
1635 be given during normal system operation (unless run in captive
1636 mode - see the '-C' option below).
1637
1638 long - [SCSI] runs the "Background long" self-test.
1639
1640 conveyance - [ATA only] runs a SMART Conveyance Self Test (min‐
1641 utes). This self-test routine is intended to identify damage
1642 incurred during transporting of the device. This self-test rou‐
1643 tine should take on the order of minutes to complete. Note that
1644 this command can be given during normal system operation (unless
1645 run in captive mode - see the '-C' option below).
1646
1647 select,N-M, select,N+SIZE - [ATA only] runs a SMART Selective
1648 Self Test, to test a range of disk Logical Block Addresses
1649 (LBAs), rather than the entire disk. Each range of LBAs that is
1650 checked is called a "span" and is specified by a starting LBA
1651 (N) and an ending LBA (M) with N less than or equal to M. The
1652 range can also be specified as N+SIZE. A span at the end of a
1653 disk can be specified by N-max.
1654
1655 For example the commands:
1656 smartctl -t select,10-20 /dev/sda
1657 smartctl -t select,10+11 /dev/sda
1658 both runs a self test on one span consisting of LBAs ten to
1659 twenty (inclusive). The command:
1660 smartctl -t select,100000000-max /dev/sda
1661 run a self test from LBA 100000000 up to the end of the disk.
1662 The '-t' option can be given up to five times, to test up to
1663 five spans. For example the command:
1664 smartctl -t select,0-100 -t select,1000-2000 /dev/sda
1665 runs a self test on two spans. The first span consists of 101
1666 LBAs and the second span consists of 1001 LBAs. Note that the
1667 spans can overlap partially or completely, for example:
1668 smartctl -t select,0-10 -t select,5-15 -t select,10-20 /dev/sda
1669 The results of the selective self-test can be obtained (both
1670 during and after the test) by printing the SMART self-test log,
1671 using the '-l selftest' option to smartctl.
1672
1673 Selective self tests are particularly useful as disk capacities
1674 increase: an extended self test (smartctl -t long) can take sev‐
1675 eral hours. Selective self-tests are helpful if (based on SYS‐
1676 LOG error messages, previous failed self-tests, or SMART error
1677 log entries) you suspect that a disk is having problems at a
1678 particular range of Logical Block Addresses (LBAs).
1679
1680 Selective self-tests can be run during normal system operation
1681 (unless done in captive mode - see the '-C' option below).
1682
1683 The following variants of the selective self-test command use
1684 spans based on the ranges from past tests already stored on the
1685 disk:
1686
1687 select,redo[+SIZE] - [ATA only] redo the last SMART Selective
1688 Self Test using the same LBA range. The starting LBA is identi‐
1689 cal to the LBA used by last test, same for ending LBA unless a
1690 new span size is specified by optional +SIZE argument.
1691
1692 For example the commands:
1693 smartctl -t select,10-20 /dev/sda
1694 smartctl -t select,redo /dev/sda
1695 smartctl -t select,redo+20 /dev/sda
1696 have the same effect as:
1697 smartctl -t select,10-20 /dev/sda
1698 smartctl -t select,10-20 /dev/sda
1699 smartctl -t select,10-29 /dev/sda
1700
1701 select,next[+SIZE] - [ATA only] runs a SMART Selective Self Test
1702 on the LBA range which follows the range of the last test. The
1703 starting LBA is set to (ending LBA +1) of the last test. A new
1704 span size may be specified by the optional +SIZE argument.
1705
1706 For example the commands:
1707 smartctl -t select,0-999 /dev/sda
1708 smartctl -t select,next /dev/sda
1709 smartctl -t select,next+2000 /dev/sda
1710 have the same effect as:
1711 smartctl -t select,0-999 /dev/sda
1712 smartctl -t select,1000-1999 /dev/sda
1713 smartctl -t select,2000-3999 /dev/sda
1714
1715 If the last test ended at the last LBA of the disk, the new
1716 range starts at LBA 0. The span size of the last span of a disk
1717 is adjusted such that the total number of spans to check the
1718 full disk will not be changed by future uses of '-t se‐
1719 lect,next'.
1720
1721 select,cont[+SIZE] - [ATA only] performs a 'redo' (above) if the
1722 self test status reports that the last test was aborted by the
1723 host. Otherwise it run the 'next' (above) test.
1724
1725 afterselect,on - [ATA only] perform an offline read scan after a
1726 Selective self-test has completed. This option must be used to‐
1727 gether with one or more of the select,N-M options above. If the
1728 LBAs that have been specified in the Selective self-test pass
1729 the test with no errors found, then read scan the remainder of
1730 the disk. If the device is powered-cycled while this read scan
1731 is in progress, the read scan will be automatically resumed af‐
1732 ter a time specified by the pending timer (see below). The
1733 value of this option is preserved between selective self-tests.
1734
1735 afterselect,off - [ATA only] do not read scan the remainder of
1736 the disk after a Selective self-test has completed. This option
1737 must be use together with one or more of the select,N-M options
1738 above. The value of this option is preserved between selective
1739 self-tests.
1740
1741 pending,N - [ATA only] set the pending offline read scan timer
1742 to N minutes. Here N is an integer in the range from 0 to 65535
1743 inclusive. If the device is powered off during a read scan af‐
1744 ter a Selective self-test, then resume the test automatically N
1745 minutes after power-up. This option must be use together with
1746 one or more of the select,N-M options above. The value of this
1747 option is preserved between selective self-tests.
1748
1749 vendor,N - [ATA only] issues the ATA command SMART EXECUTE OFF-
1750 LINE IMMEDIATE with subcommand N in LBA LOW register. The sub‐
1751 command is specified as a hex value in the range 0x00 to 0xff.
1752 Subcommands 0x40–0x7e and 0x90–0xff are reserved for vendor spe‐
1753 cific use, see table 61 of T13/1699-D Revision 6a (ATA8-ACS).
1754 Note that the subcommands 0x00–0x04, 0x7f, 0x81–0x84 are sup‐
1755 ported by other smartctl options (e.g. 0x01: '-t short', 0x7f:
1756 '-X', 0x82: '-C -t long').
1757
1758 WARNING: Only run subcommands documented by the vendor of the
1759 device.
1760
1761 Example for some Intel SSDs only: The subcommand 0x40 ('-t ven‐
1762 dor,0x40') clears the timed workload related SMART attributes
1763 (226, 227, 228). Note that the raw values of these attributes
1764 are held at 65535 (0xffff) until the workload timer reaches 60
1765 minutes.
1766
1767 force - start new self-test even if another test is already run‐
1768 ning. By default a running self-test will not be interrupted to
1769 begin another test.
1770
1771 -C, --captive
1772 [ATA] Runs self-tests in captive mode. This has no effect with
1773 '-t offline' or if the '-t' option is not used.
1774
1775 WARNING: Tests run in captive mode may busy out the drive for
1776 the length of the test. Only run captive tests on drives with‐
1777 out any mounted partitions!
1778
1779 [SCSI] Runs the self-test in "Foreground" mode.
1780
1781 -X, --abort
1782 Aborts non-captive SMART Self Tests. Note that this command
1783 will abort the Offline Immediate Test routine only if your disk
1784 has the "Abort Offline collection upon new command" capability.
1785
1786
1788 In the past there has been a clear distinction between storage devices
1789 that used the ATA and SCSI command sets. This distinction was often
1790 reflected in their device naming and hardware. Now various SCSI trans‐
1791 ports (e.g. SAS, FC and iSCSI) can interconnect to both SCSI disks
1792 (e.g. FC and SAS) and ATA disks (especially SATA). USB and IEEE 1394
1793 storage devices use the SCSI command set externally but almost always
1794 contain ATA or SATA disks (or flash). The storage subsystems in some
1795 operating systems have started to remove the distinction between ATA
1796 and SCSI in their device naming policies.
1797
1798 99% of operations that an OS performs on a disk involve the SCSI IN‐
1799 QUIRY, READ CAPACITY, READ and WRITE commands, or their ATA equiva‐
1800 lents. Since the SCSI commands are slightly more general than their
1801 ATA equivalents, many OSes are generating SCSI commands (mainly READ
1802 and WRITE) and letting a lower level translate them to their ATA equiv‐
1803 alents as the need arises. An important note here is that "lower
1804 level" may be in external equipment and hence outside the control of an
1805 OS.
1806
1807 SCSI to ATA Translation (SAT) is a standard (ANSI INCITS 431-2007) that
1808 specifies how this translation is done. For the other 1% of operations
1809 that an OS performs on a disk, SAT provides two options. First is an
1810 optional ATA PASS-THROUGH SCSI command (there are two variants). The
1811 second is a translation from the closest SCSI command. Most current
1812 interest is in the "pass-through" option.
1813
1814 The relevance to smartmontools (and hence smartctl) is that its inter‐
1815 actions with disks fall solidly into the "1%" category. So even if the
1816 OS can happily treat (and name) a disk as "SCSI", smartmontools needs
1817 to detect the native command set and act accordingly. As more storage
1818 manufacturers (including external SATA drives) comply with SAT, smart‐
1819 montools is able to automatically distinguish the native command set of
1820 the device. In some cases the '-d sat' option is needed on the command
1821 line.
1822
1823 There are also virtual disks which typically have no useful information
1824 to convey to smartmontools, but could conceivably in the future. An
1825 example of a virtual disk is the OS's view of a RAID 1 box. There are
1826 most likely two SATA disks inside a RAID 1 box. Addressing those SATA
1827 disks from a distant OS is a challenge for smartmontools. Another ap‐
1828 proach is running a tool like smartmontools inside the RAID 1 box (e.g.
1829 a Network Attached Storage (NAS) box) and fetching the logs via a
1830 browser.
1831
1832
1834 Commands for SCSI Tape drives as defined in the SSC-4 standard (ANSI
1835 INCITS 516-2013). SSC stands for "SCSI Streaming Commands". Draft
1836 standards can be found at <https://www.t10.org/> .
1837
1838 Many SMART related features of SCSI disks are shared by SCSI tape
1839 drives. One important tape-specific log page is called "TapeAlert"
1840 which is used to report abnormal conditions. Unlike most other log
1841 pages the TapeAlert log page clears pending alerts after that page is
1842 fetched (i.e. read from the tape drive). To be more precise, the
1843 TapeAlert log page is cleared for the I_T nexus (initiator-target pair)
1844 that sent the (SCSI LOG SENSE) command; so another initiator (e.g. a
1845 HBA on another machine) will still have pending alerts reported. [This
1846 clearing action can be controlled by the TAPLSD bit is the [SSC] Device
1847 Configuration Extension mode page but the original and default action
1848 remains: clear any pending TapeAlerts. The sdparm utility can be used
1849 to access and change TAPLSD.]
1850
1851 Previous versions of smartctl have supported polling the TapeAlert log
1852 page when the --health option is given. This clearing of pending alerts
1853 has created problems for other tape-specific tools. This version of
1854 smartctl will only fetch the TapeAlert log page if the --health option
1855 is given twice in the command line invocation (or the --log=tapealert
1856 option is given).
1857
1858 There are other tape-specific log pages such as --log=tapedevstat that
1859 behave normally (i.e. they don't change any state information in the
1860 tape drive).
1861
1862
1864 smartctl -a /dev/sda
1865 Print a large amount of SMART information for drive /dev/sda.
1866
1867 smartctl -s off /dev/sdd
1868 Disable SMART monitoring and data log collection on drive /dev/sdd.
1869
1870 smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda
1871 Enable SMART on drive /dev/sda, enable automatic offline testing every
1872 four hours, and enable autosaving of SMART Attributes. This is a good
1873 start-up line for your system's init files. You can issue this command
1874 on a running system.
1875
1876 smartctl -t long /dev/sdc
1877 Begin an extended self-test of drive /dev/sdc. You can issue this com‐
1878 mand on a running system. The results can be seen in the self-test log
1879 visible with the '-l selftest' option after it has completed.
1880
1881 smartctl -s on -t offline /dev/sda
1882 Enable SMART on the disk, and begin an immediate offline test of drive
1883 /dev/sda. You can issue this command on a running system. The results
1884 are only used to update the SMART Attributes, visible with the '-A' op‐
1885 tion. If any device errors occur, they are logged to the SMART error
1886 log, which can be seen with the '-l error' option.
1887
1888 smartctl -A -v 9,minutes /dev/sda
1889 Shows the vendor Attributes, when the disk stores its power-on time in‐
1890 ternally in minutes rather than hours.
1891
1892 smartctl -q errorsonly -H -l selftest /dev/sda
1893 Produces output only if the device returns failing SMART status, or if
1894 some of the logged self-tests ended with errors.
1895
1896 smartctl -q silent -a /dev/sda
1897 Examine all SMART data for device /dev/sda, but produce no printed out‐
1898 put. You must use the exit status (the $? shell variable) to learn if
1899 any Attributes are out of bound, if the SMART status is failing, if
1900 there are errors recorded in the self-test log, or if there are errors
1901 recorded in the disk error log.
1902
1903 smartctl -a -d 3ware,0 /dev/twl0
1904 Examine all SMART data for the first SATA (not SAS) disk connected to a
1905 3ware RAID 9750 controller card.
1906
1907 smartctl -t long -d areca,4 /dev/sg2
1908 Start a long self-test on the fourth SATA disk connected to an Areca
1909 RAID controller addressed by /dev/sg2.
1910
1911 smartctl -a -d hpt,1/3 /dev/sda (under Linux)
1912 smartctl -a -d hpt,1/3 /dev/hptrr (under FreeBSD)
1913 Examine all SMART data for the (S)ATA disk directly connected to the
1914 third channel of the first HighPoint RocketRAID controller card.
1915
1916 smartctl -t short -d hpt,1/1/2 /dev/sda (under Linux)
1917 smartctl -t short -d hpt,1/1/2 /dev/hptrr (under FreeBSD)
1918 Start a short self-test on the (S)ATA disk connected to second pmport
1919 on the first channel of the first HighPoint RocketRAID controller card.
1920
1921 smartctl -t select,10-100 -t select,30-300 -t afterselect,on -t pend‐
1922 ing,45 /dev/sda
1923 Run a selective self-test on LBAs 10 to 100 and 30 to 300. After the
1924 these LBAs have been tested, read-scan the remainder of the disk. If
1925 the disk is power-cycled during the read-scan, resume the scan 45 min‐
1926 utes after power to the device is restored.
1927
1928 smartctl -a -d cciss,0 /dev/cciss/c0d0
1929 Examine all SMART data for the first SCSI disk connected to a cciss
1930 RAID controller card.
1931
1932
1934 The exit statuses of smartctl are defined by a bitmask. If all is well
1935 with the disk, the exit status (return value) of smartctl is 0 (all
1936 bits turned off). If a problem occurs, or an error, potential error,
1937 or fault is detected, then a non-zero status is returned. In this
1938 case, the eight different bits in the exit status have the following
1939 meanings for ATA disks; some of these values may also be returned for
1940 SCSI disks.
1941
1942 Bit 0: Command line did not parse.
1943
1944 Bit 1: Device open failed, device did not return an IDENTIFY DEVICE
1945 structure, or device is in a low-power mode (see '-n' option
1946 above).
1947
1948 Bit 2: Some SMART or other ATA command to the disk failed, or there was
1949 a checksum error in a SMART data structure (see '-b' option
1950 above).
1951
1952 Bit 3: SMART status check returned "DISK FAILING".
1953
1954 Bit 4: We found prefail Attributes <= threshold.
1955
1956 Bit 5: SMART status check returned "DISK OK" but we found that some
1957 (usage or prefail) Attributes have been <= threshold at some
1958 time in the past.
1959
1960 Bit 6: The device error log contains records of errors.
1961
1962 Bit 7: The device self-test log contains records of errors. [ATA only]
1963 Failed self-tests outdated by a newer successful extended self-
1964 test are ignored.
1965
1966 To test within the shell for whether or not the different bits are
1967 turned on or off, you can use the following type of construction (which
1968 should work with any POSIX compatible shell):
1969 smartstat=$(($? & 8))
1970 This looks at only at bit 3 of the exit status $? (since 8=2^3). The
1971 shell variable $smartstat will be nonzero if SMART status check re‐
1972 turned "disk failing" and zero otherwise.
1973
1974 This shell script prints all status bits:
1975 val=$?; mask=1
1976 for i in 0 1 2 3 4 5 6 7; do
1977 echo "Bit $i: $(((val & mask) && 1))"
1978 mask=$((mask << 1))
1979 done
1980
1981
1983 /usr/sbin/smartctl
1984 full path of this executable.
1985
1986 /usr/share/smartmontools/drivedb.h
1987 drive database (see '-B' option).
1988
1989 /etc/smartmontools/smart_drivedb.h
1990 optional local drive database (see '-B' option).
1991
1992
1994 Bruce Allen (project initiator),
1995 Christian Franke (project manager, Windows port and all sort of
1996 things),
1997 Douglas Gilbert (SCSI subsystem),
1998 Volker Kuhlmann (moderator of support and database mailing list),
1999 Gabriele Pohl (wiki & development team support),
2000 Alex Samorukov (FreeBSD port and more, new Trac wiki).
2001
2002 Many other individuals have made contributions and corrections, see AU‐
2003 THORS, ChangeLog and repository files.
2004
2005 The first smartmontools code was derived from the smartsuite package,
2006 written by Michael Cornwell and Andre Hedrick.
2007
2008
2010 To submit a bug report, create a ticket in smartmontools wiki:
2011 <https://www.smartmontools.org/>.
2012 Alternatively send the info to the smartmontools support mailing list:
2013 <https://listi.jpberlin.de/mailman/listinfo/smartmontools-support>.
2014
2015
2017 smartd(8).
2018 update-smart-drivedb(8).
2019
2020
2022 Please see the following web site for more info: <https://www.smartmon‐
2023 tools.org/>
2024
2025 An introductory article about smartmontools is Monitoring Hard Disks
2026 with SMART, by Bruce Allen, Linux Journal, January 2004, pages 74–77.
2027 See <https://www.linuxjournal.com/article/6983>.
2028
2029 If you would like to understand better how SMART works, and what it
2030 does, a good place to start is with Sections 4.8 and 6.54 of the first
2031 volume of the 'AT Attachment with Packet Interface-7' (ATA/ATAPI-7)
2032 specification Revision 4b. This documents the SMART functionality
2033 which the smartmontools utilities provide access to.
2034
2035 The functioning of SMART was originally defined by the SFF-8035i revi‐
2036 sion 2 and the SFF-8055i revision 1.4 specifications. These are publi‐
2037 cations of the Small Form Factors (SFF) Committee.
2038
2039 Links to these and other documents may be found on the Links page of
2040 the smartmontools Wiki at <https://www.smartmontools.org/wiki/Links>.
2041
2042
2044 smartmontools-7.3 2022-02-28 r5338
2045 $Id: smartctl.8.in 5333 2022-02-26 00:15:22Z dpgilbert $
2046
2047
2048
2049smartmontools-7.3 2022-02-28 SMARTCTL(8)