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