1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

root/trunk/smartmontools/smartctl.8.in @ 3706

Revision 3706, 91.7 KB (checked in by samm2, 6 months ago)

smartctl: implemented -s wcache [SCSI], new option -g/-s rcache to control RCD bit [SCSI]

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