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