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