root/trunk/smartmontools/smartd.conf.5.in @ 3128

Revision 3128, 55.3 KB (checked in by chrfranke, 4 years ago)

Linux: Support SATA drives on LSI 3ware 9750 controllers (ticket #86).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1.ig
2Copyright (C) 2002-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
3
4$Id$
5
6This program is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 2, or (at your option) any later
9version.
10
11You should have received a copy of the GNU General Public License (for
12example COPYING); if not, write to the Free Software Foundation, Inc., 675
13Mass Ave, Cambridge, MA 02139, USA.
14
15This code was originally developed as a Senior Thesis by Michael Cornwell
16at the Concurrent Systems Laboratory (now part of the Storage Systems
17Research Center), Jack Baskin School of Engineering, University of
18California, Santa Cruz. http://ssrc.soe.ucsc.edu/
19..
20.TH SMARTD.CONF 5 CURRENT_SVN_DATE CURRENT_SVN_VERSION CURRENT_SVN_DATE
21.SH NAME
22\fBsmartd.conf\fP \- SMART Disk Monitoring Daemon Configuration File\fP
23
24.SH FULL PATH
25.B /usr/local/etc/smartd.conf
26
27.SH PACKAGE VERSION
28CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
29
30.SH DESCRIPTION
31\fB/usr/local/etc/smartd.conf\fP is the configuration file for the \fBsmartd\fP
32daemon, which monitors the Self-Monitoring, Analysis and Reporting
33Technology (SMART) system built into many ATA-3 and later ATA, IDE and
34SCSI-3 hard drives.
35
36If the configuration file \fB/usr/local/etc/smartd.conf\fP is present,
37\fBsmartd\fP reads it at startup, before \fBfork\fP(2)ing into the
38background. If \fBsmartd\fP subsequently receives a \fBHUP\fP signal,
39it will then re-read the configuration file.  If \fBsmartd\fP is
40running in debug mode, then an \fBINT\fP signal will also make it
41re-read the configuration file. This signal can be generated by typing
42\fB\<CONTROL-C\>\fP in the terminal window where \fBsmartd\fP is
43running.
44
45.\" DO NOT MODIFY THIS OR THE FOLLOWING TWO LINES. WHAT FOLLOWS
46.\" IS AUTOMATICALLY INCLUDED FROM THE FILE smartd.8.in
47.\" STARTINCLUDE
48
49.SH CONFIGURATION FILE /usr/local/etc/smartd.conf
50In the absence of a configuration file, under Linux
51\fBsmartd\fP
52will try to open the 20 ATA devices
53.B /dev/hd[a-t]
54and the 26 SCSI devices
55.B /dev/sd[a-z].
56Under FreeBSD,
57\fBsmartd\fP
58will try to open all existing ATA devices (with entries in /dev)
59.B /dev/ad[0-9]+
60and all existing SCSI devices (using CAM subsystem). 
61Under NetBSD/OpenBSD,
62\fBsmartd\fP
63will try to open all existing ATA devices (with entries in /dev)
64.B /dev/wd[0-9]+c
65and all existing SCSI devices
66.B /dev/sd[0-9]+c.
67Under Solaris \fBsmartd\fP will try to open all entries \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
68devices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices.
69Under Windows \fBsmartd\fP will try to open all entries \fB"/dev/hd[a-j]"\fP ("\\\\.\\PhysicalDrive[0-9]")
70for IDE/ATA devices on WinNT4/2000/XP, \fB"/dev/hd[a-d]"\fP
71(bitmask from "\\\\.\\SMARTVSD") for IDE/ATA devices on Win95/98/98SE/ME,
72and \fB"/dev/scsi[0-9][0-7]"\fP (ASPI adapter 0-9, ID 0-7) for SCSI
73devices on all versions of Windows.
74Under Darwin, \fBsmartd\fP will open any ATA block storage device.
75
76This can be annoying if you have an ATA or SCSI device that hangs or
77misbehaves when receiving SMART commands.  Even if this causes no
78problems, you may be annoyed by the string of error log messages about
79block-major devices that can\'t be found, and SCSI devices that can\'t
80be opened.
81
82One can avoid this problem, and gain more control over the types of
83events monitored by
84\fBsmartd\fP,
85by using the configuration file
86.B /usr/local/etc/smartd.conf.
87This file contains a list of devices to monitor, with one device per
88line.  An example file is included with the
89.B smartmontools
90distribution. You will find this sample configuration file in
91\fB/usr/local/share/doc/smartmontools/\fP. For security, the configuration file
92should not be writable by anyone but root. The syntax of the file is as
93follows:
94.IP \(bu 4
95There should be one device listed per line, although you may have
96lines that are entirely comments or white space.
97.IP \(bu 4
98Any text following a hash sign \'#\' and up to the end of the line is
99taken to be a comment, and ignored.
100.IP \(bu 4
101Lines may be continued by using a backslash \'\e\' as the last
102non-whitespace or non-comment item on a line.
103.IP \(bu 4
104Note: a line whose first character is a hash sign \'#\' is treated as
105a white-space blank line, \fBnot\fP as a non-existent line, and will
106\fBend\fP a continuation line.
107.PP 0
108.fi
109Here is an example configuration file.  It\'s for illustrative purposes
110only; please don\'t copy it onto your system without reading to the end
111of the
112.B DIRECTIVES
113Section below!
114
115.nf
116.B ################################################
117.B # This is an example smartd startup config file
118.B # /usr/local/etc/smartd.conf for monitoring three
119.B # ATA disks, three SCSI disks, six ATA disks
120.B # behind two 3ware controllers, three SATA disks
121.B # directly connected to the HighPoint Rocket-
122.B # RAID controller, two SATA disks connected to
123.B # the HighPoint RocketRAID controller via a pmport
124.B # device, four SATA disks connected to an Areca
125.B # RAID controller, and one SATA disk.
126.B #
127.nf
128.B # First ATA disk on two different interfaces. On
129.B # the second disk, start a long self-test every
130.B # Sunday between 3 and 4 am.
131.B #
132.B \ \ /dev/hda -a -m admin@example.com,root@localhost
133.B \ \ /dev/hdc -a -I 194 -I 5 -i 12 -s L/../../7/03
134.B #
135.nf
136.B # SCSI disks.  Send a TEST warning email to admin on
137.B # startup.
138.B #
139.B \ \ /dev/sda
140.B \ \ /dev/sdb -m admin@example.com -M test
141.B #
142.nf
143.B # Strange device.  It\'s SCSI. Start a scheduled
144.B # long self test between 5 and 6 am Monday/Thursday
145.B \ \ /dev/weird -d scsi -s L/../../(1|4)/05
146.B #
147.nf
148.B # An ATA disk may appear as a SCSI device to the
149.B # OS. If a SCSI to ATA Translation (SAT) layer
150.B # is between the OS and the device then this can be
151.B # flagged with the '-d sat' option. This situation
152.B # may become common with SATA disks in SAS and FC
153.B # environments.
154.B \ \ /dev/sda -a -d sat
155.B #
156.nf
157.B # Three disks connected to a MegaRAID controller
158.B # Start short self-tests daily between 1-2, 2-3, and
159.B # 3-4 am.
160.B \ \ /dev/sda -d megaraid,0 -a -s S/../.././01
161.B \ \ /dev/sda -d megaraid,1 -a -s S/../.././02
162.B \ \ /dev/sda -d megaraid,2 -a -s S/../.././03
163.B
164.B #
165.nf
166.B # Four ATA disks on a 3ware 6/7/8000 controller.
167.B # Start short self-tests daily between midnight and 1am,
168.B # 1-2, 2-3, and 3-4 am.  Starting with the Linux 2.6
169.B # kernel series, /dev/sdX is deprecated in favor of
170.B # /dev/tweN.  For example replace /dev/sdc by /dev/twe0
171.B # and /dev/sdd by /dev/twe1.
172.B \ \ /dev/sdc -d 3ware,0 -a -s S/../.././00
173.B \ \ /dev/sdc -d 3ware,1 -a -s S/../.././01
174.B \ \ /dev/sdd -d 3ware,2 -a -s S/../.././02
175.B \ \ /dev/sdd -d 3ware,3 -a -s S/../.././03
176.B #
177.nf
178.B # Two ATA disks on a 3ware 9000 controller.
179.B # Start long self-tests Sundays between midnight and
180.B # 1am and 2-3 am
181.B \ \ /dev/twa0 -d 3ware,0 -a -s L/../../7/00
182.B \ \ /dev/twa0 -d 3ware,1 -a -s L/../../7/02
183.B #
184.nf
185.B # Two SATA (not SAS) disks on a 3ware 9750 controller.
186.B # Start long self-tests Sundays between midnight and
187.B # 1am and 2-3 am
188.B \ \ /dev/twl0 -d 3ware,0 -a -s L/../../7/00
189.B \ \ /dev/twl0 -d 3ware,1 -a -s L/../../7/02
190.B #
191.nf
192.B # Three SATA disks on a HighPoint RocketRAID controller.
193.B # Start short self-tests daily between 1-2, 2-3, and
194.B # 3-4 am.
195.B # under Linux
196.B \ \ /dev/sde -d hpt,1/1 -a -s S/../.././01
197.B \ \ /dev/sde -d hpt,1/2 -a -s S/../.././02
198.B \ \ /dev/sde -d hpt,1/3 -a -s S/../.././03
199.B # or under FreeBSD
200.B # /dev/hptrr -d hpt,1/1 -a -s S/../.././01
201.B # /dev/hptrr -d hpt,1/2 -a -s S/../.././02
202.B # /dev/hptrr -d hpt,1/3 -a -s S/../.././03
203.B #
204.nf
205.B # Two SATA disks connected to a HighPoint RocketRAID
206.B # via a pmport device.  Start long self-tests Sundays
207.B # between midnight and 1am and 2-3 am.
208.B # under Linux
209.B \ \ /dev/sde -d hpt,1/4/1 -a -s L/../../7/00
210.B \ \ /dev/sde -d hpt,1/4/2 -a -s L/../../7/02
211.B # or under FreeBSD
212.B # /dev/hptrr -d hpt,1/4/1 -a -s L/../../7/00
213.B # /dev/hptrr -d hpt,1/4/2 -a -s L/../../7/02
214.B #
215.nf
216.B # Three SATA disks connected to an Areca
217.B # RAID controller. Start long self-tests Sundays
218.B # between midnight and 3 am.
219.B \ \ /dev/sg2 -d areca,1 -a -s L/../../7/00
220.B \ \ /dev/sg2 -d areca,2 -a -s L/../../7/01
221.B \ \ /dev/sg2 -d areca,3 -a -s L/../../7/02
222.B #
223.nf
224.B # The following line enables monitoring of the
225.B # ATA Error Log and the Self-Test Error Log. 
226.B # It also tracks changes in both Prefailure
227.B # and Usage Attributes, apart from Attributes
228.B # 9, 194, and 231, and shows  continued lines:
229.B #
230.B \ \ /dev/hdd\ -l\ error\ \e
231.B \ \ \ \ \ \ \ \ \ \ \ -l\ selftest\ \e
232.B \ \ \ \ \ \ \ \ \ \ \ -t\ \e\ \ \ \ \ \ # Attributes not tracked:
233.B \ \ \ \ \ \ \ \ \ \ \ -I\ 194\ \e\ \ # temperature
234.B \ \ \ \ \ \ \ \ \ \ \ -I\ 231\ \e\ \ # also temperature
235.B \ \ \ \ \ \ \ \ \ \ \ -I 9\ \ \ \ \ \ # power-on hours
236.B #
237.B ################################################
238.fi
239
240.PP
241.SH CONFIGURATION FILE DIRECTIVES
242.PP
243
244If a non-comment entry in the configuration file is the text string
245.B DEVICESCAN
246in capital letters, then
247\fBsmartd\fP
248will ignore any remaining lines in the configuration file, and will
249scan for devices.
250.B DEVICESCAN
251may optionally be followed by Directives that will apply to all
252devices that are found in the scan.  Please see below for additional
253details.
254
255.sp 2
256The following are the Directives that may appear following the device
257name or
258.B DEVICESCAN
259on any line of the
260.B /usr/local/etc/smartd.conf
261configuration file. Note that
262.B these are NOT command-line options for
263\fBsmartd\fP.
264The Directives below may appear in any order, following the device
265name.
266
267.B For an ATA device,
268if no Directives appear, then the device will be monitored
269as if the \'\-a\' Directive (monitor all SMART properties) had been given.
270
271.B If a SCSI disk is listed,
272it will be monitored at the maximum implemented level: roughly
273equivalent to using the \'\-H \-l selftest\' options for an ATA disk.
274So with the exception of \'\-d\', \'\-m\', \'\-l selftest\', \'\-s\', and
275\'\-M\', the Directives below are ignored for SCSI disks.  For SCSI
276disks, the \'\-m\' Directive sends a warning email if the SMART status
277indicates a disk failure or problem, if the SCSI inquiry about disk
278status fails, or if new errors appear in the self-test log.
279
280.B If a 3ware controller is used
281then the corresponding SCSI (/dev/sd?) or character device (/dev/twe?,
282/dev/twa? or /dev/twl?) must be listed, along with the \'\-d 3ware,N\'
283Directive (see below).  The individual ATA disks hosted by the 3ware
284controller appear to \fBsmartd\fP as normal ATA devices.  Hence all
285the ATA directives can be used for these disks (but see note below).
286
287.B If an Areca controller is used
288then the corresponding SCSI generic device (/dev/sg?)  must be listed,
289along with the \'\-d areca,N\' Directive (see below).  The individual
290SATA disks hosted by the Areca controller appear to \fBsmartd\fP as
291normal ATA devices.  Hence all the ATA directives can be used for
292these disks.  Areca firmware version 1.46 or later which supports
293smartmontools must be used; Please see the \fBsmartctl\fP(8) man page
294for further details.
295.TP
296.B \-d TYPE
297Specifies the type of the device.  This Directive may be used multiple
298times for one device, but the arguments \fIata\fP, \fIscsi\fP,
299\fIsat\fP, \fImarvell\fP, \fIcciss,N\fP, \fIareca,N\fP, \fImegaraid,N\fP
300and \fI3ware,N\fP are mutually-exclusive. If more than one is given then
301\fBsmartd\fP will use the last one which appears.
302
303If none of these three arguments is given, then \fBsmartd\fP will
304first attempt to guess the device type by looking at whether the sixth
305character in the device name is an \'s\' or an \'h\'.  This will work for
306device names like /dev/hda or /dev/sdb, and corresponds to choosing
307\fIata\fP or \fIscsi\fP respectively. If
308\fBsmartd\fP
309can\'t guess from this sixth character, then it will simply try to
310access the device using first ATA and then SCSI ioctl()s.
311
312The valid arguments to this Directive are:
313
314.I ata
315\- the device type is ATA.  This prevents
316\fBsmartd\fP
317from issuing SCSI commands to an ATA device.
318
319.I scsi
320\- the device type is SCSI.  This prevents
321\fBsmartd\fP
322from issuing ATA commands to a SCSI device.
323
324.I sat
325\- the device type is SCSI to ATA Translation (SAT).
326\fBsmartd\fP
327will generate ATA (smart) commands and then package them in
328the SAT defined ATA PASS THROUGH SCSI commands. The commands
329are then routed through the SCSI pass through interface to the
330operating system. There are two types of ATA PASS THROUGH
331SCSI commands: a 12 byte and 16 byte variant.
332\fBsmartd\fP
333can use either and defaults to the 16 byte variant. This can
334be overridden with this syntax: \'\-d sat,12\' or \'\-d sat,16\'.
335
336.I marvell
337\- Under Linux, interact with SATA disks behind Marvell chip-set
338controllers (using the Marvell rather than libata driver).
339
340.I megaraid,N
341\- the device consists of one or more SCSI/SAS/SATA disks connected
342to a MegaRAID controller.  The non-negative integer N (in the range
343of 0 to 127 inclusive) denotes which disk on the controller is monitored.
344In log files and email messages this disk will be identified as
345megaraid_disk_XXX with XXX in the range from 000 to 127 inclusive.
346
347.I 3ware,N
348\- the device consists of one or more ATA disks connected to a 3ware
349RAID controller. The non-negative integer N (in the range from 0 to 127
350inclusive) denotes which disk on the controller is monitored.  In log
351files and email messages this disk will be identified as 3ware_disk_XXX
352with XXX in the range from 000 to 127 inclusive.
353
354This Directive may at first appear confusing, because the 3ware
355controller is a SCSI device (such as /dev/sda) and should be listed as
356such in the the configuration file.
357However when the \'\-d 3ware,N\'
358Directive is used, then the corresponding disk is addressed using
359native ATA commands which are \'passed through\' the SCSI driver. All
360ATA Directives listed in this man page may be used.  Note that while
361you may use \fBany\fP of the 3ware SCSI logical devices /dev/sd? to
362address \fBany\fP of the physical disks (3ware ports), error and log
363messages will make the most sense if you always list the 3ware SCSI
364logical device corresponding to the particular physical disks.  Please
365see the \fBsmartctl\fP(8) man page for further details.
366
367ATA disks behind 3ware controllers may alternatively be accessed via a
368character device interface /dev/twe0-15 (3ware 6000/7000/8000
369controllers), /dev/twa0-15 (3ware 9000 series controllers) and
370/dev/twl0-15 (3ware 9750 series controllers).  Note that the 9000 series
371controllers may \fBonly\fP be accessed using the character device
372interface /dev/twa0-15 and not the SCSI device interface /dev/sd?.
373Please see the \fBsmartctl\fP(8) man page for further details.
374
375Note that older 3w-xxxx drivers do not pass the \'Enable Autosave\'
376(\fB-S on\fP) and \'Enable Automatic Offline\' (\fB-o on\fP) commands
377to the disk, if the SCSI interface is used, and produce these types of
378harmless syslog error messages instead: \fB\'3w-xxxx: tw_ioctl():
379Passthru size (123392) too big\'\fP. This can be fixed by upgrading to
380version 1.02.00.037 or later of the 3w-xxxx driver, or by applying a
381patch to older versions.  See
382\fBhttp://smartmontools.sourceforge.net/\fP for instructions.
383Alternatively use the character device interfaces /dev/twe0-15 (3ware
3846/7/8000 series controllers), /dev/twa0-15 (3ware 9000 series
385controllers) or /dev/twl0-15 (3ware 9750 series controllers).
386
387.I areca,N
388\- the device consists of one or more SATA disks connected to an Areca
389SATA RAID controller.  The positive integer N (in the range from 1 to
39024 inclusive) denotes which disk on the controller is monitored.  In
391log files and email messages this disk will be identifed as
392areca_disk_XX with XX in the range from 01 to 24 inclusive.
393
394.I cciss,N
395\- the device consists of one or more SCSI disks connected to a cciss
396RAID controller. The non-negative integer N (in the range from 0 to 15
397inclusive) denotes which disk on the controller is monitored.  In log
398files and email messages this disk will be identified as cciss_disk_XX
399with XX in the range from 00 to 15 inclusive.
400
401.B 3ware, MegaRAID, Areca and cciss controllers are currently ONLY supported under Linux.
402
403.I hpt,L/M/N
404\- the device consists of one or more ATA disks connected to a HighPoint
405RocketRAID controller.  The integer L is the controller id, the integer M
406is the channel number, and the integer N is the PMPort number if it is
407available. The allowed values of L are from 1 to 4 inclusive, M are from
4081 to 8 inclusive and N from 1 to 4 if PMPort available.  And also these
409values are limited by the model of the HighPoint RocketRAID controller.
410In log files and email messages this disk will be identified as
411hpt_X/X/X and X/X/X is the same as L/M/N, note if no N indicated, N set
412to the default value 1.
413
414.B HighPoint RocketRAID controllers are currently ONLY supported under Linux and FreeBSD.
415
416.I removable
417\- the device or its media is removable.  This indicates to
418\fBsmartd\fP
419that it should continue (instead of exiting, which is the default
420behavior) if the device does not appear to be present when
421\fBsmartd\fP is started.  This Directive may be used in conjunction
422with the other \'\-d\' Directives.
423.TP
424.B \-n POWERMODE[,N][,q]
425This \'nocheck\' Directive is used to prevent a disk from being
426spun-up when it is periodically polled by \fBsmartd\fP.
427
428ATA disks have five different power states. In order of increasing
429power consumption they are: \'OFF\', \'SLEEP\', \'STANDBY\', \'IDLE\',
430and \'ACTIVE\'.  Typically in the OFF, SLEEP, and STANDBY modes the
431disk\'s platters are not spinning. But usually, in response to SMART
432commands issued by \fBsmartd\fP, the disk platters are spun up.  So if
433this option is not used, then a disk which is in a low\-power mode may
434be spun up and put into a higher\-power mode when it is periodically
435polled by \fBsmartd\fP.
436
437Note that if the disk is in SLEEP mode when \fBsmartd\fP is started,
438then it won't respond to \fBsmartd\fP commands, and so the disk won't
439be registered as a device for \fBsmartd\fP to monitor. If a disk is in
440any other low\-power mode, then the commands issued by \fBsmartd\fP to
441register the disk will probably cause it to spin\-up.
442
443The \'\fB\-n\fP\' (nocheck) Directive specifies if \fBsmartd\fP\'s
444periodic checks should still be carried out when the device is in a
445low\-power mode.  It may be used to prevent a disk from being spun\-up
446by periodic \fBsmartd\fP polling.  The allowed values of POWERMODE
447are:
448
449.I never
450\- \fBsmartd\fP will poll (check) the device regardless of its power
451mode. This may cause a disk which is spun\-down to be spun\-up when
452\fBsmartd\fP checks it.  This is the default behavior if the '\-n'
453Directive is not given.
454
455.I sleep
456\- check the device unless it is in SLEEP mode.
457
458.I standby
459\- check the device unless it is in SLEEP or STANDBY mode.  In
460these modes most disks are not spinning, so if you want to prevent
461a laptop disk from spinning up each time that \fBsmartd\fP polls,
462this is probably what you want.
463
464.I idle
465\- check the device unless it is in SLEEP, STANDBY or IDLE mode.
466In the IDLE state, most disks are still spinning, so this is probably
467not what you want.
468
469Maximum number of skipped checks (in a row) can be specified by
470appending positive number \',N\' to POWERMODE (like \'\-n standby,15\').
471After N checks are skipped in a row, powermode is ignored and the
472check is performed anyway.
473
474When a periodic test is skipped, \fBsmartd\fP normally writes an
475informal log message. The message can be suppressed by appending
476the option \',q\' to POWERMODE (like \'\-n standby,q\').
477This prevents a laptop disk from spinning up due to this message.
478
479Both \',N\' and \',q\' can be specified together.
480.TP
481.B \-T TYPE
482Specifies how tolerant
483\fBsmartd\fP
484should be of SMART command failures.  The valid arguments to this
485Directive are:
486
487.I normal
488\- do not try to monitor the disk if a mandatory SMART command fails, but
489continue if an optional SMART command fails.  This is the default.
490
491.I permissive
492\- try to monitor the disk even if it appears to lack SMART
493capabilities.  This may be required for some old disks (prior to
494ATA\-3 revision 4) that implemented SMART before the SMART standards
495were incorporated into the ATA/ATAPI Specifications.  This may also be
496needed for some Maxtor disks which fail to comply with the ATA
497Specifications and don't properly indicate support for error\- or
498self\-test logging.
499
500[Please see the \fBsmartctl \-T\fP command-line option.]
501.TP
502.B \-o VALUE
503Enables or disables SMART Automatic Offline Testing when
504\fBsmartd\fP
505starts up and has no further effect.  The valid arguments to this
506Directive are \fIon\fP and \fIoff\fP.
507
508The delay between tests is vendor-specific, but is typically four
509hours.
510
511Note that SMART Automatic Offline Testing is \fBnot\fP part of the ATA
512Specification.  Please see the
513.B smartctl \-o
514command-line option documentation for further information about this
515feature.
516.TP
517.B \-S VALUE
518Enables or disables Attribute Autosave when \fBsmartd\fP
519starts up and has no further effect.  The valid arguments to this
520Directive are \fIon\fP and \fIoff\fP.  Also affects SCSI devices.
521[Please see the \fBsmartctl \-S\fP command-line option.]
522.TP
523.B \-H
524Check the SMART health status of the disk.  If any Prefailure
525Attributes are less than or equal to their threshold values, then disk
526failure is predicted in less than 24 hours, and a message at loglevel
527.B \'LOG_CRIT\'
528will be logged to syslog.  [Please see the
529.B smartctl \-H
530command-line option.]
531.TP
532.B \-l TYPE
533Reports increases in the number of errors in one of three SMART logs.  The
534valid arguments to this Directive are:
535
536.I error
537\- report if the number of ATA errors reported in the Summary SMART error log
538has increased since the last check.
539
540.I xerror
541\- [NEW EXPERIMENTAL SMARTD FEATURE] report if the number of ATA errors
542reported in the Extended Comprehensive SMART error log has increased since
543the last check.
544
545If both \'\-l error\' and \'\-l xerror\' are specified, smartd checks
546the maximum of both values.
547
548[Please see the \fBsmartctl \-l xerror\fP command-line option.]
549
550.I selftest
551\- report if the number of failed tests reported in the SMART
552Self-Test Log has increased since the last check, or if the timestamp
553associated with the most recent failed test has increased.  Note that
554such errors will \fBonly\fP be logged if you run self-tests on the
555disk (and it fails a test!).  Self-Tests can be run automatically by
556\fBsmartd\fP: please see the \fB\'\-s\'\fP Directive below.
557Self-Tests can also be run manually by using the \fB\'\-t\ short\'\fP
558and \fB\'\-t\ long\'\fP options of \fBsmartctl\fP and the results of
559the testing can be observed using the \fBsmartctl \'\-l\ selftest\'\fP
560command-line option.]
561
562[Please see the \fBsmartctl \-l\fP and \fB\-t\fP command-line
563options.]
564.TP
565.B \-s REGEXP
566Run Self-Tests or Offline Immediate Tests, at scheduled times.  A
567Self- or Offline Immediate Test will be run at the end of periodic
568device polling, if all 12 characters of the string \fBT/MM/DD/d/HH\fP
569match the extended regular expression \fBREGEXP\fP. Here:
570.RS 7
571.IP \fBT\fP 4
572is the type of the test.  The values that \fBsmartd\fP will try to
573match (in turn) are: \'L\' for a \fBL\fPong Self-Test, \'S\' for a
574\fBS\fPhort Self-Test, \'C\' for a \fBC\fPonveyance Self-Test (ATA
575only), and \'O\' for an \fBO\fPffline Immediate Test (ATA only).  As
576soon as a match is found, the test will be started and no additional
577matches will be sought for that device and that polling cycle.
578
579[NEW EXPERIMENTAL SMARTD FEATURE] To run scheduled Selective
580Self-Tests, use \'n\' for \fBn\fPext span, \'r\' to \fBr\fPedo last
581span, or \'c\' to \fBc\fPontinue with next span or redo last span
582based on status of last test. The LBA range is based on the first
583span from the last test.
584See the \fBsmartctl \-t select,[next|redo|cont]\fP options for
585further info.
586
587.IP \fBMM\fP 4
588is the month of the year, expressed with two decimal digits.  The
589range is from 01 (January) to 12 (December) inclusive.  Do \fBnot\fP
590use a single decimal digit or the match will always fail!
591.IP \fBDD\fP 4
592is the day of the month, expressed with two decimal digits. The
593range is from 01 to 31 inclusive.  Do \fBnot\fP
594use a single decimal digit or the match will always fail!
595.IP \fBd\fP 4
596is the day of the week, expressed with one decimal digit.  The
597range is from 1 (Monday) to 7 (Sunday) inclusive.
598.IP \fBHH\fP 4
599is the hour of the day, written with two decimal digits, and given in
600hours after midnight.  The range is 00 (midnight to just before 1am)
601to 23 (11pm to just before midnight) inclusive.  Do \fBnot\fP use a
602single decimal digit or the match will always fail!
603.RE
604.\"  The following two lines are a workaround for a man2html bug.  Please leave them.
605.\" They define a non-existent option; useful because man2html can't correctly reset the margins.
606.TP
607.B \&
608Some examples follow.  In reading these, keep in mind that in extended
609regular expressions a dot \fB\'.\'\fP matches any single character, and
610a parenthetical expression such as \fB\'(A|B|C)\'\fP denotes any one of the three possibilities \fBA\fP,
611\fBB\fP, or \fBC\fP.
612
613To schedule a short Self-Test between 2-3am every morning, use:
614.nf
615\fB \-s S/../.././02\fP
616.fi
617To schedule a long Self-Test between 4-5am every Sunday morning, use:
618.nf
619\fB \-s L/../../7/04\fP
620.fi
621To schedule a long Self-Test between 10-11pm on the first and
622fifteenth day of each month, use:
623.nf
624\fB \-s L/../(01|15)/./22\fP
625.fi
626To schedule an Offline Immediate test after every midnight, 6am,
627noon,and 6pm, plus a Short Self-Test daily at 1-2am and a Long
628Self-Test every Saturday at 3-4am, use:
629.nf
630\fB \-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)\fP
631.fi
632If Long Self-Tests of a large disks take longer than the system uptime,
633a full disk test can be performed by several Selective Self-Tests.
634To setup a full test of a 1TB disk within 20 days (one 50GB span
635each day), run this command once:
636.nf
637  smartctl -t select,0-99999999 /dev/sda
638.fi
639To run the next test spans on Monday-Friday between 12-13am, run smartd
640with this directive:
641.nf
642\fB \-s n/../../[1-5]/12\fP
643.fi
644
645
646Scheduled tests are run immediately following the regularly-scheduled
647device polling, if the current local date, time, and test type, match
648\fBREGEXP\fP.  By default the regularly-scheduled device polling
649occurs every thirty minutes after starting \fBsmartd\fP.  Take caution
650if you use the \'\-i\' option to make this polling interval more than
651sixty minutes: the poll times may fail to coincide with any of the
652testing times that you have specified with \fBREGEXP\fP.  In this case
653the test will be run following the next device polling.
654
655Before running an offline or self-test, \fBsmartd\fP checks to be sure
656that a self-test is not already running.  If a self-test \fBis\fP
657already running, then this running self test will \fBnot\fP be
658interrupted to begin another test.
659
660\fBsmartd\fP will not attempt to run \fBany\fP type of test if another
661test was already started or run in the same hour.
662
663To avoid performance problems during system boot, \fBsmartd\fP will
664not attempt to run any scheduled tests following the very first
665device polling (unless \'\-q onecheck\' is specified).
666
667Each time a test is run, \fBsmartd\fP will log an entry to SYSLOG.
668You can use these or the '-q showtests' command-line option to verify
669that you constructed \fBREGEXP\fP correctly.  The matching order
670(\fBL\fP before \fBS\fP before \fBC\fP before \fBO\fP) ensures that
671if multiple test types are all scheduled for the same hour, the
672longer test type has precedence.  This is usually the desired behavior.
673
674If the scheduled tests are used in conjunction with state persistence
675(\'\-s\' option), smartd will also try to match the hours since last
676shutdown (or 90 days at most). If any test would have been started
677during downtime, the longest (see above) of these tests is run after
678second device polling.
679
680If the \'\-n\' directive is used and any test would have been started
681during disk standby time, the longest of these tests is run when the
682disk is active again.
683
684Unix users: please beware that the rules for extended regular
685expressions [regex(7)] are \fBnot\fP the same as the rules for
686file\-name pattern matching by the shell [glob(7)].  \fBsmartd\fP will
687issue harmless informational warning messages if it detects characters
688in \fBREGEXP\fP that appear to indicate that you have made this
689mistake.
690.TP
691.B \-m ADD
692Send a warning email to the email address \fBADD\fP if the \'\-H\',
693\'\-l\', \'\-f\', \'\-C\', or \'\-O\' Directives detect a failure or a
694new error, or if a SMART command to the disk fails. This Directive
695only works in conjunction with these other Directives (or with the
696equivalent default \'\-a\' Directive).
697
698To prevent your email in-box from getting filled up with warning
699messages, by default only a single warning will be sent for each of
700the enabled alert types, \'\-H\', \'\-l\', \'\-f\', \'\-C\', or
701\'\-O\' even if more than one failure or error is detected or if the
702failure or error persists.  [This behavior can be modified; see the
703\'\-M\' Directive below.]
704
705To send email to more than one user, please use the following "comma
706separated" form for the address: \fBuser1@add1,user2@add2,...,userN@addN\fP
707(with no spaces).
708
709To test that email is being sent correctly, use the \'\-M test\'
710Directive described below to send one test email message on
711\fBsmartd\fP
712startup.
713
714By default, email is sent using the system
715.B mail
716command.  In order that
717\fBsmartd\fP
718find the mail command (normally /bin/mail) an executable named
719.B \'mail\'
720must be in the path of the shell or environment from which
721\fBsmartd\fP
722was started.  If you wish to specify an explicit path to the mail
723executable (for example /usr/local/bin/mail) or a custom script to
724run, please use the \'\-M exec\' Directive below.
725
726Note that by default under Solaris, in the previous paragraph,
727\'\fBmailx\fP\' and \'\fB/bin/mailx\fP\' are used, since Solaris
728\'/bin/mail\' does not accept a \'\-s\' (Subject) command-line
729argument.
730
731On Windows, the \'\fBBlat\fP\' mailer
732(\fBhttp://blat.sourceforge.net/\fP) is used by default.
733This mailer uses a different command line syntax, see
734\'\-M exec\' below.
735
736Note also that there is a special argument
737.B <nomailer>
738which can be given to the \'\-m\' Directive in conjunction with the \'\-M
739exec\' Directive. Please see below for an explanation of its effect.
740
741If the mailer or the shell running it produces any STDERR/STDOUT
742output, then a snippet of that output will be copied to SYSLOG.  The
743remainder of the output is discarded. If problems are encountered in
744sending mail, this should help you to understand and fix them.  If
745you have mail problems, we recommend running \fBsmartd\fP in debug
746mode with the \'-d\' flag, using the \'-M test\' Directive described
747below.
748
749The following extension is available on Windows:
750By specifying \'\fBmsgbox\fP\' as a mail address, a warning
751"email" is displayed as a message box on the screen.
752Using both \'\fBmsgbox\fP\' and regular mail addresses is possible,
753if \'\fBmsgbox\fP\' is the first word in the comma separated list.
754With \'\fBsysmsgbox\fP\', a system modal (always on top) message box
755is used. If running as a service, a service notification message box
756(always shown on current visible desktop) is used.
757.TP
758.B \-M TYPE
759These Directives modify the behavior of the
760\fBsmartd\fP
761email warnings enabled with the \'\-m\' email Directive described above.
762These \'\-M\' Directives only work in conjunction with the \'\-m\'
763Directive and can not be used without it.
764
765Multiple \-M Directives may be given.  If more than one of the
766following three \-M Directives are given (example: \-M once \-M daily)
767then the final one (in the example, \-M daily) is used.
768
769The valid arguments to the \-M Directive are (one of the following
770three):
771
772.I once
773\- send only one warning email for each type of disk problem detected.  This
774is the default.
775
776.I daily
777\- send additional warning reminder emails, once per day, for each type
778of disk problem detected.
779
780.I diminishing
781\- send additional warning reminder emails, after a one-day interval,
782then a two-day interval, then a four-day interval, and so on for each
783type of disk problem detected. Each interval is twice as long as the
784previous interval.
785
786In addition, one may add zero or more of the following Directives:
787
788.I test
789\- send a single test email
790immediately upon
791\fBsmartd\fP
792startup.  This allows one to verify that email is delivered correctly.
793Note that if this Directive is used,
794\fBsmartd\fP
795will also send the normal email warnings that were enabled with the \'\-m\' Directive,
796in addition to the single test email!
797
798.I exec PATH
799\- run the executable PATH instead of the default mail command, when
800\fBsmartd\fP
801needs to send email.  PATH must point to an executable binary file or
802script.
803
804By setting PATH to point to a customized script, you can make
805\fBsmartd\fP perform useful tricks when a disk problem is detected
806(beeping the console, shutting down the machine, broadcasting warnings
807to all logged-in users, etc.)  But please be careful. \fBsmartd\fP
808will \fBblock\fP until the executable PATH returns, so if your
809executable hangs, then \fBsmartd\fP will also hang. Some sample
810scripts are included in
811/usr/local/share/doc/smartmontools/examplescripts/.
812
813The return status of the executable is recorded by \fBsmartd\fP in
814SYSLOG. The executable is not expected to write to STDOUT or
815STDERR.  If it does, then this is interpreted as indicating that
816something is going wrong with your executable, and a fragment of this
817output is logged to SYSLOG to help you to understand the problem.
818Normally, if you wish to leave some record behind, the executable
819should send mail or write to a file or device.
820
821Before running the executable, \fBsmartd\fP sets a number of
822environment variables.  These environment variables may be used to
823control the executable\'s behavior.  The environment variables
824exported by \fBsmartd\fP are:
825.RS 7
826.IP \fBSMARTD_MAILER\fP 4
827is set to the argument of \-M exec, if present or else to \'mail\'
828(examples: /bin/mail, mail).
829.IP \fBSMARTD_DEVICE\fP 4
830is set to the device path (examples: /dev/hda, /dev/sdb).
831.IP \fBSMARTD_DEVICETYPE\fP 4
832is set to the device type (possible values: ata, scsi, 3ware,N,
833areca,N, hpt,L/M/N).  Here N=0,...,127 denotes the ATA disk behind a
8343ware RAID controller and L/M/N denotes the SATA disk behind a
835HighPoint RocketRAID controller.
836.IP \fBSMARTD_DEVICESTRING\fP 4
837is set to the device description.  For SMARTD_DEVICETYPE of ata or
838scsi, this is the same as SMARTD_DEVICE.  For 3ware RAID controllers,
839the form used is \'/dev/sdc [3ware_disk_01]\'.  For HighPoint
840RocketRAID controller, the form is \'/dev/sdd [hpt_1/1/1]\' under Linux
841or \'/dev/hptrr [hpt_1/1/1]\' under FreeBSD.  For Areca controllers, the
842form is \'/dev/sg2 [areca_disk_09]\'.  In these cases the device string
843contains a space and is NOT quoted.  So to use $SMARTD_DEVICESTRING in a
844bash script you should probably enclose it in double quotes.
845.IP \fBSMARTD_FAILTYPE\fP 4
846gives the reason for the warning or message email.  The possible values that
847it takes and their meanings are:
848.nf
849.fi
850\fIEmailTest\fP: this is an email test message.
851.nf
852.fi
853\fIHealth\fP: the SMART health status indicates imminent failure.
854.nf
855.fi
856\fIUsage\fP: a usage Attribute has failed.
857.nf
858.fi
859\fISelfTest\fP: the number of self-test failures has increased.
860.nf
861.fi
862\fIErrorCount\fP: the number of errors in the ATA error log has increased.
863.nf
864.fi
865\fICurrentPendingSector\fP: one of more disk sectors could not be
866read and are marked to be reallocated (replaced with spare sectors).
867.nf
868.fi
869\fIOfflineUncorrectableSector\fP: during off\-line testing, or self\-testing,
870one or more disk sectors could not be read.
871.nf
872.fi
873\fITemperature\fP: Temperature reached critical limit (see \-W directive).
874.nf
875.fi
876\fIFailedHealthCheck\fP: the SMART health status command failed.
877.nf
878.fi
879\fIFailedReadSmartData\fP: the command to read SMART Attribute data failed.
880.nf
881.fi
882\fIFailedReadSmartErrorLog\fP: the command to read the SMART error log failed.
883.nf
884.fi
885\fIFailedReadSmartSelfTestLog\fP: the command to read the SMART self-test log failed.
886.nf
887.fi
888\fIFailedOpenDevice\fP: the open() command to the device failed.
889.IP \fBSMARTD_ADDRESS\fP 4
890is determined by the address argument ADD of the \'\-m\' Directive.
891If ADD is \fB<nomailer>\fP, then \fBSMARTD_ADDRESS\fP is not set.
892Otherwise, it is set to the comma-separated-list of email addresses
893given by the argument ADD, with the commas replaced by spaces
894(example:admin@example.com root).  If more than one email address is
895given, then this string will contain space characters and is NOT
896quoted, so to use it in a bash script you may want to enclose it in
897double quotes.
898.IP \fBSMARTD_MESSAGE\fP 4
899is set to the one sentence summary warning email message string from
900\fBsmartd\fP.
901This message string contains space characters and is NOT quoted. So to
902use $SMARTD_MESSAGE in a bash script you should probably enclose it in
903double quotes.
904.IP \fBSMARTD_FULLMESSAGE\fP 4
905is set to the contents of the entire email warning message string from
906\fBsmartd\fP.
907This message string contains space and return characters and is NOT quoted. So to
908use $SMARTD_FULLMESSAGE in a bash script you should probably enclose it in
909double quotes.
910.IP \fBSMARTD_TFIRST\fP 4
911is a text string giving the time and date at which the first problem
912of this type was reported. This text string contains space characters
913and no newlines, and is NOT quoted. For example:
914.nf
915.fi
916Sun Feb  9 14:58:19 2003 CST
917.IP \fBSMARTD_TFIRSTEPOCH\fP 4
918is an integer, which is the unix epoch (number of seconds since Jan 1,
9191970) for \fBSMARTD_TFIRST\fP.
920.RE
921.\"  The following two lines are a workaround for a man2html bug.  Please leave them.
922.\" They define a non-existent option; useful because man2html can't correctly reset the margins.
923.TP
924.B \&
925The shell which is used to run PATH is system-dependent. For vanilla
926Linux/glibc it\'s bash. For other systems, the man page for
927\fBpopen\fP(3) should say what shell is used.
928
929If the \'\-m ADD\' Directive is given with a normal address argument,
930then the executable pointed to by PATH will be run in a shell with
931STDIN receiving the body of the email message, and with the same
932command-line arguments:
933.nf
934-s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
935.fi
936that would normally be provided to \'mail\'.  Examples include:
937.nf
938.B -m user@home -M exec /bin/mail
939.B -m admin@work -M exec /usr/local/bin/mailto
940.B -m root -M exec /Example_1/bash/script/below
941.fi
942
943Note that on Windows, the syntax of the \'\fBBlat\fP\' mailer is
944used:
945.nf
946- -q -subject "$SMARTD_SUBJECT" -to "$SMARTD_ADDRESS"
947.fi
948
949If the \'\-m ADD\' Directive is given with the special address argument
950.B <nomailer>
951then the executable pointed to by PATH is run in a shell with
952.B no
953STDIN and
954.B no
955command-line arguments, for example:
956.nf
957.B -m <nomailer> -M exec /Example_2/bash/script/below
958.fi
959If the executable produces any STDERR/STDOUT output, then \fBsmartd\fP
960assumes that something is going wrong, and a snippet of that output
961will be copied to SYSLOG.  The remainder of the output is then
962discarded.
963
964Some EXAMPLES of scripts that can be used with the \'\-M exec\'
965Directive are given below. Some sample scripts are also included in
966/usr/local/share/doc/smartmontools/examplescripts/.
967.TP
968.B \-f
969Check for \'failure\' of any Usage Attributes.  If these Attributes are
970less than or equal to the threshold, it does NOT indicate imminent
971disk failure.  It "indicates an advisory condition where the usage or
972age of the device has exceeded its intended design life period."
973[Please see the \fBsmartctl \-A\fP command-line option.]
974.TP
975.B \-p
976Report anytime that a Prefail Attribute has changed
977its value since the last check, 30 minutes ago. [Please see the
978.B smartctl \-A
979command-line option.]
980.TP
981.B \-u
982Report anytime that a Usage Attribute has changed its value
983since the last check, 30 minutes ago. [Please see the
984.B smartctl \-A
985command-line option.]
986.TP
987.B \-t
988Equivalent to turning on the two previous flags \'\-p\' and \'\-u\'.
989Tracks changes in \fIall\fP device Attributes (both Prefailure and
990Usage). [Please see the \fBsmartctl\fP \-A command-line option.]
991.TP
992.B \-i ID
993Ignore device Attribute number \fBID\fP when checking for failure of
994Usage Attributes.  \fBID\fP must be a decimal integer in the range
995from 1 to 255.  This Directive modifies the behavior of the \'\-f\'
996Directive and has no effect without it.
997
998This is useful, for example, if you have a very old disk and don\'t
999want to keep getting messages about the hours-on-lifetime Attribute
1000(usually Attribute 9) failing.  This Directive may appear multiple
1001times for a single device, if you want to ignore multiple Attributes.
1002.TP
1003.B \-I ID
1004Ignore device Attribute \fBID\fP when tracking changes in the
1005Attribute values.  \fBID\fP must be a decimal integer in the range
1006from 1 to 255.  This Directive modifies the behavior of the \'\-p\',
1007\'\-u\', and \'\-t\' tracking Directives and has no effect without one
1008of them.
1009
1010This is useful, for example, if one of the device Attributes is the disk
1011temperature (usually Attribute 194 or 231). It\'s annoying to get reports
1012each time the temperature changes.  This Directive may appear multiple
1013times for a single device, if you want to ignore multiple Attributes.
1014.TP
1015.B \-r ID[!]
1016When tracking, report the \fIRaw\fP value of Attribute \fBID\fP along
1017with its (normally reported) \fINormalized\fP value.  \fBID\fP must be
1018a decimal integer in the range from 1 to 255.  This Directive modifies
1019the behavior of the \'\-p\', \'\-u\', and \'\-t\' tracking Directives
1020and has no effect without one of them.  This Directive may be given
1021multiple times.
1022
1023A common use of this Directive is to track the device Temperature
1024(often ID=194 or 231).
1025
1026If the optional flag \'!\' is appended, a change of the Normalized
1027value is considered critical.  The report will be logged as LOG_CRIT
1028and a warning email will be sent if \'-m\' is specified.
1029.TP
1030.B \-R ID[!]
1031When tracking, report whenever the \fIRaw\fP value of Attribute
1032\fBID\fP changes.  (Normally \fBsmartd\fP only tracks/reports changes
1033of the \fINormalized\fP Attribute values.)  \fBID\fP must be a decimal
1034integer in the range from 1 to 255.  This Directive modifies the
1035behavior of the \'\-p\', \'\-u\', and \'\-t\' tracking Directives and
1036has no effect without one of them.  This Directive may be given
1037multiple times.
1038
1039If this Directive is given, it automatically implies the \'\-r\'
1040Directive for the same Attribute, so that the Raw value of the
1041Attribute is reported.
1042
1043A common use of this Directive is to track the device Temperature
1044(often ID=194 or 231).  It is also useful for understanding how
1045different types of system behavior affects the values of certain
1046Attributes.
1047
1048If the optional flag \'!\' is appended, a change of the Raw
1049value is considered critical.  The report will be logged as
1050LOG_CRIT and a warning email will be sent if \'-m\' is specified.
1051An example is \'-R 5!\' to warn when new sectors are reallocated.
1052.TP
1053.B \-C ID[+]
1054[ATA only] Report if the current number of pending sectors is
1055non-zero.  Here \fBID\fP is the id number of the Attribute whose raw
1056value is the Current Pending Sector count.  The allowed range of
1057\fBID\fP is 0 to 255 inclusive.  To turn off this reporting, use
1058ID\ =\ 0.  If the \fB\-C ID\fP option is not given, then it defaults to
1059\fB\-C 197\fP (since Attribute 197 is generally used to monitor
1060pending sectors).  If the name of this Attribute is changed by a
1061\'\-v 197,FORMAT,NAME\' directive, the default is changed to
1062\fB\-C 0\fP.
1063
1064If \'+\' is specified, a report is only printed if the number of sectors
1065has increased between two check cycles. Some disks do not reset this
1066attribute when a bad sector is reallocated.
1067See also \'\-v 197,increasing\' below.
1068
1069A pending sector is a disk sector (containing 512 bytes of your data)
1070which the device would like to mark as ``bad" and reallocate.
1071Typically this is because your computer tried to read that sector, and
1072the read failed because the data on it has been corrupted and has
1073inconsistent Error Checking and Correction (ECC) codes.  This is
1074important to know, because it means that there is some unreadable data
1075on the disk.  The problem of figuring out what file this data belongs
1076to is operating system and file system specific.  You can typically
1077force the sector to reallocate by writing to it (translation: make the
1078device substitute a spare good sector for the bad one) but at the
1079price of losing the 512 bytes of data stored there.
1080.TP
1081.B \-U ID[+]
1082[ATA only] Report if the number of offline uncorrectable sectors is
1083non-zero.  Here \fBID\fP is the id number of the Attribute whose raw
1084value is the Offline Uncorrectable Sector count.  The allowed range of
1085\fBID\fP is 0 to 255 inclusive.  To turn off this reporting, use
1086ID\ =\ 0.  If the \fB\-U ID\fP option is not given, then it defaults to
1087\fB\-U 198\fP (since Attribute 198 is generally used to monitor
1088offline uncorrectable sectors).  If the name of this Attribute is changed
1089by a \'\-v 198,FORMAT,NAME\' (except \'\-v 198,FORMAT,Offline_Scan_UNC_SectCt\'),
1090directive, the default is changed to \fB\-U 0\fP.
1091
1092If \'+\' is specified, a report is only printed if the number of sectors
1093has increased since the last check cycle. Some disks do not reset this
1094attribute when a bad sector is reallocated.
1095See also \'\-v 198,increasing\' below.
1096
1097An offline uncorrectable sector is a disk sector which was not
1098readable during an off\-line scan or a self\-test.  This is important
1099to know, because if you have data stored in this disk sector, and you
1100need to read it, the read will fail.  Please see the previous \'\-C\'
1101option for more details.
1102.TP
1103.B \-W DIFF[,INFO[,CRIT]]
1104Report if the current temperature had changed by at least \fBDIFF\fP
1105degrees since last report, or if new min or max temperature is detected.
1106Report or Warn if the temperature is greater or equal than one of
1107\fBINFO\fP or \fBCRIT\fP degrees Celsius.
1108If the limit \fBCRIT\fP is reached, a message with loglevel
1109\fB\'LOG_CRIT\'\fP will be logged to syslog and a warning email
1110will be send if '-m' is specified. If only the limit \fBINFO\fP is
1111reached, a message with loglevel \fB\'LOG_INFO\'\fP will be logged.
1112
1113If this directive is used in conjunction with state persistence
1114(\'\-s\' option), the min and max temperature values are preserved
1115across boot cycles. The minimum temperature value is not updated
1116during the first 30 minutes after startup.
1117
1118To disable any of the 3 reports, set the corresponding limit to 0.
1119Trailing zero arguments may be omitted. By default, all temperature
1120reports are disabled (\'-W 0\').
1121
1122To track temperature changes of at least 2 degrees, use:
1123.nf
1124\fB \-W 2
1125.fi
1126To log informal messages on temperatures of at least 40 degrees, use:
1127.nf
1128\fB \-W 0,40
1129.fi
1130For warning messages/mails on temperatures of at least 45 degrees, use:
1131.nf
1132\fB \-W 0,0,45
1133.fi
1134To combine all of the above reports, use:
1135.nf
1136\fB \-W 2,40,45
1137.fi
1138
1139For ATA devices, smartd interprets Attribute 194 as Temperature Celsius
1140by default. This can be changed to Attribute 9 or 220 by the drive
1141database or by the \'-v\' directive, see below.
1142.TP
1143.B \-F TYPE
1144[ATA only] Modifies the behavior of \fBsmartd\fP to compensate for
1145some known and understood device firmware bug.  The arguments to this
1146Directive are exclusive, so that only the final Directive given is
1147used.  The valid values are:
1148
1149.I none
1150\- Assume that the device firmware obeys the ATA specifications.  This
1151is the default, unless the device has presets for \'\-F\' in the
1152device database.
1153
1154.I samsung
1155\- In some Samsung disks (example: model SV4012H Firmware Version:
1156RM100\-08) some of the two\- and four\-byte quantities in the SMART data
1157structures are byte\-swapped (relative to the ATA specification).
1158Enabling this option tells \fBsmartd\fP to evaluate these quantities
1159in byte\-reversed order.  Some signs that your disk needs this option
1160are (1) no self\-test log printed, even though you have run self\-tests;
1161(2) very large numbers of ATA errors reported in the ATA error log;
1162(3) strange and impossible values for the ATA error log timestamps.
1163
1164.I samsung2
1165\- In some Samsung disks the number of ATA errors reported is byte swapped.
1166Enabling this option tells \fBsmartd\fP to evaluate this quantity in
1167byte\-reversed order.
1168
1169.I samsung3
1170\- Some Samsung disks (at least SP2514N with Firmware VF100\-37) report
1171a self\-test still in progress with 0% remaining when the test was already
1172completed. If this directive is specified, \fBsmartd\fP will not skip the
1173next scheduled self\-test (see Directive \'\-s\' above) in this case.
1174
1175Note that an explicit \'\-F\' Directive will over\-ride any preset
1176values for \'\-F\' (see the \'\-P\' option below).
1177
1178
1179[Please see the \fBsmartctl \-F\fP command-line option.]
1180.TP
1181.B \-v ID,FORMAT[:BYTEORDER][,NAME]
1182[ATA only] Sets a vendor\-specific raw value print FORMAT, an optional
1183BYTEORDER and an optional NAME for Attribute ID.
1184This directive may be used multiple times.
1185Please see \fBsmartctl -v\fP command-line option for further details.
1186
1187The following arguments affect smartd warning output:
1188
1189.I 197,increasing
1190\- Raw Attribute number 197 (Current Pending Sector Count) is not
1191reset if uncorrectable sectors are reallocated.  This sets \'-C 197+\'
1192if no other \'-C\' directive is specified.
1193
1194.I 198,increasing
1195\- Raw Attribute number 198 (Offline Uncorrectable Sector Count) is not
1196reset if uncorrectable sector are reallocated.  This sets \'-U 198+\'
1197if no other \'-U\' directive is specified.
1198.TP
1199.B \-P TYPE
1200Specifies whether
1201\fBsmartd\fP
1202should use any preset options that are available for this drive.  The
1203valid arguments to this Directive are:
1204
1205.I use
1206\- use any presets that are available for this drive.  This is the default.
1207
1208.I ignore
1209\- do not use any presets for this drive.
1210
1211.I show
1212\- show the presets listed for this drive in the database.
1213
1214.I showall
1215\- show the presets that are available for all drives and then exit.
1216
1217[Please see the
1218.B smartctl \-P
1219command-line option.]
1220.TP
1221.B \-a
1222Equivalent to turning on all of the following Directives:
1223.B \'\-H\'
1224to check the SMART health status,
1225.B \'\-f\'
1226to report failures of Usage (rather than Prefail) Attributes,
1227.B \'\-t\'
1228to track changes in both Prefailure and Usage Attributes,
1229.B \'\-l\ selftest\'
1230to report increases in the number of Self-Test Log errors,
1231.B \'\-l\ error\'
1232to report increases in the number of ATA errors,
1233.B \'\-C 197\'
1234to report nonzero values of the current pending sector count, and
1235.B \'\-U 198\'
1236to report nonzero values of the offline pending sector count.
1237
1238Note that \-a is the default for ATA devices.  If none of these other
1239Directives is given, then \-a is assumed.
1240.TP
1241.B #
1242Comment: ignore the remainder of the line.
1243.TP
1244.B \e
1245Continuation character: if this is the last non-white or non-comment
1246character on a line, then the following line is a continuation of the current
1247one.
1248.PP
1249If you are not sure which Directives to use, I suggest experimenting
1250for a few minutes with
1251.B smartctl
1252to see what SMART functionality your disk(s) support(s).  If you do
1253not like voluminous syslog messages, a good choice of
1254\fBsmartd\fP
1255configuration file Directives might be:
1256.nf
1257.B \-H \-l\ selftest \-l\ error \-f.
1258.fi
1259If you want more frequent information, use:
1260.B -a.
1261
1262.TP
1263.B ADDITIONAL DETAILS ABOUT DEVICESCAN
1264If a non-comment entry in the configuration file is the text
1265string \fBDEVICESCAN\fP in capital letters, then \fBsmartd\fP will
1266ignore any remaining lines in the configuration file, and will scan
1267for devices.
1268
1269[NEW EXPERIMENTAL SMARTD FEATURE] Configuration entries for devices
1270not found by the platform\-specific device scanning may precede the
1271\fBDEVICESCAN\fP entry.
1272
1273If \fBDEVICESCAN\fP is not followed by any Directives, then smartd
1274will scan for both ATA and SCSI devices, and will monitor all possible
1275SMART properties of any devices that are found.
1276
1277\fBDEVICESCAN\fP may optionally be followed by any valid Directives,
1278which will be applied to all devices that are found in the scan.  For
1279example
1280.nf
1281.B DEVICESCAN -m root@example.com
1282.fi
1283will scan for all devices, and then monitor them.  It will send one
1284email warning per device for any problems that are found.
1285.nf
1286.B  DEVICESCAN -d ata -m root@example.com
1287.fi
1288will do the same, but restricts the scan to ATA devices only. 
1289.nf
1290.B  DEVICESCAN -H -d ata -m root@example.com
1291.fi
1292will do the same, but only monitors the SMART health status of the
1293devices, (rather than the default \-a, which monitors all SMART
1294properties).
1295
1296.TP
1297.B EXAMPLES OF SHELL SCRIPTS FOR \'\-M exec\'
1298These are two examples of shell scripts that can be used with the \'\-M
1299exec PATH\' Directive described previously.  The paths to these scripts
1300and similar executables is the PATH argument to the \'\-M exec PATH\'
1301Directive.
1302
1303Example 1: This script is for use with \'\-m ADDRESS -M exec PATH\'.  It appends
1304the output of
1305.B smartctl -a
1306to the output of the smartd email warning message and sends it to ADDRESS.
1307
1308.nf
1309\fB
1310#! /bin/bash
1311
1312# Save the email message (STDIN) to a file:
1313cat > /root/msg
1314
1315# Append the output of smartctl -a to the message:
1316/usr/local/sbin/smartctl -a -d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg
1317 
1318# Now email the message to the user at address ADD:
1319/bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg
1320\fP
1321.fi
1322
1323Example 2: This script is for use with \'\-m <nomailer> \-M exec
1324PATH\'. It warns all users about a disk problem, waits 30 seconds, and
1325then powers down the machine.
1326
1327.nf
1328\fB
1329#! /bin/bash
1330
1331# Warn all users of a problem
1332wall \'Problem detected with disk: \' "$SMARTD_DEVICESTRING"
1333wall \'Warning message from smartd is: \' "$SMARTD_MESSAGE"
1334wall \'Shutting down machine in 30 seconds... \'
1335 
1336# Wait half a minute
1337sleep 30
1338 
1339# Power down the machine
1340/sbin/shutdown -hf now
1341\fP
1342.fi
1343
1344Some example scripts are distributed with the smartmontools package,
1345in /usr/local/share/doc/smartmontools/examplescripts/.
1346
1347Please note that these scripts typically run as root, so any files
1348that they read/write should not be writable by ordinary users or
1349reside in directories like /tmp that are writable by ordinary users
1350and may expose your system to symlink attacks.
1351
1352As previously described, if the scripts write to STDOUT or STDERR,
1353this is interpreted as indicating that there was an internal error
1354within the script, and a snippet of STDOUT/STDERR is logged to SYSLOG.
1355The remainder is flushed.
1356
1357.\" ENDINCLUDE
1358.\" DO NOT MODIFY THIS OR PREVIOUS/NEXT LINES. THIS DEFINES THE
1359.\" END OF THE INCLUDED SECTION FROM smartd.8.in
1360
1361.PP
1362.SH AUTHOR
1363\fBBruce Allen\fP smartmontools\-support@lists.sourceforge.net
1364.fi
1365University of Wisconsin \- Milwaukee Physics Department
1366
1367.PP
1368.SH CONTRIBUTORS
1369The following have made large contributions to smartmontools:
1370.nf
1371\fBCasper Dik\fP (Solaris SCSI interface)
1372\fBChristian Franke\fP (Windows interface, C++ redesign, USB support, ...)
1373\fBDouglas Gilbert\fP (SCSI subsystem)
1374\fBGuido Guenther\fP (Autoconf/Automake packaging)
1375\fBGeoffrey Keating\fP (Darwin ATA interface)
1376\fBEduard Martinescu\fP (FreeBSD interface)
1377\fBFr\*'ed\*'eric L. W. Meunier\fP (Web site and Mailing list)
1378\fBGabriele Pohl\fP (Web site and Wiki, conversion from CVS to SVN)
1379\fBKeiji Sawada\fP (Solaris ATA interface)
1380\fBManfred Schwarb\fP (Drive database)
1381\fBSergey Svishchev\fP (NetBSD interface)
1382\fBDavid Snyder and Sergey Svishchev\fP (OpenBSD interface)
1383\fBPhil Williams\fP (User interface and drive database)
1384\fBShengfeng Zhou\fP (Linux/FreeBSD HighPoint RocketRAID interface)
1385.fi
1386Many other individuals have made smaller contributions and corrections.
1387
1388.PP
1389.SH CREDITS
1390.fi
1391This code was derived from the smartsuite package, written by Michael
1392Cornwell, and from the previous UCSC smartsuite package.  It extends
1393these to cover ATA\-5 disks.  This code was originally developed as a
1394Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
1395(now part of the Storage Systems Research Center), Jack Baskin School
1396of Engineering, University of California, Santa
1397Cruz. \fBhttp://ssrc.soe.ucsc.edu/\fP .
1398.SH
1399HOME PAGE FOR SMARTMONTOOLS:
1400.fi
1401Please see the following web site for updates, further documentation, bug
1402reports and patches: \fBhttp://smartmontools.sourceforge.net/\fP
1403
1404.SH
1405SEE ALSO:
1406\fBsmartd\fP(8), \fBsmartctl\fP(8), \fBsyslogd\fP(8),
1407\fBsyslog.conf\fP(5), \fBbadblocks\fP(8), \fBide\-smart\fP(8), \fBregex\fP(7).
1408
1409.SH
1410SVN ID OF THIS PAGE:
1411$Id$
Note: See TracBrowser for help on using the browser.