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