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