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