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