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