]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - smartd.8.in
adjust cciss patch and actually apply it
[mirror_smartmontools-debian.git] / smartd.8.in
CommitLineData
832b75ed
GG
1.ig
2Copyright (C) 2002-6 Bruce Allen <smartmontools-support@lists.sourceforge.net>
3
4$Id: smartd.8.in,v 1.100 2006/04/12 13:55:44 ballen4705 Exp $
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
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.,
13675 Mass Ave, Cambridge, MA 02139, USA.
14
15This code was originally developed as a Senior Thesis by Michael
16Cornwell at the Concurrent Systems Laboratory (now part of the Storage
17Systems Research Center), Jack Baskin School of Engineering,
18University of California, Santa Cruz. http://ssrc.soe.ucsc.edu/
19..
20.TH SMARTD 8 CURRENT_CVS_DATE CURRENT_CVS_VERSION CURRENT_CVS_DATE
21.SH NAME
22\fBsmartd\fP \- SMART Disk Monitoring Daemon
23
24.SH SYNOPSIS
25.B smartd [options]
26
27.SH FULL PATH
28.B /usr/local/sbin/smartd
29
30.SH PACKAGE VERSION
31CURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME
32
33.SH DESCRIPTION
34\fBsmartd\fP is a daemon that monitors the Self-Monitoring, Analysis
35and Reporting Technology (SMART) system built into many ATA-3 and
36later ATA, IDE and SCSI-3 hard drives. The purpose of SMART is to
37monitor the reliability of the hard drive and predict drive failures,
38and to carry out different types of drive self-tests. This version of
39\fBsmartd\fP is compatible with ATA/ATAPI-7 and earlier standards (see
40\fBREFERENCES\fP below).
41
42\fBsmartd\fP will attempt to enable SMART monitoring on ATA devices
43(equivalent to \fBsmartctl -s on\fP) and polls these and SCSI devices
44every 30 minutes (configurable), logging SMART errors and changes of
45SMART Attributes via the SYSLOG interface. The default location for
46these SYSLOG notifications and warnings is \fB/var/log/messages\fP.
47To change this default location, please see the \fB\'-l\'\fP
48command-line option described below.
49
50In addition to logging to a file, \fBsmartd\fP can also be configured
51to send email warnings if problems are detected. Depending upon the
52type of problem, you may want to run self\-tests on the disk, back up
53the disk, replace the disk, or use a manufacturer\'s utility to force
54reallocation of bad or unreadable disk sectors. If disk problems are
55detected, please see the \fBsmartctl\fP manual page and the
56\fBsmartmontools\fP web page/FAQ for further guidance.
57
58If you send a \fBUSR1\fP signal to \fBsmartd\fP it will immediately
59check the status of the disks, and then return to polling the disks
60every 30 minutes. See the \fB\'\-i\'\fP option below for additional
61details.
62
63\fBsmartd\fP can be configured at start-up using the configuration
64file \fB/usr/local/etc/smartd.conf\fP (Windows: \fB./smartd.conf\fP).
65If the configuration file is subsequently modified, \fBsmartd\fP
66can be told to re-read the configuration file by sending it a
67\fBHUP\fP signal, for example with the command:
68.fi
69\fBkillall -HUP smartd\fP.
70.fi
71(Windows: See NOTES below.)
72
73On startup, if \fBsmartd\fP finds a syntax error in the configuration
74file, it will print an error message and then exit. However if
75\fBsmartd\fP is already running, then is told with a \fBHUP\fP signal
76to re-read the configuration file, and then find a syntax error in
77this file, it will print an error message and then continue, ignoring
78the contents of the (faulty) configuration file, as if the \fBHUP\fP
79signal had never been received.
80
81When \fBsmartd\fP is running in debug mode, the \fBINT\fP signal
82(normally generated from a shell with CONTROL\-C) is treated in the
83same way as a \fBHUP\fP signal: it makes \fBsmartd\fP reload its
84configuration file. To exit \fBsmartd\fP use CONTROL-\e
85(Cygwin: 2x CONTROL\-C, Windows: CONTROL\-Break).
86
87On startup, in the absence of the configuration file
88\fB/usr/local/etc/smartd.conf\fP, the \fBsmartd\fP daemon first scans for all
89devices that support SMART. The scanning is done as follows:
90.IP \fBLINUX:\fP 9
91Examine all entries \fB"/dev/hd[a-t]"\fP for IDE/ATA
92devices, and \fB"/dev/sd[a-z]"\fP for SCSI devices.
93.IP \fBFREEBSD:\fP 9
94Examine all entries \fB"/dev/ad[0-9]+"\fP for IDE/ATA
95devices and \fB"/dev/da[0-9]+"\fP for SCSI devices.
96.IP \fBNETBSD/OPENBSD:\fP 9
97Authoritative list of disk devices is obtained from sysctl
98\'hw.disknames\'.
99.IP \fBSOLARIS:\fP 9
100Examine all entries \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
101devices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices.
102.IP \fBDARWIN:\fP 9
103The IOService plane is scanned for ATA block storage devices.
104.IP \fBWINDOWS:\fP 9
105Examine all entries \fB"/dev/hd[a-j]"\fP ("\\\\.\\PhysicalDrive[0-9]")
106for IDE/ATA devices on WinNT4/2000/XP, \fB"/dev/hd[a-d]"\fP
107(bitmask from "\\\\.\\SMARTVSD") for IDE/ATA devices on Win95/98/98SE/ME,
108and \fB"/dev/scsi[0-9][0-7]"\fP (ASPI adapter 0-9, ID 0-7) for SCSI
109devices on all versions of Windows.
110.IP \fBCYGWIN\fP: 9
111See "WINDOWS" above.
112.IP \fBOS/2,eComStation\fP: 9
113Use the form \fB"/dev/hd[a\-z]"\fP for IDE/ATA devices.
114.PP
115\fBsmartd\fP then monitors
116for \fIall\fP possible SMART errors (corresponding to the \fB\'\-a\'\fP
117Directive in the configuration file; see \fBCONFIGURATION FILE\fP
118below).
119
120.SH
121OPTIONS
122Long options are not supported on all systems. Use \fB\'smartd
123\-h\'\fP to see the available options.
124.TP
125.B \-c FILE, \-\-configfile=FILE
126
127Read \fBsmartd\fP configuration Directives from FILE, instead of from
128the default location \fB/usr/local/etc/smartd.conf\fP (Windows: \fB./smartd.conf\fP).
129If FILE does \fBnot\fP exist, then \fBsmartd\fP will print an error
130message and exit with nonzero status. Thus, \'\-c /usr/local/etc/smartd.conf\'
131can be used to verify the existence of the default configuration file.
132
133By using \'\-\' for FILE, the configuration is read from standard
134input. This is useful for commands like:
135.nf
136.B echo /dev/hdb \-m user@home \-M test | smartd \-c \- \-q onecheck
137.fi
138to perform quick and simple checks without a configuration file.
139
140.TP
141.B \-d, \-\-debug
142Runs \fBsmartd\fP in "debug" mode. In this mode, it displays status
143information to STDOUT rather than logging it to SYSLOG and does not
144\fBfork(2)\fP into the background and detach from the controlling
145terminal. In this mode, \fBsmartd\fP also prints more verbose
146information about what it is doing than when operating in "daemon"
147mode. In this mode, the \fBQUIT\fP signal (normally generated from a
148terminal with CONTROL\-C) makes \fBsmartd\fP reload its configuration
149file. Please use CONTROL-\e to exit
150(Cygwin: 2x CONTROL\-C, Windows: CONTROL\-Break).
151
152Windows only: The "debug" mode can be toggled by the command
153\fBsmartd sigusr2\fP. A new console for debug output is opened when
154debug mode is enabled.
155.TP
156.B \-D, \-\-showdirectives
157Prints a list (to STDOUT) of all the possible Directives which may
158appear in the configuration file /usr/local/etc/smartd.conf, and then exits.
159These Directives are also described later in this man page. They may
160appear in the configuration file following the device name.
161.TP
162.B \-h, \-\-help, \-\-usage
163Prints usage message to STDOUT and exits.
164.TP
165.B \-i N, \-\-interval=N
166Sets the interval between disk checks to \fIN\fP seconds, where
167\fIN\fP is a decimal integer. The minimum allowed value is ten and
168the maximum is the largest positive integer that can be represented on
169your system (often 2^31-1). The default is 1800 seconds.
170
171Note that the superuser can make \fBsmartd\fP check the status of the
172disks at any time by sending it the \fBSIGUSR1\fP signal, for example
173with the command:
174.nf
175.B kill -SIGUSR1 <pid>
176.fi
177where \fB<pid>\fP is the process id number of \fBsmartd\fP. One may
178also use:
179.nf
180.B killall -USR1 smartd
181.fi
182for the same purpose.
183.fi
184(Windows: See NOTES below.)
185
186.TP
187.B \-l FACILITY, \-\-logfacility=FACILITY
188Uses syslog facility FACILITY to log the messages from \fBsmartd\fP.
189Here FACILITY is one of \fIlocal0\fP, \fIlocal1\fP, ..., \fIlocal7\fP,
190or \fIdaemon\fP [default]. If this command-line option is not used,
191then by default messages from \fBsmartd\fP are logged to the facility
192\fIdaemon\fP.
193
194If you would like to have \fBsmartd\fP messages logged somewhere other
195than the default \fB/var/log/messages\fP location, this can typically
196be accomplished with (for example) the following steps:
197.RS 7
198.IP \fB[1]\fP 4
199Modify the script that starts \fBsmartd\fP to include the \fBsmartd\fP
200command-line argument \'\-l local3\'. This tells \fBsmartd\fP to log its
201messages to facility \fBlocal3\fP.
202.IP \fB[2]\fP 4
203Modify the \fBsyslogd\fP configuration file (typically
204\fB/etc/syslog.conf\fP) by adding a line of the form:
205.nf
206\fBlocal3.* /var/log/smartd.log\fP
207.fi
208This tells \fBsyslogd\fP to log all the messages from facility \fBlocal3\fP to
209the designated file: /var/log/smartd.log.
210.IP \fB[3]\fP 4
211Tell \fBsyslogd\fP to re-read its configuration file, typically by
212sending the \fBsyslogd\fP process a \fBSIGHUP\fP hang-up signal.
213.IP \fB[4]\fP 4
214Start (or restart) the \fBsmartd\fP daemon.
215.RE
216.\" The following two lines are a workaround for a man2html bug. Please leave them.
217.\" They define a non-existent option; useful because man2html can't correctly reset the margins.
218.TP
219.B \&
220For more detailed information, please refer to the man pages for
221\fBsyslog.conf\fP, \fBsyslogd\fP, and \fBsyslog\fP. You may also want
222to modify the log rotation configuration files; see the man pages for
223\fBlogrotate\fP and examine your system\'s /etc/logrotate.conf file.
224
225Cygwin: Support for \fBsyslogd\fP as described above is available starting with Cygwin 1.5.15.
226On older releases or if no local \fBsyslogd\fP is running, the \'\-l\' option has no effect.
227In this case, all \fBsyslog\fP messages are written to Windows event log
228or to file \fBC:/CYGWIN_SYSLOG.TXT\fP if the event log is not available.
229
230Windows: Some \fBsyslog\fP functionality is implemented
231internally in \fBsmartd\fP as follows: If no \'\-l\' option
232(or \'\-l daemon\') is specified, messages are written to Windows
233event log or to file \fB./smartd.log\fP if event log is not available
234(Win9x/ME or access denied). By specifying other values of FACILITY,
235log output is redirected as follows:
236\'\-l local0\' to file \fB./smartd.log\fP,
237\'\-l local1\' to standard output (redirect with \'>\' to any file),
238\'\-l local2\' to standard error,
239\'\-l local[3-7]\': to file \fB./smartd[1-5].log\fP.
240
241When using the event log, the enclosed utility \fBsyslogevt.exe\fP
242should be registered as an event message file to avoid error
243messages from the event viewer. Use \'\fBsyslogevt -r smartd\fP\'
244to register, \'\fBsyslogevt -u smartd\fP\' to unregister and
245\'\fBsyslogevt\fP\' for more help.
246
247.TP
248.B \-p NAME, \-\-pidfile=NAME
249Writes pidfile \fINAME\fP containing the \fBsmartd\fP Process ID
250number (PID). To avoid symlink attacks make sure the directory to
251which pidfile is written is only writable for root. Without this
252option, or if the \-\-debug option is given, no PID file is written on
253startup. If \fBsmartd\fP is killed with a maskable signal then the
254pidfile is removed.
255.TP
256.B \-q WHEN, \-\-quit=WHEN
257Specifies when, if ever, \fBsmartd\fP should exit. The valid
258arguments are to this option are:
259
260.I nodev
261\- Exit if there are no devices to monitor, or if any errors are found
262at startup in the configuration file. This is the default.
263
264.I errors
265\- Exit if there are no devices to monitor, or if any errors are found
266in the configuration file /usr/local/etc/smartd.conf at startup or whenever it
267is reloaded.
268
269.I nodevstartup
270\- Exit if there are no devices to monitor at startup. But continue
271to run if no devices are found whenever the configuration file is
272reloaded.
273
274.I never
275\- Only exit if a fatal error occurs (no remaining system memory,
276invalid command line arguments). In this mode, even if there are no
277devices to monitor, or if the configuration file
278\fB/usr/local/etc/smartd.conf\fP has errors, \fBsmartd\fP will continue to run,
279waiting to load a configuration file listing valid devices.
280
281.I onecheck
282\- Start \fBsmartd\fP in debug mode, then register devices, then check
283device\'s SMART status once, and then exit with zero exit status if all
284of these steps worked correctly.
285
286This last option is intended for \'distribution-writers\' who want to
287create automated scripts to determine whether or not to automatically
288start up \fBsmartd\fP after installing smartmontools. After starting
289\fBsmartd\fP with this command-line option, the distribution\'s install
290scripts should wait a reasonable length of time (say ten seconds). If
291\fBsmartd\fP has not exited with zero status by that time, the script
292should send \fBsmartd\fP a SIGTERM or SIGKILL and assume that
293\fBsmartd\fP will not operate correctly on the host. Conversely, if
294\fBsmartd\fP exits with zero status, then it is safe to run
295\fBsmartd\fP in normal daemon mode. If \fBsmartd\fP is unable to
296monitor any devices or encounters other problems then it will return
297with non-zero exit status.
298
299.I showtests
300\- Start \fBsmartd\fP in debug mode, then register devices, then write
301a list of future scheduled self tests to stdout, and then exit with zero
302exit status if all of these steps worked correctly.
303Device's SMART status is not checked.
304
305This option is intended to test whether the '-s REGEX' directives in
306smartd.conf will have the desired effect. The output lists the next test
307schedules, limited to 5 tests per type and device. This is followed by a
308summary of all tests of each device within the next 90 days.
309.TP
310.B \-r TYPE, \-\-report=TYPE
311Intended primarily to help
312.B smartmontools
313developers understand the behavior of
314.B smartmontools
315on non-conforming or poorly-conforming hardware. This option reports
316details of
317\fBsmartd\fP
318transactions with the device. The option can be used multiple times.
319When used just once, it shows a record of the ioctl() transactions
320with the device. When used more than once, the detail of these ioctl()
321transactions are reported in greater detail. The valid arguments to
322this option are:
323
324.I ioctl
325\- report all ioctl() transactions.
326
327.I ataioctl
328\- report only ioctl() transactions with ATA devices.
329
330.I scsiioctl
331\- report only ioctl() transactions with SCSI devices.
332
333Any argument may include a positive integer to specify the level of
334detail that should be reported. The argument should be followed by a
335comma then the integer with no spaces. For example, \fIataioctl,2\fP
336The default level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are
337equivalent.
338
339.TP
340.B \-\-service
341Cygwin and Windows only: Enables \fBsmartd\fP to run as a Windows service.
342
343On Cygwin, this option simply prevents fork'ing into background mode to
344allow running \fBsmartd\fP as service via cygrunsrv, see NOTES below.
345
346On Windows, this option enables the buildin service support.
347The option must be specified in the service command line as the first
348argument. It should not be used from console.
349See NOTES below for details.
350
351.TP
352.B \-V, \-\-version, \-\-license, \-\-copyright
353Prints license, copyright, and CVS version information onto
354STDOUT and then exits. Please include this information if you are
355reporting bugs, or have specific questions about the behavior of
356\fBsmartd\fP.
357
358.SH EXAMPLES
359
360.B
361smartd
362.fi
363Runs the daemon in forked mode. This is the normal way to run
364\fBsmartd\fP.
365Entries are logged to SYSLOG (by default
366.B /var/log/messages.)
367
368.B
369smartd -d -i 30
370.fi
371Run in foreground (debug) mode, checking the disk status
372every 30 seconds.
373
374.B
375smartd -q onecheck
376.fi
377Registers devices, and checks the status of the devices exactly
378once. The exit status (the bash
379.B $?
380variable) will be zero if all went well, and nonzero if no devices
381were detected or some other problem was encountered.
382
383.fi
384Note that \fBsmartmontools\fP provides a start-up script in
385\fB/usr/local/etc/rc.d/init.d/smartd\fP which is responsible for starting and
386stopping the daemon via the normal init interface. Using this script,
387you can start \fBsmartd\fP by giving the command:
388.nf
389.B /usr/local/etc/rc.d/init.d/smartd start
390.fi
391and stop it by using the command:
392.nf
393.B /usr/local/etc/rc.d/init.d/smartd stop
394
395.fi
396If you want \fBsmartd\fP to start running whenever your machine is
397booted, this can be enabled by using the command:
398.nf
399.B /sbin/chkconfig --add smartd
400.fi
401and disabled using the command:
402.nf
403.B /sbin/chkconfig --del smartd
404.fi
405
406.\" DO NOT MODIFY THIS OR THE FOLLOWING TWO LINES. THIS MATERIAL
407.\" IS AUTOMATICALLY INCLUDED IN THE FILE smartd.conf.5
408.\" STARTINCLUDE
409
410.SH CONFIGURATION FILE /usr/local/etc/smartd.conf
411In the absence of a configuration file, under Linux
412\fBsmartd\fP
413will try to open the 20 ATA devices
414.B /dev/hd[a-t]
415and the 26 SCSI devices
416.B /dev/sd[a-z].
417Under FreeBSD,
418\fBsmartd\fP
419will try to open all existing ATA devices (with entries in /dev)
420.B /dev/ad[0-9]+
421and all existing SCSI devices
422.B /dev/da[0-9]+.
423Under NetBSD/OpenBSD,
424\fBsmartd\fP
425will try to open all existing ATA devices (with entries in /dev)
426.B /dev/wd[0-9]+c
427and all existing SCSI devices
428.B /dev/sd[0-9]+c.
429Under Solaris \fBsmartd\fP will try to open all entries \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
430devices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices.
431Under Windows \fBsmartd\fP will try to open all entries \fB"/dev/hd[a-j]"\fP ("\\\\.\\PhysicalDrive[0-9]")
432for IDE/ATA devices on WinNT4/2000/XP, \fB"/dev/hd[a-d]"\fP
433(bitmask from "\\\\.\\SMARTVSD") for IDE/ATA devices on Win95/98/98SE/ME,
434and \fB"/dev/scsi[0-9][0-7]"\fP (ASPI adapter 0-9, ID 0-7) for SCSI
435devices on all versions of Windows.
436Under Darwin, \fBsmartd\fP will open any ATA block storage device.
437
438This can be annoying if you have an ATA or SCSI device that hangs or
439misbehaves when receiving SMART commands. Even if this causes no
440problems, you may be annoyed by the string of error log messages about
441block-major devices that can\'t be found, and SCSI devices that can\'t
442be opened.
443
444One can avoid this problem, and gain more control over the types of
445events monitored by
446\fBsmartd\fP,
447by using the configuration file
448.B /usr/local/etc/smartd.conf.
449This file contains a list of devices to monitor, with one device per
450line. An example file is included with the
451.B smartmontools
452distribution. You will find this sample configuration file in
453\fB/usr/local/share/doc/smartmontools-5.1/\fP. For security, the configuration file
454should not be writable by anyone but root. The syntax of the file is as
455follows:
456.IP \(bu 4
457There should be one device listed per line, although you may have
458lines that are entirely comments or white space.
459.IP \(bu 4
460Any text following a hash sign \'#\' and up to the end of the line is
461taken to be a comment, and ignored.
462.IP \(bu 4
463Lines may be continued by using a backslash \'\e\' as the last
464non-whitespace or non-comment item on a line.
465.IP \(bu 4
466Note: a line whose first character is a hash sign \'#\' is treated as
467a white-space blank line, \fBnot\fP as a non-existent line, and will
468\fBend\fP a continuation line.
469.PP 0
470.fi
471Here is an example configuration file. It\'s for illustrative purposes
472only; please don\'t copy it onto your system without reading to the end
473of the
474.B DIRECTIVES
475Section below!
476
477.nf
478.B ################################################
479.B # This is an example smartd startup config file
480.B # /usr/local/etc/smartd.conf for monitoring three
481.B # ATA disks, three SCSI disks, six ATA disks
482.B # behind two 3ware controllers and one SATA disk
483.B #
484.nf
485.B # First ATA disk on two different interfaces. On
486.B # the second disk, start a long self-test every
487.B # Sunday between 3 and 4 am.
488.B #
489.B \ \ /dev/hda -a -m admin@example.com,root@localhost
490.B \ \ /dev/hdc -a -I 194 -I 5 -i 12 -s L/../../7/03
491.B #
492.nf
493.B # SCSI disks. Send a TEST warning email to admin on
494.B # startup.
495.B #
496.B \ \ /dev/sda
497.B \ \ /dev/sdb -m admin@example.com -M test
498.B #
499.nf
500.B # Strange device. It\'s SCSI. Start a scheduled
501.B # long self test between 5 and 6 am Monday/Thursday
502.B \ \ /dev/weird -d scsi -s L/../../(1|4)/05
503.B #
504.nf
505.B # Linux-specific: SATA disk using the libata
506.B # driver. This requires a 2.6.15 or greater
507.B # kernel. The device entry is SCSI but the
508.B # underlying disk understands ATA SMART commands
509.B \ \ /dev/sda -a -d ata
510.B #
511.nf
512.B # Four ATA disks on a 3ware 6/7/8000 controller.
513.B # Start short self-tests daily between midnight and 1am,
514.B # 1-2, 2-3, and 3-4 am. Starting with the Linux 2.6
515.B # kernel series, /dev/sdX is deprecated in favor of
516.B # /dev/tweN. For example replace /dev/sdc by /dev/twe0
517.B # and /dev/sdd by /dev/twe1.
518.B \ \ /dev/sdc -d 3ware,0 -a -s S/../.././00
519.B \ \ /dev/sdc -d 3ware,1 -a -s S/../.././01
520.B \ \ /dev/sdd -d 3ware,2 -a -s S/../.././02
521.B \ \ /dev/sdd -d 3ware,3 -a -s S/../.././03
522.B #
523.nf
524.B # Two ATA disks on a 3ware 9000 controller.
525.B # Start long self-tests Sundays between midnight and
526.B # 1am and 2-3 am
527.B \ \ /dev/twa0 -d 3ware,0 -a -s L/../../7/00
528.B \ \ /dev/twa0 -d 3ware,1 -a -s L/../../7/02
529.B #
530.nf
531.B # The following line enables monitoring of the
532.B # ATA Error Log and the Self-Test Error Log.
533.B # It also tracks changes in both Prefailure
534.B # and Usage Attributes, apart from Attributes
535.B # 9, 194, and 231, and shows continued lines:
536.B #
537.B \ \ /dev/hdd\ -l\ error\ \e
538.B \ \ \ \ \ \ \ \ \ \ \ -l\ selftest\ \e
539.B \ \ \ \ \ \ \ \ \ \ \ -t\ \e\ \ \ \ \ \ # Attributes not tracked:
540.B \ \ \ \ \ \ \ \ \ \ \ -I\ 194\ \e\ \ # temperature
541.B \ \ \ \ \ \ \ \ \ \ \ -I\ 231\ \e\ \ # also temperature
542.B \ \ \ \ \ \ \ \ \ \ \ -I 9\ \ \ \ \ \ # power-on hours
543.B #
544.B ################################################
545.fi
546
547.PP
548.SH CONFIGURATION FILE DIRECTIVES
549.PP
550
551If the first non-comment entry in the configuration file is the text
552string
553.B DEVICESCAN
554in capital letters, then
555\fBsmartd\fP
556will ignore any remaining lines in the configuration file, and will
557scan for devices.
558.B DEVICESCAN
559may optionally be followed by Directives that will apply to all
560devices that are found in the scan. Please see below for additional
561details.
562
563.sp 2
564The following are the Directives that may appear following the device
565name or
566.B DEVICESCAN
567on any line of the
568.B /usr/local/etc/smartd.conf
569configuration file. Note that
570.B these are NOT command-line options for
571\fBsmartd\fP.
572The Directives below may appear in any order, following the device
573name.
574
575.B For an ATA device,
576if no Directives appear, then the device will be monitored
577as if the \'\-a\' Directive (monitor all SMART properties) had been given.
578
579.B If a SCSI disk is listed,
580it will be monitored at the maximum implemented level: roughly
581equivalent to using the \'\-H \-l selftest\' options for an ATA disk.
582So with the exception of \'\-d\', \'\-m\', \'\-l selftest\', \'\-s\', and
583\'\-M\', the Directives below are ignored for SCSI disks. For SCSI
584disks, the \'\-m\' Directive sends a warning email if the SMART status
585indicates a disk failure or problem, if the SCSI inquiry about disk
586status fails, or if new errors appear in the self-test log.
587
588.B If a 3ware controller is used
589then the corresponding SCSI (/dev/sd?) or character device (/dev/twe?
590or /dev/twa?) must be listed, along with the \'\-d 3ware,N\' Directive
591(see below). The individual ATA disks hosted by the 3ware controller
592appear to \fBsmartd\fP as normal ATA devices. Hence all the ATA
593directives can be used for these disks (but see note below).
594
595.TP
596.B \-d TYPE
597Specifies the type of the device. This Directive may be used multiple
598times for one device, but the arguments \fIata\fP, \fIscsi\fP,
599\fImarvell\fP, and \fI3ware,N\fP are mutually-exclusive. If more than
600one is given then \fBsmartd\fP will use the last one which appears.
601
602If none of these three arguments is given, then \fBsmartd\fP will
603first attempt to guess the device type by looking at whether the sixth
604character in the device name is an \'s\' or an \'h\'. This will work for
605device names like /dev/hda or /dev/sdb, and corresponds to choosing
606\fIata\fP or \fIscsi\fP respectively. If
607\fBsmartd\fP
608can\'t guess from this sixth character, then it will simply try to
609access the device using first ATA and then SCSI ioctl()s.
610
611The valid arguments to this Directive are:
612
613.I ata
614\- the device type is ATA. This prevents
615\fBsmartd\fP
616from issuing SCSI commands to an ATA device.
617
618.I scsi
619\- the device type is SCSI. This prevents
620\fBsmartd\fP
621from issuing ATA commands to a SCSI device.
622
623.I marvell
624\- Under Linux, interact with SATA disks behind Marvell chip-set
625controllers (using the Marvell rather than libata driver).
626
627.I 3ware,N
628\- the device consists of one or more ATA disks connected to a 3ware
629RAID controller. The non-negative integer N (in the range from 0 to 15
630inclusive) denotes which disk on the controller is monitored. In log
631files and email messages this disk will be identified as 3ware_disk_XX
632with XX in the range from 00 to 15 inclusive.
633
634This Directive may at first appear confusing, because the 3ware
635controller is a SCSI device (such as /dev/sda) and should be listed as
636such in the the configuration file.
637However when the \'\-d 3ware,N\'
638Directive is used, then the corresponding disk is addressed using
639native ATA commands which are \'passed through\' the SCSI driver. All
640ATA Directives listed in this man page may be used. Note that while
641you may use \fBany\fP of the 3ware SCSI logical devices /dev/sd? to
642address \fBany\fP of the physical disks (3ware ports), error and log
643messages will make the most sense if you always list the 3ware SCSI
644logical device corresponding to the particular physical disks. Please
645see the \fBsmartctl\fP man page for further details.
646
647ATA disks behind 3ware controllers may alternatively be accessed via a
648character device interface /dev/twe0-15 (3ware 6000/7000/8000
649controllers) and /dev/twa0-15 (3ware 9000 series controllers). Note
650that the 9000 series controllers may \fBonly\fP be accessed using the
651character device interface /dev/twa0-15 and not the SCSI device
652interface /dev/sd?. Please see the \fBsmartctl\fP man page for
653further details.
654
655Note that older 3w-xxxx drivers do not pass the \'Enable Autosave\'
656(\fB-S on\fP) and \'Enable Automatic Offline\' (\fB-o on\fP) commands
657to the disk, if the SCSI interface is used, and produce these types of
658harmless syslog error messages instead: \fB\'3w-xxxx: tw_ioctl():
659Passthru size (123392) too big\'\fP. This can be fixed by upgrading to
660version 1.02.00.037 or later of the 3w-xxxx driver, or by applying a
661patch to older versions. See
662\fBhttp://smartmontools.sourceforge.net/\fP for instructions.
663Alternatively use the character device interfaces /dev/twe0-15 (3ware
6646/7/8000 series controllers) or /dev/twa0-15 (3ware 9000 series
665controllers).
666
667
668.B 3ware controllers are currently ONLY supported under Linux.
669
670.I removable
671\- the device or its media is removable. This indicates to
672\fBsmartd\fP
673that it should continue (instead of exiting, which is the default
674behavior) if the device does not appear to be present when
675\fBsmartd\fP is started. This Directive may be used in conjunction
676with the other \'\-d\' Directives.
677
678.TP
679.B \-n POWERMODE[,q]
680This \'nocheck\' Directive is used to prevent a disk from being
681spun-up when it is periodically polled by \fBsmartd\fP.
682
683ATA disks have five different power states. In order of increasing
684power consumption they are: \'OFF\', \'SLEEP\', \'STANDBY\', \'IDLE\',
685and \'ACTIVE\'. Typically in the OFF, SLEEP, and STANDBY modes the
686disk\'s platters are not spinning. But usually, in response to SMART
687commands issued by \fBsmartd\fP, the disk platters are spun up. So if
688this option is not used, then a disk which is in a low\-power mode may
689be spun up and put into a higher\-power mode when it is periodically
690polled by \fBsmartd\fP.
691
692Note that if the disk is in SLEEP mode when \fBsmartd\fP is started,
693then it won't respond to \fBsmartd\fP commands, and so the disk won't
694be registered as a device for \fBsmartd\fP to monitor. If a disk is in
695any other low\-power mode, then the commands issued by \fBsmartd\fP to
696register the disk will probably cause it to spin\-up.
697
698The \'\fB\-n\fP\' (nocheck) Directive specifies if \fBsmartd\fP\'s
699periodic checks should still be carried out when the device is in a
700low\-power mode. It may be used to prevent a disk from being spun\-up
701by periodic \fBsmartd\fP polling. The allowed values of POWERMODE
702are:
703
704.I never
705\- \fBsmartd\fP will poll (check) the device regardless of its power
706mode. This may cause a disk which is spun\-down to be spun\-up when
707\fBsmartd\fP checks it. This is the default behavior if the '\-n'
708Directive is not given.
709
710.I sleep
711\- check the device unless it is in SLEEP mode.
712
713.I standby
714\- check the device unless it is in SLEEP or STANDBY mode. In
715these modes most disks are not spinning, so if you want to prevent
716a laptop disk from spinning up each time that \fBsmartd\fP polls,
717this is probably what you want.
718
719.I idle
720\- check the device unless it is in SLEEP, STANDBY or IDLE mode.
721In the IDLE state, most disks are still spinning, so this is probably
722not what you want.
723
724When a periodic test is skipped, \fBsmartd\fP normally writes an
725informal log message. The message can be suppressed by appending
726the option \',q\' to POWERMODE (like \'\-n standby,q\').
727This prevents a laptop disk from spinning up due to this message.
728
729.TP
730.B \-T TYPE
731Specifies how tolerant
732\fBsmartd\fP
733should be of SMART command failures. The valid arguments to this
734Directive are:
735
736.I normal
737\- do not try to monitor the disk if a mandatory SMART command fails, but
738continue if an optional SMART command fails. This is the default.
739
740.I permissive
741\- try to monitor the disk even if it appears to lack SMART
742capabilities. This may be required for some old disks (prior to
743ATA\-3 revision 4) that implemented SMART before the SMART standards
744were incorporated into the ATA/ATAPI Specifications. This may also be
745needed for some Maxtor disks which fail to comply with the ATA
746Specifications and don't properly indicate support for error\- or
747self\-test logging.
748
749[Please see the \fBsmartctl \-T\fP command-line option.]
750.TP
751.B \-o VALUE
752Enables or disables SMART Automatic Offline Testing when
753\fBsmartd\fP
754starts up and has no further effect. The valid arguments to this
755Directive are \fIon\fP and \fIoff\fP.
756
757The delay between tests is vendor-specific, but is typically four
758hours.
759
760Note that SMART Automatic Offline Testing is \fBnot\fP part of the ATA
761Specification. Please see the
762.B smartctl \-o
763command-line option documentation for further information about this
764feature.
765.TP
766.B \-S VALUE
767Enables or disables Attribute Autosave when \fBsmartd\fP
768starts up and has no further effect. The valid arguments to this
769Directive are \fIon\fP and \fIoff\fP. Also affects SCSI devices.
770[Please see the \fBsmartctl \-S\fP command-line option.]
771.TP
772.B \-H
773Check the SMART health status of the disk. If any Prefailure
774Attributes are less than or equal to their threshold values, then disk
775failure is predicted in less than 24 hours, and a message at loglevel
776.B \'LOG_CRITICAL\'
777will be logged to syslog. [Please see the
778.B smartctl \-H
779command-line option.]
780.TP
781.B \-l TYPE
782Reports increases in the number of errors in one of the two SMART logs. The
783valid arguments to this Directive are:
784
785.I error
786\- report if the number of ATA errors reported in the ATA Error Log
787has increased since the last check.
788
789.I selftest
790\- report if the number of failed tests reported in the SMART
791Self-Test Log has increased since the last check, or if the timestamp
792associated with the most recent failed test has increased. Note that
793such errors will \fBonly\fP be logged if you run self-tests on the
794disk (and it fails a test!). Self-Tests can be run automatically by
795\fBsmartd\fP: please see the \fB\'\-s\'\fP Directive below.
796Self-Tests can also be run manually by using the \fB\'\-t\ short\'\fP
797and \fB\'\-t\ long\'\fP options of \fBsmartctl\fP and the results of
798the testing can be observed using the \fBsmartctl \'\-l\ selftest\'\fP
799command-line option.]
800
801[Please see the \fBsmartctl \-l\fP and \fB\-t\fP command-line
802options.]
803.TP
804.B \-s REGEXP
805Run Self-Tests or Offline Immediate Tests, at scheduled times. A
806Self- or Offline Immediate Test will be run at the end of periodic
807device polling, if all 12 characters of the string \fBT/MM/DD/d/HH\fP
808match the extended regular expression \fBREGEXP\fP. Here:
809.RS 7
810.IP \fBT\fP 4
811is the type of the test. The values that \fBsmartd\fP will try to
812match (in turn) are: \'L\' for a \fBL\fPong Self-Test, \'S\' for a
813\fBS\fPhort Self-Test, \'C\' for a \fBC\fPonveyance Self-Test (ATA
814only), and \'O\' for an \fBO\fPffline Immediate Test (ATA only). As
815soon as a match is found, the test will be started and no additional
816matches will be sought for that device and that polling cycle.
817.IP \fBMM\fP 4
818is the month of the year, expressed with two decimal digits. The
819range is from 01 (January) to 12 (December) inclusive. Do \fBnot\fP
820use a single decimal digit or the match will always fail!
821.IP \fBDD\fP 4
822is the day of the month, expressed with two decimal digits. The
823range is from 01 to 31 inclusive. Do \fBnot\fP
824use a single decimal digit or the match will always fail!
825.IP \fBd\fP 4
826is the day of the week, expressed with one decimal digit. The
827range is from 1 (Monday) to 7 (Sunday) inclusive.
828.IP \fBHH\fP 4
829is the hour of the day, written with two decimal digits, and given in
830hours after midnight. The range is 00 (midnight to just before 1am)
831to 23 (11pm to just before midnight) inclusive. Do \fBnot\fP use a
832single decimal digit or the match will always fail!
833.RE
834.\" The following two lines are a workaround for a man2html bug. Please leave them.
835.\" They define a non-existent option; useful because man2html can't correctly reset the margins.
836.TP
837.B \&
838Some examples follow. In reading these, keep in mind that in extended
839regular expressions a dot \fB\'.\'\fP matches any single character, and
840a parenthetical expression such as \fB\'(A|B|C)\'\fP denotes any one of the three possibilities \fBA\fP,
841\fBB\fP, or \fBC\fP.
842
843To schedule a short Self-Test between 2-3am every morning, use:
844.nf
845\fB \-s S/../.././02\fP
846.fi
847To schedule a long Self-Test between 4-5am every Sunday morning, use:
848.nf
849\fB \-s L/../../7/04\fP
850.fi
851To schedule a long Self-Test between 10-11pm on the first and
852fifteenth day of each month, use:
853.nf
854\fB \-s L/../(01|15)/./22\fP
855.fi
856To schedule an Offline Immediate test after every midnight, 6am,
857noon,and 6pm, plus a Short Self-Test daily at 1-2am and a Long
858Self-Test every Saturday at 3-4am, use:
859.nf
860\fB \-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)\fP
861.fi
862
863Scheduled tests are run immediately following the regularly-scheduled
864device polling, if the current local date, time, and test type, match
865\fBREGEXP\fP. By default the regularly-scheduled device polling
866occurs every thirty minutes after starting \fBsmartd\fP. Take caution
867if you use the \'\-i\' option to make this polling interval more than
868sixty minutes: the poll times may fail to coincide with any of the
869testing times that you have specified with \fBREGEXP\fP, and so the
870self tests may not take place as you wish.
871
872Before running an offline or self-test, \fBsmartd\fP checks to be sure
873that a self-test is not already running. If a self-test \fBis\fP
874already running, then this running self test will \fBnot\fP be
875interrupted to begin another test.
876
877\fBsmartd\fP will not attempt to run \fBany\fP type of test if another
878test was already started or run in the same hour.
879
880Each time a test is run, \fBsmartd\fP will log an entry to SYSLOG.
881You can use these or the '-q showtests' command-line option to verify
882that you constructed \fBREGEXP\fP correctly. The matching order
883(\fBL\fP before \fBS\fP before \fBC\fP before \fBO\fP) ensures that
884if multiple test types are all scheduled for the same hour, the
885longer test type has precedence. This is usually the desired behavior.
886
887Unix users: please beware that the rules for extended regular
888expressions [regex(7)] are \fBnot\fP the same as the rules for
889file\-name pattern matching by the shell [glob(7)]. \fBsmartd\fP will
890issue harmless informational warning messages if it detects characters
891in \fBREGEXP\fP that appear to indicate that you have made this
892mistake.
893
894.TP
895.B \-m ADD
896Send a warning email to the email address \fBADD\fP if the \'\-H\',
897\'\-l\', \'\-f\', \'\-C\', or \'\-O\' Directives detect a failure or a
898new error, or if a SMART command to the disk fails. This Directive
899only works in conjunction with these other Directives (or with the
900equivalent default \'\-a\' Directive).
901
902To prevent your email in-box from getting filled up with warning
903messages, by default only a single warning will be sent for each of
904the enabled alert types, \'\-H\', \'\-l\', \'\-f\', \'\-C\', or
905\'\-O\' even if more than one failure or error is detected or if the
906failure or error persists. [This behavior can be modified; see the
907\'\-M\' Directive below.]
908
909To send email to more than one user, please use the following "comma
910separated" form for the address: \fBuser1@add1,user2@add2,...,userN@addN\fP
911(with no spaces).
912
913To test that email is being sent correctly, use the \'\-M test\'
914Directive described below to send one test email message on
915\fBsmartd\fP
916startup.
917
918By default, email is sent using the system
919.B mail
920command. In order that
921\fBsmartd\fP
922find the mail command (normally /bin/mail) an executable named
923.B \'mail\'
924must be in the path of the shell or environment from which
925\fBsmartd\fP
926was started. If you wish to specify an explicit path to the mail
927executable (for example /usr/local/bin/mail) or a custom script to
928run, please use the \'\-M exec\' Directive below.
929
930Note that by default under Solaris, in the previous paragraph,
931\'\fBmailx\fP\' and \'\fB/bin/mailx\fP\' are used, since Solaris
932\'/bin/mail\' does not accept a \'\-s\' (Subject) command-line
933argument.
934
935On Windows, the \'\fBBlat\fP\' mailer
936(\fBhttp://blat.sourceforge.net/\fP) is used by default.
937This mailer uses a different command line syntax, see
938\'\-M exec\' below.
939
940Note also that there is a special argument
941.B <nomailer>
942which can be given to the \'\-m\' Directive in conjunction with the \'\-M
943exec\' Directive. Please see below for an explanation of its effect.
944
945If the mailer or the shell running it produces any STDERR/STDOUT
946output, then a snippet of that output will be copied to SYSLOG. The
947remainder of the output is discarded. If problems are encountered in
948sending mail, this should help you to understand and fix them. If
949you have mail problems, we recommend running \fBsmartd\fP in debug
950mode with the \'-d\' flag, using the \'-M test\' Directive described
951below.
952
953The following extension is available on Windows:
954By specifying \'\fBmsgbox\fP\' as a mail address, a warning
955"email" is displayed as a message box on the screen.
956Using both \'\fBmsgbox\fP\' and regular mail addresses is possible,
957if \'\fBmsgbox\fP\' is the first word in the comma separated list.
958With \'\fBsysmsgbox\fP\', a system modal (always on top) message box
959is used. If running as a service, a service notification message box
960(always shown on current visible desktop) is used.
961
962.TP
963.B \-M TYPE
964These Directives modify the behavior of the
965\fBsmartd\fP
966email warnings enabled with the \'\-m\' email Directive described above.
967These \'\-M\' Directives only work in conjunction with the \'\-m\'
968Directive and can not be used without it.
969
970Multiple \-M Directives may be given. If more than one of the
971following three \-M Directives are given (example: \-M once \-M daily)
972then the final one (in the example, \-M daily) is used.
973
974The valid arguments to the \-M Directive are (one of the following
975three):
976
977.I once
978\- send only one warning email for each type of disk problem detected. This
979is the default.
980
981.I daily
982\- send additional warning reminder emails, once per day, for each type
983of disk problem detected.
984
985.I diminishing
986\- send additional warning reminder emails, after a one-day interval,
987then a two-day interval, then a four-day interval, and so on for each
988type of disk problem detected. Each interval is twice as long as the
989previous interval.
990
991In addition, one may add zero or more of the following Directives:
992
993.I test
994\- send a single test email
995immediately upon
996\fBsmartd\fP
997startup. This allows one to verify that email is delivered correctly.
998
999.I exec PATH
1000\- run the executable PATH instead of the default mail command, when
1001\fBsmartd\fP
1002needs to send email. PATH must point to an executable binary file or
1003script.
1004
1005By setting PATH to point to a customized script, you can make
1006\fBsmartd\fP perform useful tricks when a disk problem is detected
1007(beeping the console, shutting down the machine, broadcasting warnings
1008to all logged-in users, etc.) But please be careful. \fBsmartd\fP
1009will \fBblock\fP until the executable PATH returns, so if your
1010executable hangs, then \fBsmartd\fP will also hang. Some sample
1011scripts are included in
1012/usr/local/share/doc/smartmontools-5.1/examplescripts/.
1013
1014The return status of the executable is recorded by \fBsmartd\fP in
1015SYSLOG. The executable is not expected to write to STDOUT or
1016STDERR. If it does, then this is interpreted as indicating that
1017something is going wrong with your executable, and a fragment of this
1018output is logged to SYSLOG to help you to understand the problem.
1019Normally, if you wish to leave some record behind, the executable
1020should send mail or write to a file or device.
1021
1022Before running the executable, \fBsmartd\fP sets a number of
1023environment variables. These environment variables may be used to
1024control the executable\'s behavior. The environment variables
1025exported by \fBsmartd\fP are:
1026.RS 7
1027.IP \fBSMARTD_MAILER\fP 4
1028is set to the argument of \-M exec, if present or else to \'mail\'
1029(examples: /bin/mail, mail).
1030.IP \fBSMARTD_DEVICE\fP 4
1031is set to the device path (examples: /dev/hda, /dev/sdb).
1032.IP \fBSMARTD_DEVICETYPE\fP 4
1033is set to the device type (possible values: ata, scsi, 3ware,N). Here
1034N=0,...,15 denotes the ATA disk behind a 3ware RAID controller.
1035.IP \fBSMARTD_DEVICESTRING\fP 4
1036is set to the device description. For SMARTD_DEVICETYPE of ata or
1037scsi, this is the same as SMARTD_DEVICE. For 3ware RAID controllers,
1038the form used is \'/dev/sdc [3ware_disk_01]\'. In this case the device
1039string contains a space and is NOT quoted. So to use
1040$SMARTD_DEVICESTRING in a bash script you should probably enclose it
1041in double quotes.
1042.IP \fBSMARTD_FAILTYPE\fP 4
1043gives the reason for the warning or message email. The possible values that
1044it takes and their meanings are:
1045.nf
1046.fi
1047\fIEmailTest\fP: this is an email test message.
1048.nf
1049.fi
1050\fIHealth\fP: the SMART health status indicates imminent failure.
1051.nf
1052.fi
1053\fIUsage\fP: a usage Attribute has failed.
1054.nf
1055.fi
1056\fISelfTest\fP: the number of self-test failures has increased.
1057.nf
1058.fi
1059\fIErrorCount\fP: the number of errors in the ATA error log has increased.
1060.nf
1061.fi
1062\fICurrentPendingSector\fP: one of more disk sectors could not be
1063read and are marked to be reallocated (replaced with spare sectors).
1064.nf
1065.fi
1066\fIOfflineUncorrectableSector\fP: during off\-line testing, or self\-testing,
1067one or more disk sectors could not be read.
1068.nf
1069.fi
1070\fIFailedHealthCheck\fP: the SMART health status command failed.
1071.nf
1072.fi
1073\fIFailedReadSmartData\fP: the command to read SMART Attribute data failed.
1074.nf
1075.fi
1076\fIFailedReadSmartErrorLog\fP: the command to read the SMART error log failed.
1077.nf
1078.fi
1079\fIFailedReadSmartSelfTestLog\fP: the command to read the SMART self-test log failed.
1080.nf
1081.fi
1082\fIFailedOpenDevice\fP: the open() command to the device failed.
1083.IP \fBSMARTD_ADDRESS\fP 4
1084is determined by the address argument ADD of the \'\-m\' Directive.
1085If ADD is \fB<nomailer>\fP, then \fBSMARTD_ADDRESS\fP is not set.
1086Otherwise, it is set to the comma-separated-list of email addresses
1087given by the argument ADD, with the commas replaced by spaces
1088(example:admin@example.com root). If more than one email address is
1089given, then this string will contain space characters and is NOT
1090quoted, so to use it in a bash script you may want to enclose it in
1091double quotes.
1092.IP \fBSMARTD_MESSAGE\fP 4
1093is set to the one sentence summary warning email message string from
1094\fBsmartd\fP.
1095This message string contains space characters and is NOT quoted. So to
1096use $SMARTD_MESSAGE in a bash script you should probably enclose it in
1097double quotes.
1098.IP \fBSMARTD_FULLMESSAGE\fP 4
1099is set to the contents of the entire email warning message string from
1100\fBsmartd\fP.
1101This message string contains space and return characters and is NOT quoted. So to
1102use $SMARTD_FULLMESSAGE in a bash script you should probably enclose it in
1103double quotes.
1104.IP \fBSMARTD_TFIRST\fP 4
1105is a text string giving the time and date at which the first problem
1106of this type was reported. This text string contains space characters
1107and no newlines, and is NOT quoted. For example:
1108.nf
1109.fi
1110Sun Feb 9 14:58:19 2003 CST
1111.IP \fBSMARTD_TFIRSTEPOCH\fP 4
1112is an integer, which is the unix epoch (number of seconds since Jan 1,
11131970) for \fBSMARTD_TFIRST\fP.
1114.RE
1115.\" The following two lines are a workaround for a man2html bug. Please leave them.
1116.\" They define a non-existent option; useful because man2html can't correctly reset the margins.
1117.TP
1118.B \&
1119The shell which is used to run PATH is system-dependent. For vanilla
1120Linux/glibc it\'s bash. For other systems, the man page for
1121\fBpopen\fP(3) should say what shell is used.
1122
1123If the \'\-m ADD\' Directive is given with a normal address argument,
1124then the executable pointed to by PATH will be run in a shell with
1125STDIN receiving the body of the email message, and with the same
1126command-line arguments:
1127.nf
1128-s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
1129.fi
1130that would normally be provided to \'mail\'. Examples include:
1131.nf
1132.B -m user@home -M exec /bin/mail
1133.B -m admin@work -M exec /usr/local/bin/mailto
1134.B -m root -M exec /Example_1/bash/script/below
1135.fi
1136
1137Note that on Windows, the syntax of the \'\fBBlat\fP\' mailer is
1138used:
1139.nf
1140- -q -subject "$SMARTD_SUBJECT" -to "$SMARTD_ADDRESS"
1141.fi
1142
1143If the \'\-m ADD\' Directive is given with the special address argument
1144.B <nomailer>
1145then the executable pointed to by PATH is run in a shell with
1146.B no
1147STDIN and
1148.B no
1149command-line arguments, for example:
1150.nf
1151.B -m <nomailer> -M exec /Example_2/bash/script/below
1152.fi
1153If the executable produces any STDERR/STDOUT output, then \fBsmartd\fP
1154assumes that something is going wrong, and a snippet of that output
1155will be copied to SYSLOG. The remainder of the output is then
1156discarded.
1157
1158Some EXAMPLES of scripts that can be used with the \'\-M exec\'
1159Directive are given below. Some sample scripts are also included in
1160/usr/local/share/doc/smartmontools-5.1/examplescripts/.
1161
1162.TP
1163.B \-f
1164Check for \'failure\' of any Usage Attributes. If these Attributes are
1165less than or equal to the threshold, it does NOT indicate imminent
1166disk failure. It "indicates an advisory condition where the usage or
1167age of the device has exceeded its intended design life period."
1168[Please see the \fBsmartctl \-A\fP command-line option.]
1169.TP
1170.B \-p
1171Report anytime that a Prefail Attribute has changed
1172its value since the last check, 30 minutes ago. [Please see the
1173.B smartctl \-A
1174command-line option.]
1175.TP
1176.B \-u
1177Report anytime that a Usage Attribute has changed its value
1178since the last check, 30 minutes ago. [Please see the
1179.B smartctl \-A
1180command-line option.]
1181.TP
1182.B \-t
1183Equivalent to turning on the two previous flags \'\-p\' and \'\-u\'.
1184Tracks changes in \fIall\fP device Attributes (both Prefailure and
1185Usage). [Please see the \fBsmartctl\fP \-A command-line option.]
1186.TP
1187.B \-i ID
1188Ignore device Attribute number \fBID\fP when checking for failure of
1189Usage Attributes. \fBID\fP must be a decimal integer in the range
1190from 1 to 255. This Directive modifies the behavior of the \'\-f\'
1191Directive and has no effect without it.
1192
1193This is useful, for example, if you have a very old disk and don\'t
1194want to keep getting messages about the hours-on-lifetime Attribute
1195(usually Attribute 9) failing. This Directive may appear multiple
1196times for a single device, if you want to ignore multiple Attributes.
1197.TP
1198.B \-I ID
1199Ignore device Attribute \fBID\fP when tracking changes in the
1200Attribute values. \fBID\fP must be a decimal integer in the range
1201from 1 to 255. This Directive modifies the behavior of the \'\-p\',
1202\'\-u\', and \'\-t\' tracking Directives and has no effect without one
1203of them.
1204
1205This is useful, for example, if one of the device Attributes is the disk
1206temperature (usually Attribute 194 or 231). It\'s annoying to get reports
1207each time the temperature changes. This Directive may appear multiple
1208times for a single device, if you want to ignore multiple Attributes.
1209.TP
1210.B \-r ID
1211When tracking, report the \fIRaw\fP value of Attribute \fBID\fP along
1212with its (normally reported) \fINormalized\fP value. \fBID\fP must be
1213a decimal integer in the range from 1 to 255. This Directive modifies
1214the behavior of the \'\-p\', \'\-u\', and \'\-t\' tracking Directives
1215and has no effect without one of them. This Directive may be given
1216multiple times.
1217
1218A common use of this Directive is to track the device Temperature
1219(often ID=194 or 231).
1220
1221.TP
1222.B \-R ID
1223When tracking, report whenever the \fIRaw\fP value of Attribute
1224\fBID\fP changes. (Normally \fBsmartd\fP only tracks/reports changes
1225of the \fINormalized\fP Attribute values.) \fBID\fP must be a decimal
1226integer in the range from 1 to 255. This Directive modifies the
1227behavior of the \'\-p\', \'\-u\', and \'\-t\' tracking Directives and
1228has no effect without one of them. This Directive may be given
1229multiple times.
1230
1231If this Directive is given, it automatically implies the \'\-r\'
1232Directive for the same Attribute, so that the Raw value of the
1233Attribute is reported.
1234
1235A common use of this Directive is to track the device Temperature
1236(often ID=194 or 231). It is also useful for understanding how
1237different types of system behavior affects the values of certain
1238Attributes.
1239
1240.TP
1241.B \-C ID
1242[ATA only] Report if the current number of pending sectors is
1243non-zero. Here \fBID\fP is the id number of the Attribute whose raw
1244value is the Current Pending Sector count. The allowed range of
1245\fBID\fP is 0 to 255 inclusive. To turn off this reporting, use
1246ID\ =\ 0. If the \fB\-C ID\fP option is not given, then it defaults to
1247\fB\-C 197\fP (since Attribute 197 is generally used to monitor
1248pending sectors).
1249
1250A pending sector is a disk sector (containing 512 bytes of your data)
1251which the device would like to mark as ``bad" and reallocate.
1252Typically this is because your computer tried to read that sector, and
1253the read failed because the data on it has been corrupted and has
1254inconsistent Error Checking and Correction (ECC) codes. This is
1255important to know, because it means that there is some unreadable data
1256on the disk. The problem of figuring out what file this data belongs
1257to is operating system and file system specific. You can typically
1258force the sector to reallocate by writing to it (translation: make the
1259device substitute a spare good sector for the bad one) but at the
1260price of losing the 512 bytes of data stored there.
1261
1262.TP
1263.B \-U ID
1264[ATA only] Report if the number of offline uncorrectable sectors is
1265non-zero. Here \fBID\fP is the id number of the Attribute whose raw
1266value is the Offline Uncorrectable Sector count. The allowed range of
1267\fBID\fP is 0 to 255 inclusive. To turn off this reporting, use
1268ID\ =\ 0. If the \fB\-U ID\fP option is not given, then it defaults to
1269\fB\-U 198\fP (since Attribute 198 is generally used to monitor
1270offline uncorrectable sectors).
1271
1272
1273An offline uncorrectable sector is a disk sector which was not
1274readable during an off\-line scan or a self\-test. This is important
1275to know, because if you have data stored in this disk sector, and you
1276need to read it, the read will fail. Please see the previous \'\-C\'
1277option for more details.
1278
1279.TP
1280.B \-F TYPE
1281[ATA only] Modifies the behavior of \fBsmartd\fP to compensate for
1282some known and understood device firmware bug. The arguments to this
1283Directive are exclusive, so that only the final Directive given is
1284used. The valid values are:
1285
1286.I none
1287\- Assume that the device firmware obeys the ATA specifications. This is
1288the default, unless the device has presets for \'\-F\' in the device
1289database.
1290
1291.I samsung
1292\- In some Samsung disks (example: model SV4012H Firmware Version:
1293RM100-08) some of the two- and four-byte quantities in the SMART data
1294structures are byte-swapped (relative to the ATA specification).
1295Enabling this option tells \fBsmartd\fP to evaluate these quantities
1296in byte-reversed order. Some signs that your disk needs this option
1297are (1) no self-test log printed, even though you have run self-tests;
1298(2) very large numbers of ATA errors reported in the ATA error log;
1299(3) strange and impossible values for the ATA error log timestamps.
1300
1301.I samsung2
1302\- In more recent Samsung disks (firmware revisions ending in "\-23") the
1303number of ATA errors reported is byte swapped. Enabling this option
1304tells \fBsmartd\fP to evaluate this quantity in byte-reversed order.
1305
1306Note that an explicit \'\-F\' Directive will over-ride any preset
1307values for \'\-F\' (see the \'\-P\' option below).
1308
1309
1310[Please see the \fBsmartctl \-F\fP command-line option.]
1311
1312.TP
1313.B \-v N,OPTION
1314Modifies the labeling for Attribute N, for disks which use
1315non-standard Attribute definitions. This is useful in connection with
1316the Attribute tracking/reporting Directives.
1317
1318This Directive may appear multiple times. Valid arguments to this
1319Directive are:
1320
1321.I 9,minutes
1322\- Raw Attribute number 9 is power-on time in minutes. Its raw value
1323will be displayed in the form \'Xh+Ym\'. Here X is hours, and Y is
1324minutes in the range 0-59 inclusive. Y is always printed with two
1325digits, for example \'06\' or \'31\' or \'00\'.
1326
1327.I 9,seconds
1328\- Raw Attribute number 9 is power-on time in seconds. Its raw value
1329will be displayed in the form \'Xh+Ym+Zs\'. Here X is hours, Y is
1330minutes in the range 0-59 inclusive, and Z is seconds in the range
13310-59 inclusive. Y and Z are always printed with two digits, for
1332example \'06\' or \'31\' or \'00\'.
1333
1334.I 9,halfminutes
1335\- Raw Attribute number 9 is power-on time, measured in units of 30
1336seconds. This format is used by some Samsung disks. Its raw value
1337will be displayed in the form \'Xh+Ym\'. Here X is hours, and Y is
1338minutes in the range 0-59 inclusive. Y is always printed with two
1339digits, for example \'06\' or \'31\' or \'00\'.
1340
1341.I 9,temp
1342\- Raw Attribute number 9 is the disk temperature in Celsius.
1343
1344.I 192,emergencyretractcyclect
1345\- Raw Attribute number 192 is the Emergency Retract Cycle Count.
1346
1347.I 193,loadunload
1348\- Raw Attribute number 193 contains two values. The first is the
1349number of load cycles. The second is the number of unload cycles.
1350The difference between these two values is the number of times that
1351the drive was unexpectedly powered off (also called an emergency
1352unload). As a rule of thumb, the mechanical stress created by one
1353emergency unload is equivalent to that created by one hundred normal
1354unloads.
1355
1356.I 194,10xCelsius
1357\- Raw Attribute number 194 is ten times the disk temperature in
1358Celsius. This is used by some Samsung disks (example: model SV1204H
1359with RK100-13 firmware).
1360
1361.I 194,unknown
1362\- Raw Attribute number 194 is NOT the disk temperature, and its
1363interpretation is unknown. This is primarily useful for the -P
1364(presets) Directive.
1365
1366.I 198,offlinescanuncsectorct
1367\- Raw Attribute number 198 is the Offline Scan UNC Sector Count.
1368
1369.I 200,writeerrorcount
1370\- Raw Attribute number 200 is the Write Error Count.
1371
1372.I 201,detectedtacount
1373\- Raw Attribute number 201 is the Detected TA Count.
1374
1375.I 220,temp
1376\- Raw Attribute number 220 is the disk temperature in Celsius.
1377
1378Note: a table of hard drive models, listing which Attribute
1379corresponds to temperature, can be found at:
1380\fBhttp://www.guzu.net/linux/hddtemp.db\fP
1381
1382.I N,raw8
1383\- Print the Raw value of Attribute N as six 8-bit unsigned base-10
1384integers. This may be useful for decoding the meaning of the Raw
1385value. The form \'N,raw8\' prints Raw values for ALL Attributes in this
1386form. The form (for example) \'123,raw8\' only prints the Raw value for
1387Attribute 123 in this form.
1388
1389.I N,raw16
1390\- Print the Raw value of Attribute N as three 16-bit unsigned base-10
1391integers. This may be useful for decoding the meaning of the Raw
1392value. The form \'N,raw16\' prints Raw values for ALL Attributes in this
1393form. The form (for example) \'123,raw16\' only prints the Raw value for
1394Attribute 123 in this form.
1395
1396.I N,raw48
1397\- Print the Raw value of Attribute N as a 48-bit unsigned base-10
1398integer. This may be useful for decoding the meaning of the Raw
1399value. The form \'N,raw48\' prints Raw values for ALL Attributes in
1400this form. The form (for example) \'123,raw48\' only prints the Raw
1401value for Attribute 123 in this form.
1402
1403.TP
1404.B \-P TYPE
1405Specifies whether
1406\fBsmartd\fP
1407should use any preset options that are available for this drive. The
1408valid arguments to this Directive are:
1409
1410.I use
1411\- use any presets that are available for this drive. This is the default.
1412
1413.I ignore
1414\- do not use any presets for this drive.
1415
1416.I show
1417\- show the presets listed for this drive in the database.
1418
1419.I showall
1420\- show the presets that are available for all drives and then exit.
1421
1422[Please see the
1423.B smartctl \-P
1424command-line option.]
1425
1426.TP
1427.B \-a
1428Equivalent to turning on all of the following Directives:
1429.B \'\-H\'
1430to check the SMART health status,
1431.B \'\-f\'
1432to report failures of Usage (rather than Prefail) Attributes,
1433.B \'\-t\'
1434to track changes in both Prefailure and Usage Attributes,
1435.B \'\-l\ selftest\'
1436to report increases in the number of Self-Test Log errors,
1437.B \'\-l\ error\'
1438to report increases in the number of ATA errors,
1439.B \'\-C 197\'
1440to report nonzero values of the current pending sector count, and
1441.B \'\-U 198\'
1442to report nonzero values of the offline pending sector count.
1443
1444Note that \-a is the default for ATA devices. If none of these other
1445Directives is given, then \-a is assumed.
1446
1447.TP
1448.B #
1449Comment: ignore the remainder of the line.
1450.TP
1451.B \e
1452Continuation character: if this is the last non-white or non-comment
1453character on a line, then the following line is a continuation of the current
1454one.
1455.PP
1456If you are not sure which Directives to use, I suggest experimenting
1457for a few minutes with
1458.B smartctl
1459to see what SMART functionality your disk(s) support(s). If you do
1460not like voluminous syslog messages, a good choice of
1461\fBsmartd\fP
1462configuration file Directives might be:
1463.nf
1464.B \-H \-l\ selftest \-l\ error \-f.
1465.fi
1466If you want more frequent information, use:
1467.B -a.
1468
1469.TP
1470.B ADDITIONAL DETAILS ABOUT DEVICESCAN
1471If the first non-comment entry in the configuration file is the text
1472string \fBDEVICESCAN\fP in capital letters, then \fBsmartd\fP will
1473ignore any remaining lines in the configuration file, and will scan
1474for devices.
1475
1476If \fBDEVICESCAN\fP is not followed by any Directives, then smartd
1477will scan for both ATA and SCSI devices, and will monitor all possible
1478SMART properties of any devices that are found.
1479
1480\fBDEVICESCAN\fP may optionally be followed by any valid Directives,
1481which will be applied to all devices that are found in the scan. For
1482example
1483.nf
1484.B DEVICESCAN -m root@example.com
1485.fi
1486will scan for all devices, and then monitor them. It will send one
1487email warning per device for any problems that are found.
1488.nf
1489.B DEVICESCAN -d ata -m root@example.com
1490.fi
1491will do the same, but restricts the scan to ATA devices only.
1492.nf
1493.B DEVICESCAN -H -d ata -m root@example.com
1494.fi
1495will do the same, but only monitors the SMART health status of the
1496devices, (rather than the default \-a, which monitors all SMART
1497properties).
1498
1499.TP
1500.B EXAMPLES OF SHELL SCRIPTS FOR \'\-M exec\'
1501These are two examples of shell scripts that can be used with the \'\-M
1502exec PATH\' Directive described previously. The paths to these scripts
1503and similar executables is the PATH argument to the \'\-M exec PATH\'
1504Directive.
1505
1506Example 1: This script is for use with \'\-m ADDRESS -M exec PATH\'. It appends
1507the output of
1508.B smartctl -a
1509to the output of the smartd email warning message and sends it to ADDRESS.
1510
1511.nf
1512\fB
1513#! /bin/bash
1514
1515# Save the email message (STDIN) to a file:
1516cat > /root/msg
1517
1518# Append the output of smartctl -a to the message:
1519/usr/local/sbin/smartctl -a -d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg
1520
1521# Now email the message to the user at address ADD:
1522/bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg
1523\fP
1524.fi
1525
1526Example 2: This script is for use with \'\-m <nomailer> \-M exec
1527PATH\'. It warns all users about a disk problem, waits 30 seconds, and
1528then powers down the machine.
1529
1530.nf
1531\fB
1532#! /bin/bash
1533
1534# Warn all users of a problem
1535wall \'Problem detected with disk: \' "$SMARTD_DEVICESTRING"
1536wall \'Warning message from smartd is: \' "$SMARTD_MESSAGE"
1537wall \'Shutting down machine in 30 seconds... \'
1538
1539# Wait half a minute
1540sleep 30
1541
1542# Power down the machine
1543/sbin/shutdown -hf now
1544\fP
1545.fi
1546
1547Some example scripts are distributed with the smartmontools package,
1548in /usr/local/share/doc/smartmontools-5.1/examplescripts/.
1549
1550Please note that these scripts typically run as root, so any files
1551that they read/write should not be writable by ordinary users or
1552reside in directories like /tmp that are writable by ordinary users
1553and may expose your system to symlink attacks.
1554
1555As previously described, if the scripts write to STDOUT or STDERR,
1556this is interpreted as indicating that there was an internal error
1557within the script, and a snippet of STDOUT/STDERR is logged to SYSLOG.
1558The remainder is flushed.
1559
1560.\" ENDINCLUDE
1561.\" DO NOT MODIFY THIS OR PREVIOUS/NEXT LINES. THIS DEFINES THE
1562.\" END OF THE INCLUDE SECTION FOR smartd.conf.5
1563
1564.SH NOTES
1565\fBsmartd\fP
1566will make log entries at loglevel
1567.B LOG_INFO
1568if the Normalized SMART Attribute values have changed, as reported using the
1569.B \'\-t\', \'\-p\',
1570or
1571.B \'\-u\'
1572Directives. For example:
1573.nf
1574.B \'Device: /dev/hda, SMART Attribute: 194 Temperature_Celsius changed from 94 to 93\'
1575.fi
1576Note that in this message, the value given is the \'Normalized\' not the \'Raw\'
1577Attribute value (the disk temperature in this case is about 22
1578Celsius). The
1579.B \'-R\'
1580and
1581.B \'-r\'
1582Directives modify this behavior, so that the information is printed
1583with the Raw values as well, for example:
1584.nf
1585.B \'Device: /dev/hda, SMART Attribute: 194 Temperature_Celsius changed from 94 [Raw 22] to 93 [Raw 23]\'
1586.fi
1587Here the Raw values are the actual disk temperatures in Celsius. The
1588way in which the Raw values are printed, and the names under which the
1589Attributes are reported, is governed by the various
1590.B \'-v Num,Description\'
1591Directives described previously.
1592
1593Please see the
1594.B smartctl
1595manual page for further explanation of the differences between
1596Normalized and Raw Attribute values.
1597
1598\fBsmartd\fP
1599will make log entries at loglevel
1600.B LOG_CRIT
1601if a SMART Attribute has failed, for example:
1602.nf
1603.B \'Device: /dev/hdc, Failed SMART Attribute: 5 Reallocated_Sector_Ct\'
1604.fi
1605 This loglevel is used for reporting enabled by the
1606.B \'\-H\', \-f\', \'\-l\ selftest\',
1607and
1608.B \'\-l\ error\'
1609Directives. Entries reporting failure of SMART Prefailure Attributes
1610should not be ignored: they mean that the disk is failing. Use the
1611.B smartctl
1612utility to investigate.
1613
1614Under Solaris with the default \fB/etc/syslog.conf\fP configuration,
1615messages below loglevel \fBLOG_NOTICE\fP will \fBnot\fP be recorded.
1616Hence all \fBsmartd\fP messages with loglevel \fBLOG_INFO\fP will be
1617lost. If you want to use the existing daemon facility to log all
1618messages from \fBsmartd\fP, you should change \fB/etc/syslog.conf\fP
1619from:
1620.nf
1621 ...;daemon.notice;... /var/adm/messages
1622.fi
1623to read:
1624.nf
1625 ...;daemon.info;... /var/adm/messages
1626.fi
1627Alternatively, you can use a local facility to log messages: please
1628see the \fBsmartd\fP '-l' command-line option described above.
1629
1630On Cygwin and Windows, the log messages are written to the event log
1631or to a file. See documentation of the '-l FACILITY' option above for
1632details.
1633
1634On Windows, the following built-in commands can be used to control
1635\fBsmartd\fP, if running as a daemon:
1636
1637\'\fBsmartd status\fP\' \- check status
1638
1639\'\fBsmartd stop\fP\' \- stop smartd
1640
1641\'\fBsmartd reload\fP\' \- reread config file
1642
1643\'\fBsmartd restart\fP\' \- restart smartd
1644
1645\'\fBsmartd sigusr1\fP\' \- check disks now
1646
1647\'\fBsmartd sigusr2\fP\' \- toggle debug mode
1648
1649On WinNT4/2000/XP, \fBsmartd\fP can also be run as a Windows service:
1650
1651
1652The Cygwin Version of \fBsmartd\fP can be run as a service via the
1653cygrunsrv tool. The start-up script provides Cygwin-specific commands
1654to install and remove the service:
1655.nf
1656.B /usr/local/etc/rc.d/init.d/smartd install [options]
1657.B /usr/local/etc/rc.d/init.d/smartd remove
1658.fi
1659The service can be started and stopped by the start-up script as usual
1660(see \fBEXAMPLES\fP above).
1661
1662
1663The Windows Version of \fBsmartd\fP has buildin support for services:
1664
1665\'\fBsmartd install [options]\fP\' installs a service
1666named "smartd" (display name "SmartD Service") using the command line
1667\'/installpath/smartd.exe --service [options]\'.
1668
1669\'\fBsmartd remove\fP\' can later be used to remove the service entry
1670from registry.
1671
1672Upon startup, the smartd service changes the working directory
1673to its own installation path. If smartd.conf and blat.exe are stored
1674in this directory, no \'-c\' option and \'-M exec\' directive is needed.
1675
1676The debug mode (\'-d\', \'-q onecheck\') does not work if smartd is
1677running as service.
1678
1679The service can be controlled as usual with Windows commands \'net\'
1680or \'sc\' (\'\fBnet start smartd\fP\', \'\fBnet stop smartd\fP\').
1681
1682Pausing the service (\'\fBnet pause smartd\fP\') sets the interval between
1683disk checks (\'-i N\') to infinite.
1684
1685Continuing the paused service (\'\fBnet continue smartd\fP\') resets the
1686interval and rereads the configuration file immediately (like \fBSIGHUP\fP):
1687
1688Continuing a still running service (\'\fBnet continue smartd\fP\' without
1689preceding \'\fBnet pause smartd\fP\') does not reread configuration but
1690checks disks immediately (like \fBSIGUSR1\fP).
1691
1692.SH LOG TIMESTAMP TIMEZONE
1693
1694When \fBsmartd\fP makes log entries, these are time-stamped. The time
1695stamps are in the computer's local time zone, which is generally set
1696using either the environment variable \'\fBTZ\fP\' or using a
1697time-zone file such as \fB/etc/localtime\fP. You may wish to change
1698the timezone while \fBsmartd\fP is running (for example, if you carry
1699a laptop to a new time-zone and don't reboot it). Due to a bug in the
1700\fBtzset(3)\fP function of many unix standard C libraries, the
1701time-zone stamps of \fBsmartd\fP might not change. For some systems,
1702\fBsmartd\fP will work around this problem \fIif\fP the time-zone is
1703set using \fB/etc/localtime\fP. The work-around \fIfails\fP if the
1704time-zone is set using the \'\fBTZ\fP\' variable (or a file that it
1705points to).
1706
1707
1708.SH RETURN VALUES
1709The return value (exit status) of
1710\fBsmartd\fP
1711can have the following values:
1712.TP
1713.B 0:
1714Daemon startup successful, or \fBsmartd\fP was killed by a SIGTERM (or in debug mode, a SIGQUIT).
1715.TP
1716.B 1:
1717Commandline did not parse.
1718.TP
1719.B 2:
1720There was a syntax error in the config file.
1721.TP
1722.B 3:
1723Forking the daemon failed.
1724.TP
1725.B 4:
1726Couldn\'t create PID file.
1727.TP
1728.B 5:
1729Config file does not exist (only returned in conjunction with the \'-c\' option).
1730.TP
1731.B 6:
1732Config file exists, but cannot be read.
1733.TP
1734.B 8:
1735\fBsmartd\fP
1736ran out of memory during startup.
1737.TP
1738.B 9:
1739A compile time constant of\fB smartd\fP was too small. This can be caused by an
1740excessive number of disks, or by lines in \fB /usr/local/etc/smartd.conf\fP that are too long.
1741Please report this problem to \fB smartmontools-support@lists.sourceforge.net\fP.
1742.TP
1743.B 10
1744An inconsistency was found in \fBsmartd\fP\'s internal data
1745structures. This should never happen. It must be due to either a
1746coding or compiler bug. \fIPlease\fP report such failures to
1747smartmontools-support@lists.sourceforge.net.
1748.TP
1749.B 16:
1750A device explicitly listed in
1751.B /usr/local/etc/smartd.conf
1752can\'t be monitored.
1753.TP
1754.B 17:
1755\fBsmartd\fP
1756didn\'t find any devices to monitor.
1757.TP
1758.B 254:
1759When in daemon mode,
1760\fBsmartd\fP
1761received a SIGINT or SIGQUIT. (Note that in debug mode, SIGINT has
1762the same effect as SIGHUP, and makes \fBsmartd\fP reload its
1763configuration file. SIGQUIT has the same effect as SIGTERM and causes
1764\fBsmartd\fP to exit with zero exit status.
1765.TP
1766.B 132 and above
1767\fBsmartd\fP
1768was killed by a signal that is not explicitly listed above. The exit
1769status is then 128 plus the signal number. For example if
1770\fBsmartd\fP
1771is killed by SIGKILL (signal 9) then the exit status is 137.
1772
1773.PP
1774.SH AUTHOR
1775\fBBruce Allen\fP smartmontools-support@lists.sourceforge.net
1776.fi
1777University of Wisconsin \- Milwaukee Physics Department
1778
1779.PP
1780.SH CONTRIBUTORS
1781The following have made large contributions to smartmontools:
1782.nf
1783\fBCasper Dik\fP (Solaris SCSI interface)
1784\fBChristian Franke\fP (Windows interface and Cygwin package)
1785\fBDouglas Gilbert\fP (SCSI subsystem)
1786\fBGuido Guenther\fP (Autoconf/Automake packaging)
1787\fBGeoffrey Keating\fP (Darwin ATA interface)
1788\fBEduard Martinescu\fP (FreeBSD interface)
1789\fBFr\*'ed\*'eric L. W. Meunier\fP (Web site and Mailing list)
1790\fBKeiji Sawada\fP (Solaris ATA interface)
1791\fBSergey Svishchev\fP (NetBSD interface)
1792\fBDavid Snyder and Sergey Svishchev\fP (OpenBSD interface)
1793\fBPhil Williams\fP (User interface and drive database)
1794.fi
1795Many other individuals have made smaller contributions and corrections.
1796
1797.PP
1798.SH CREDITS
1799.fi
1800This code was derived from the smartsuite package, written by Michael
1801Cornwell, and from the previous ucsc smartsuite package. It extends
1802these to cover ATA-5 disks. This code was originally developed as a
1803Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
1804(now part of the Storage Systems Research Center), Jack Baskin School
1805of Engineering, University of California, Santa
1806Cruz. \fBhttp://ssrc.soe.ucsc.edu/\fP .
1807.SH
1808HOME PAGE FOR SMARTMONTOOLS:
1809.fi
1810Please see the following web site for updates, further documentation, bug
1811reports and patches: \fBhttp://smartmontools.sourceforge.net/\fP
1812
1813.SH SEE ALSO:
1814\fBsmartd.conf\fP(5), \fBsmartctl\fP(8), \fBsyslogd\fP(8),
1815\fBsyslog.conf\fP(5), \fBbadblocks\fP(8), \fBide\-smart\fP(8), \fBregex\fP(7).
1816
1817.SH
1818REFERENCES FOR SMART
1819.fi
1820An introductory article about smartmontools is \fIMonitoring Hard
1821Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
1822pages 74-77. This is \fBhttp://www.linuxjournal.com/article.php?sid=6983\fP
1823online.
1824
1825If you would like to understand better how SMART works, and what it
1826does, a good place to start is with Sections 4.8 and 6.54 of the first
1827volume of the \'AT Attachment with Packet Interface-7\' (ATA/ATAPI-7)
1828specification. This documents the SMART functionality which the
1829\fBsmartmontools\fP utilities provide access to. You can find
1830Revision 4b of this document at
1831\fBhttp://www.t13.org/docs2004/d1532v1r4b-ATA-ATAPI-7.pdf\fP .
1832Earlier and later versions of this Specification are available from
1833the T13 web site \fBhttp://www.t13.org/\fP .
1834
1835.fi
1836The functioning of SMART was originally defined by the SFF-8035i
1837revision 2 and the SFF-8055i revision 1.4 specifications. These are
1838publications of the Small Form Factors (SFF) Committee. Links to
1839these documents may be found in the References section of the
1840smartmontools home page at \fBhttp://smartmontools.sourceforge.net/#references\fP .
1841
1842.SH
1843CVS ID OF THIS PAGE:
1844$Id: smartd.8.in,v 1.100 2006/04/12 13:55:44 ballen4705 Exp $