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