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