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