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