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