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