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