]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame_incremental - smartd.8.in
apply wrap-and-sort
[mirror_smartmontools-debian.git] / smartd.8.in
... / ...
CommitLineData
1.ig
2Copyright (C) 2002-10 Bruce Allen
3Copyright (C) 2004-15 Christian Franke
4
5$Id: smartd.8.in 4102 2015-06-01 19:25:47Z chrfranke $
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12You should have received a copy of the GNU General Public License
13(for example COPYING); If not, see <http://www.gnu.org/licenses/>.
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..
21.TH SMARTD 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
22.SH NAME
23\fBsmartd\fP \- SMART Disk Monitoring Daemon
24
25.SH SYNOPSIS
26.B smartd [options]
27
28.SH DESCRIPTION
29.\" %IF NOT OS ALL
30.\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
31.\"! It does not contain info specific to other platforms.]
32.\"! .PP
33.\" %ENDIF NOT OS ALL
34\fBsmartd\fP is a daemon that monitors the Self-Monitoring, Analysis and
35Reporting Technology (SMART) system built into most ATA/SATA and SCSI/SAS
36hard drives and solid-state drives.
37The purpose of SMART is to monitor the reliability of the hard drive
38and predict drive failures, and to carry out different types of drive
39self-tests.
40This version of \fBsmartd\fP is compatible with
41ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
42(see \fBREFERENCES\fP below).
43
44\fBsmartd\fP will attempt to enable SMART monitoring on ATA devices
45(equivalent to \fBsmartctl -s on\fP) and polls these and SCSI devices
46every 30 minutes (configurable), logging SMART errors and changes of
47SMART Attributes via the SYSLOG interface. The default location for
48these SYSLOG notifications and warnings is system-dependent
49(typically \fB/var/log/messages\fP or \fB/var/log/syslog\fP).
50To change this default location, please see the \fB\'-l\'\fP
51command-line option described below.
52
53In addition to logging to a file, \fBsmartd\fP can also be configured
54to send email warnings if problems are detected. Depending upon the
55type of problem, you may want to run self-tests on the disk, back up
56the disk, replace the disk, or use a manufacturer\'s utility to force
57reallocation of bad or unreadable disk sectors. If disk problems are
58detected, please see the \fBsmartctl\fP manual page and the
59\fBsmartmontools\fP web page/FAQ for further guidance.
60
61If you send a \fBUSR1\fP signal to \fBsmartd\fP it will immediately
62check the status of the disks, and then return to polling the disks
63every 30 minutes. See the \fB\'\-i\'\fP option below for additional
64details.
65
66\fBsmartd\fP can be configured at start-up using the configuration
67file \fB/usr/local/etc/smartd.conf\fP (Windows: \fBEXEDIR/smartd.conf\fP).
68If the configuration file is subsequently modified, \fBsmartd\fP
69can be told to re-read the configuration file by sending it a
70\fBHUP\fP signal, for example with the command:
71.br
72\fBkillall -HUP smartd\fP.
73.br
74.\" %IF OS Windows
75(Windows: See NOTES below.)
76.\" %ENDIF OS Windows
77
78On startup, if \fBsmartd\fP finds a syntax error in the configuration
79file, it will print an error message and then exit. However if
80\fBsmartd\fP is already running, then is told with a \fBHUP\fP signal
81to re-read the configuration file, and then find a syntax error in
82this file, it will print an error message and then continue, ignoring
83the contents of the (faulty) configuration file, as if the \fBHUP\fP
84signal had never been received.
85
86When \fBsmartd\fP is running in debug mode, the \fBINT\fP signal
87(normally generated from a shell with CONTROL-C) is treated in the
88same way as a \fBHUP\fP signal: it makes \fBsmartd\fP reload its
89configuration file. To exit \fBsmartd\fP use CONTROL-\e
90.\" %IF OS Windows
91(Windows: CONTROL-Break).
92.\" %ENDIF OS Windows
93
94On startup, in the absence of the configuration file
95\fB/usr/local/etc/smartd.conf\fP, the \fBsmartd\fP daemon first scans for all
96devices that support SMART. The scanning is done as follows:
97.\" %IF OS Linux
98.IP \fBLINUX:\fP 9
99Examine all entries \fB"/dev/hd[a-t]"\fP for IDE/ATA
100devices, and \fB"/dev/sd[a-z]"\fP, \fB"/dev/sd[a-c][a-z]"\fP
101for ATA/SATA or SCSI/SAS devices.
102Disks behind RAID controllers are not included.
103.\" %ENDIF OS Linux
104.\" %IF OS FreeBSD
105.IP \fBFREEBSD:\fP 9
106Authoritative list of disk devices is obtained from SCSI (CAM) and ATA subsystems.
107Disks behind RAID controllers are not included.
108.\" %ENDIF OS FreeBSD
109.\" %IF OS NetBSD OpenBSD
110.IP \fBNETBSD/OPENBSD:\fP 9
111Authoritative list of disk devices is obtained from sysctl
112\'hw.disknames\'.
113.\" %ENDIF OS NetBSD OpenBSD
114.\" %IF OS Solaris
115.IP \fBSOLARIS:\fP 9
116Examine all entries \fB"/dev/rdsk/*s0"\fP for IDE/ATA and SCSI disk
117devices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices.
118.\" %ENDIF OS Solaris
119.\" %IF OS Darwin
120.IP \fBDARWIN:\fP 9
121The IOService plane is scanned for ATA block storage devices.
122.\" %ENDIF OS Darwin
123.\" %IF OS Windows Cygwin
124.IP \fBWINDOWS\fP: 9
125Examine all entries \fB"/dev/sd[a\-z]"\fP, \fB"/dev/sd[a\-c][a\-z]"\fP
126and \fB"/dev/sdd[a\-x]"\fP ("\\\\.\\PhysicalDrive[0\-127]") for
127IDE/(S)ATA and SCSI disk devices.
128
129If a 3ware 9000 controller is installed, examine all entries
130\fB"/dev/sdX,N"\fP for the first logical drive (\'unit\'
131\fB"/dev/sdX"\fP) and all physical disks (\'ports\' \fB",N"\fP)
132detected behind this controller. Same for a second controller if present.
133
134If directive \'\-d csmi\' or no \'\-d\' directive is specified,
135examine all entries \fB"/dev/csmi[0\-9],N"\fP for drives behind an Intel
136ICHxR controller with RST driver.
137
138Disks behind Areca RAID controllers are not included.
139.\" %ENDIF OS Windows Cygwin
140.PP
141\fBsmartd\fP then monitors
142for \fIall\fP possible SMART errors (corresponding to the \fB\'\-a\'\fP
143Directive in the configuration file; see the \fBsmartd.conf\fP(5) man page).
144
145.SH OPTIONS
146.TP
147.B \-A PREFIX, \-\-attributelog=PREFIX
148Writes \fBsmartd\fP attribute information (normalized and raw
149attribute values) to files \'PREFIX\'\'MODEL\-SERIAL.ata.csv\' or \'PREFIX\'\'VENDOR\-MODEL\-SERIAL.scsi.csv\'. At each
150check cycle attributes are logged as a line of semicolon separated triplets
151of the form "attribute-ID;attribute-norm-value;attribute-raw-value;".
152For SCSI devices error counters and temperature recorded in the form "counter-name;counter-value;"
153Each line is led by a date string of the form "yyyy-mm-dd HH:MM:SS" (in UTC).
154
155.\" %IF ENABLE_ATTRIBUTELOG
156If this option is not specified, attribute information is written to files
157\'/usr/local/var/lib/smartmontools/attrlog.MODEL\-SERIAL.ata.csv\'.
158To disable attribute log files, specify this option with an empty string
159argument: \'-A ""\'.
160.\" %ENDIF ENABLE_ATTRIBUTELOG
161MODEL and SERIAL are build from drive identify information, invalid
162characters are replaced by underline.
163
164If the PREFIX has the form \'/path/dir/\' (e.g. \'/var/lib/smartd/\'), then
165files \'MODEL\-SERIAL.ata.csv\' are created in directory \'/path/dir\'.
166If the PREFIX has the form \'/path/name\' (e.g. \'/var/lib/misc/attrlog\-\'),
167then files 'nameMODEL\-SERIAL.ata.csv' are created in directory '/path/'.
168The path must be absolute, except if debug mode is enabled.
169.TP
170.B \-B [+]FILE, \-\-drivedb=[+]FILE
171[ATA only] Read the drive database from FILE. The new database replaces
172the built in database by default. If \'+\' is specified, then the new entries
173prepend the built in entries.
174Please see the \fBsmartctl\fP(8) man page for further details.
175.TP
176.B \-c FILE, \-\-configfile=FILE
177Read \fBsmartd\fP configuration Directives from FILE, instead of from
178the default location \fB/usr/local/etc/smartd.conf\fP (Windows: \fBEXEDIR/smartd.conf\fP).
179If FILE does \fBnot\fP exist, then \fBsmartd\fP will print an error
180message and exit with nonzero status. Thus, \'\-c /usr/local/etc/smartd.conf\'
181can be used to verify the existence of the default configuration file.
182
183By using \'\-\' for FILE, the configuration is read from standard
184input. This is useful for commands like:
185.nf
186.B echo /dev/sdb \-m user@home \-M test | smartd \-c \- \-q onecheck
187.fi
188to perform quick and simple checks without a configuration file.
189.\" %IF ENABLE_CAPABILITIES
190.TP
191.B \-C, \-\-capabilities
192[Linux only] Use libcap-ng to drop unneeded Linux process \fBcapabilities\fP(7).
193The following capabilities are kept: CAP_SYS_ADMIN, CAP_SYS_RAWIO, CAP_MKNOD.
194
195Warning: Mail notification does not work when used.
196.\" %ENDIF ENABLE_CAPABILITIES
197.TP
198.B \-d, \-\-debug
199Runs \fBsmartd\fP in "debug" mode. In this mode, it displays status
200information to STDOUT rather than logging it to SYSLOG and does not
201\fBfork\fP(2) into the background and detach from the controlling
202terminal. In this mode, \fBsmartd\fP also prints more verbose
203information about what it is doing than when operating in "daemon"
204mode. In this mode, the \fBINT\fP signal (normally generated from a
205terminal with CONTROL-C) makes \fBsmartd\fP reload its configuration
206file. Please use CONTROL-\e to exit
207.\" %IF OS Windows
208(Windows: CONTROL-Break).
209
210[Windows only] The "debug" mode can be toggled by the command
211\fBsmartd sigusr2\fP. A new console for debug output is opened when
212debug mode is enabled.
213.\" %ENDIF OS Windows
214.TP
215.B \-D, \-\-showdirectives
216Prints a list (to STDOUT) of all the possible Directives which may
217appear in the configuration file /usr/local/etc/smartd.conf, and then exits.
218These Directives are described in the \fBsmartd.conf\fP(5) man page.
219They may appear in the configuration file following the device name.
220.TP
221.B \-h, \-\-help, \-\-usage
222Prints usage message to STDOUT and exits.
223.TP
224.B \-i N, \-\-interval=N
225Sets the interval between disk checks to \fIN\fP seconds, where
226\fIN\fP is a decimal integer. The minimum allowed value is ten and
227the maximum is the largest positive integer that can be represented on
228your system (often 2^31-1). The default is 1800 seconds.
229
230Note that the superuser can make \fBsmartd\fP check the status of the
231disks at any time by sending it the \fBSIGUSR1\fP signal, for example
232with the command:
233.nf
234.B kill -SIGUSR1 <pid>
235.fi
236where \fB<pid>\fP is the process id number of \fBsmartd\fP. One may
237also use:
238.nf
239.B killall -USR1 smartd
240.fi
241for the same purpose.
242.br
243.\" %IF OS Windows
244(Windows: See NOTES below.)
245.\" %ENDIF OS Windows
246.TP
247.B \-l FACILITY, \-\-logfacility=FACILITY
248Uses syslog facility FACILITY to log the messages from \fBsmartd\fP.
249Here FACILITY is one of \fIlocal0\fP, \fIlocal1\fP, ..., \fIlocal7\fP,
250or \fIdaemon\fP [default]. If this command-line option is not used,
251then by default messages from \fBsmartd\fP are logged to the facility
252\fIdaemon\fP.
253
254If you would like to have \fBsmartd\fP messages logged somewhere other
255than the default location, include (for example) \'\-l local3\' in its
256start up argument list.
257Tell the syslog daemon to log all messages from facility \fBlocal3\fP
258to (for example) \'/var/log/smartd.log\'.
259
260For more detailed information, please refer to the man pages for
261the local syslog daemon, typically \fBsyslogd\fP(8), \fBsyslog-ng\fP(8)
262or \fBrsyslogd\fP(8).
263.\" %IF OS Cygwin
264
265Cygwin: If no \fBsyslogd\fP is running, the \'\-l\' option has no effect.
266In this case, all \fBsyslog\fP messages are written to Windows event log.
267.\" %ENDIF OS Cygwin
268.\" %IF OS Windows
269
270Windows: Some \fBsyslog\fP functionality is implemented
271internally in \fBsmartd\fP as follows: If no \'\-l\' option
272(or \'\-l daemon\') is specified, messages are written to Windows
273event log or to file \fB./smartd.log\fP if event log is not available
274(access denied). By specifying other values of FACILITY,
275log output is redirected as follows:
276\'\-l local0\' to file \fB./smartd.log\fP,
277\'\-l local1\' to standard output (redirect with \'>\' to any file),
278\'\-l local2\' to standard error,
279\'\-l local[3-7]\': to file \fB./smartd[1-5].log\fP.
280.\" %ENDIF OS Windows
281.TP
282.B \-n, \-\-no\-fork
283Do not fork into background; this is useful when executed from modern
284init methods like initng, minit, supervise or systemd.
285.\" %IF OS Cygwin
286
287On Cygwin, this allows running \fBsmartd\fP as service via cygrunsrv,
288see NOTES below.
289.\" %ENDIF OS Cygwin
290.\" %IF OS Windows
291
292On Windows, this option is not available, use \'\-\-service\' instead.
293.\" %ENDIF OS Windows
294.TP
295.B \-p NAME, \-\-pidfile=NAME
296Writes pidfile \fINAME\fP containing the \fBsmartd\fP Process ID
297number (PID). To avoid symlink attacks make sure the directory to
298which pidfile is written is only writable for root. Without this
299option, or if the \-\-debug option is given, no PID file is written on
300startup. If \fBsmartd\fP is killed with a maskable signal then the
301pidfile is removed.
302.TP
303.B \-q WHEN, \-\-quit=WHEN
304Specifies when, if ever, \fBsmartd\fP should exit. The valid
305arguments are to this option are:
306
307.I nodev
308\- Exit if there are no devices to monitor, or if any errors are found
309at startup in the configuration file. This is the default.
310
311.I errors
312\- Exit if there are no devices to monitor, or if any errors are found
313in the configuration file /usr/local/etc/smartd.conf at startup or whenever it
314is reloaded.
315
316.I nodevstartup
317\- Exit if there are no devices to monitor at startup. But continue
318to run if no devices are found whenever the configuration file is
319reloaded.
320
321.I never
322\- Only exit if a fatal error occurs (no remaining system memory,
323invalid command line arguments). In this mode, even if there are no
324devices to monitor, or if the configuration file
325\fB/usr/local/etc/smartd.conf\fP has errors, \fBsmartd\fP will continue to run,
326waiting to load a configuration file listing valid devices.
327
328.I onecheck
329\- Start \fBsmartd\fP in debug mode, then register devices, then check
330device\'s SMART status once, and then exit with zero exit status if all
331of these steps worked correctly.
332
333This last option is intended for \'distribution-writers\' who want to
334create automated scripts to determine whether or not to automatically
335start up \fBsmartd\fP after installing smartmontools. After starting
336\fBsmartd\fP with this command-line option, the distribution\'s install
337scripts should wait a reasonable length of time (say ten seconds). If
338\fBsmartd\fP has not exited with zero status by that time, the script
339should send \fBsmartd\fP a SIGTERM or SIGKILL and assume that
340\fBsmartd\fP will not operate correctly on the host. Conversely, if
341\fBsmartd\fP exits with zero status, then it is safe to run
342\fBsmartd\fP in normal daemon mode. If \fBsmartd\fP is unable to
343monitor any devices or encounters other problems then it will return
344with non-zero exit status.
345
346.I showtests
347\- Start \fBsmartd\fP in debug mode, then register devices, then write
348a list of future scheduled self tests to stdout, and then exit with zero
349exit status if all of these steps worked correctly.
350Device's SMART status is not checked.
351
352This option is intended to test whether the '\-s REGEX' directives in
353smartd.conf will have the desired effect. The output lists the next test
354schedules, limited to 5 tests per type and device. This is followed by a
355summary of all tests of each device within the next 90 days.
356.TP
357.B \-r TYPE, \-\-report=TYPE
358Intended primarily to help
359.B smartmontools
360developers understand the behavior of
361.B smartmontools
362on non-conforming or poorly-conforming hardware. This option reports
363details of
364\fBsmartd\fP
365transactions with the device. The option can be used multiple times.
366When used just once, it shows a record of the ioctl() transactions
367with the device. When used more than once, the detail of these ioctl()
368transactions are reported in greater detail. The valid arguments to
369this option are:
370
371.I ioctl
372\- report all ioctl() transactions.
373
374.I ataioctl
375\- report only ioctl() transactions with ATA devices.
376
377.I scsiioctl
378\- report only ioctl() transactions with SCSI devices.
379
380Any argument may include a positive integer to specify the level of
381detail that should be reported. The argument should be followed by a
382comma then the integer with no spaces. For example, \fIataioctl,2\fP
383The default level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are
384equivalent.
385.TP
386.B \-s PREFIX, \-\-savestates=PREFIX
387Reads/writes \fBsmartd\fP state information from/to files
388\'PREFIX\'\'MODEL\-SERIAL.ata.state\' or \'PREFIX\'\'VENDOR\-MODEL\-SERIAL.scsi.state\'.
389This preserves SMART attributes, drive min and max temperatures (\-W directive),
390info about last sent warning email
391(\-m directive), and the time of next check of the self-test REGEXP
392(\-s directive) across boot cycles.
393
394.\" %IF ENABLE_SAVESTATES
395If this option is not specified, state information is maintained in files
396\'/usr/local/var/lib/smartmontools/smartd.MODEL\-SERIAL.ata.state\' for ATA devices and
397\'/usr/local/var/lib/smartmontools/smartd.VENDOR\-MODEL\-SERIAL.scsi.state\' for SCSI devices.
398To disable state files, specify this option with an empty string
399argument: \'\-s ""\'.
400.\" %ENDIF ENABLE_SAVESTATES
401MODEL and SERIAL are build from drive identify information, invalid
402characters are replaced by underline.
403
404If the PREFIX has the form \'/path/dir/\' (e.g. \'/var/lib/smartd/\'), then
405files \'MODEL\-SERIAL.ata.state\' are created in directory \'/path/dir\'.
406If the PREFIX has the form \'/path/name\' (e.g. \'/var/lib/misc/smartd\-\'),
407then files 'nameMODEL\-SERIAL.ata.state' are created in directory '/path/'.
408The path must be absolute, except if debug mode is enabled.
409
410The state information files are read on smartd startup. The files are
411always (re)written after reading the configuration file, before rereading
412the configuration file (SIGHUP), before smartd shutdown, and after a check
413forced by SIGUSR1. After a normal check cycle, a file is only rewritten if
414an important change (which usually results in a SYSLOG output) occurred.
415.TP
416.B \-w PATH, \-\-warnexec=PATH
417Run the executable PATH instead of the default script when smartd
418needs to send warning messages. PATH must point to an executable binary
419file or script.
420The default script is
421.\" %IF NOT OS Windows
422\fB/usr/local/etc/smartd_warning.sh\fP.
423.\" %ENDIF NOT OS Windows
424.\" %IF OS ALL
425(Windows: EXEDIR/smartd_warning.cmd)
426.\" %ENDIF OS ALL
427.\" %IF OS Windows
428.\"! \fBEXEDIR/smartd_warning.cmd\fP.
429.\" %ENDIF OS Windows
430.\" %IF OS Windows
431.TP
432.B \-\-service
433[Windows only] Enables \fBsmartd\fP to run as a Windows service.
434The option must be specified in the service command line as the first
435argument. It should not be used from console.
436See NOTES below for details.
437.\" %ENDIF OS Windows
438.TP
439.B \-V, \-\-version, \-\-license, \-\-copyright
440Prints version, copyright, license, home page and SVN revision
441information for your copy of \fBsmartd\fP to STDOUT and then exits.
442Please include this information if you are reporting bugs or problems.
443
444.SH EXAMPLES
445.B smartd
446.br
447Runs the daemon in forked mode. This is the normal way to run
448\fBsmartd\fP.
449Entries are logged to SYSLOG.
450
451.B smartd -d -i 30
452.br
453Run in foreground (debug) mode, checking the disk status
454every 30 seconds.
455
456.B smartd -q onecheck
457.br
458Registers devices, and checks the status of the devices exactly
459once. The exit status (the shell
460.B $?
461variable) will be zero if all went well, and nonzero if no devices
462were detected or some other problem was encountered.
463
464.\" %IF ENABLE_INITSCRIPT
465Note that \fBsmartmontools\fP provides a start-up script in
466\fB/usr/local/etc/rc.d/init.d/smartd\fP which is responsible for starting and
467stopping the daemon via the normal init interface. Using this script,
468you can start \fBsmartd\fP by giving the command:
469.nf
470.B /usr/local/etc/rc.d/init.d/smartd start
471.fi
472and stop it by using the command:
473.nf
474.B /usr/local/etc/rc.d/init.d/smartd stop
475.fi
476
477.\" %ENDIF ENABLE_INITSCRIPT
478.SH CONFIGURATION
479The syntax of the \fBsmartd.conf\fP(5) file is discussed separately.
480
481.SH NOTES
482\fBsmartd\fP
483will make log entries at loglevel
484.B LOG_INFO
485if the Normalized SMART Attribute values have changed, as reported using the
486.B \'\-t\', \'\-p\',
487or
488.B \'\-u\'
489Directives. For example:
490.nf
491.B \'Device: /dev/sda, SMART Attribute: 194 Temperature_Celsius changed from 94 to 93\'
492.fi
493Note that in this message, the value given is the \'Normalized\' not the \'Raw\'
494Attribute value (the disk temperature in this case is about 22
495Celsius). The
496.B \'-R\'
497and
498.B \'-r\'
499Directives modify this behavior, so that the information is printed
500with the Raw values as well, for example:
501.nf
502.B \'Device: /dev/sda, SMART Attribute: 194 Temperature_Celsius changed from 94 [Raw 22] to 93 [Raw 23]\'
503.fi
504Here the Raw values are the actual disk temperatures in Celsius. The
505way in which the Raw values are printed, and the names under which the
506Attributes are reported, is governed by the various
507.B \'-v Num,Description\'
508Directives described previously.
509
510Please see the
511.B smartctl
512manual page for further explanation of the differences between
513Normalized and Raw Attribute values.
514
515\fBsmartd\fP
516will make log entries at loglevel
517.B LOG_CRIT
518if a SMART Attribute has failed, for example:
519.nf
520.B \'Device: /dev/sdc, Failed SMART Attribute: 5 Reallocated_Sector_Ct\'
521.fi
522 This loglevel is used for reporting enabled by the
523.B \'\-H\', \-f\', \'\-l\ selftest\',
524and
525.B \'\-l\ error\'
526Directives. Entries reporting failure of SMART Prefailure Attributes
527should not be ignored: they mean that the disk is failing. Use the
528.B smartctl
529utility to investigate.
530
531.\" %IF OS Solaris
532Under Solaris with the default \fB/etc/syslog.conf\fP configuration,
533messages below loglevel \fBLOG_NOTICE\fP will \fBnot\fP be recorded.
534Hence all \fBsmartd\fP messages with loglevel \fBLOG_INFO\fP will be
535lost. If you want to use the existing daemon facility to log all
536messages from \fBsmartd\fP, you should change \fB/etc/syslog.conf\fP
537from:
538.nf
539 ...;daemon.notice;... /var/adm/messages
540.fi
541to read:
542.nf
543 ...;daemon.info;... /var/adm/messages
544.fi
545Alternatively, you can use a local facility to log messages: please
546see the \fBsmartd\fP '\-l' command-line option described above.
547
548.\" %ENDIF OS Solaris
549.\" %IF OS Cygwin
550The Cygwin Version of \fBsmartd\fP can be run as a service via the
551cygrunsrv tool.
552.\" %IF ENABLE_INITSCRIPT
553The start-up script provides Cygwin-specific commands to install and
554remove the service:
555.nf
556.B /usr/local/etc/rc.d/init.d/smartd install [options]
557.B /usr/local/etc/rc.d/init.d/smartd remove
558.fi
559The service can be started and stopped by the start-up script as usual
560(see \fBEXAMPLES\fP above).
561.\" %ENDIF ENABLE_INITSCRIPT
562
563.\" %ENDIF OS Cygwin
564.\" %IF OS Windows
565On Windows, the log messages are written to the event log or to a file.
566See documentation of the '\-l FACILITY' option above for details.
567
568On Windows, the following built-in commands can be used to control
569\fBsmartd\fP, if running as a daemon:
570
571\'\fBsmartd status\fP\' \- check status
572
573\'\fBsmartd stop\fP\' \- stop smartd
574
575\'\fBsmartd reload\fP\' \- reread config file
576
577\'\fBsmartd restart\fP\' \- restart smartd
578
579\'\fBsmartd sigusr1\fP\' \- check disks now
580
581\'\fBsmartd sigusr2\fP\' \- toggle debug mode
582
583The Windows Version of \fBsmartd\fP has buildin support for services:
584
585\'\fBsmartd install [options]\fP\' installs a service
586named "smartd" (display name "SmartD Service") using the command line
587\'/INSTALLPATH/smartd.exe \-\-service [options]\'.
588This also installs smartd.exe as a event message file for the Windows
589event viewer.
590
591\'\fBsmartd remove\fP\' can later be used to remove the service and
592event message entries from the registry.
593
594Upon startup, the smartd service changes the working directory
595to its own installation path. If smartd.conf and blat.exe are stored
596in this directory, no \'-c\' option and \'-M exec\' directive is needed.
597
598The debug mode (\'\-d\', \'\-q onecheck\') does not work if smartd is
599running as service.
600
601The service can be controlled as usual with Windows commands \'net\'
602or \'sc\' (\'\fBnet start smartd\fP\', \'\fBnet stop smartd\fP\').
603
604Pausing the service (\'\fBnet pause smartd\fP\') sets the interval between
605disk checks (\'\-i N\') to infinite.
606
607Continuing the paused service (\'\fBnet continue smartd\fP\') resets the
608interval and rereads the configuration file immediately (like \fBSIGHUP\fP):
609
610Continuing a still running service (\'\fBnet continue smartd\fP\' without
611preceding \'\fBnet pause smartd\fP\') does not reread configuration but
612checks disks immediately (like \fBSIGUSR1\fP).
613
614.\" %ENDIF OS Windows
615.SH LOG TIMESTAMP TIMEZONE
616When \fBsmartd\fP makes log entries, these are time-stamped. The time
617stamps are in the computer's local time zone, which is generally set
618using either the environment variable \'\fBTZ\fP\' or using a
619time-zone file such as \fB/etc/localtime\fP. You may wish to change
620the timezone while \fBsmartd\fP is running (for example, if you carry
621a laptop to a new time-zone and don't reboot it). Due to a bug in the
622\fBtzset\fP(3) function of many unix standard C libraries, the
623time-zone stamps of \fBsmartd\fP might not change. For some systems,
624\fBsmartd\fP will work around this problem \fIif\fP the time-zone is
625set using \fB/etc/localtime\fP. The work-around \fIfails\fP if the
626time-zone is set using the \'\fBTZ\fP\' variable (or a file that it
627points to).
628
629.SH EXIT STATUS
630The exit status (return value) of \fBsmartd\fP can have the following values:
631.TP
632.B 0:
633Daemon startup successful, or \fBsmartd\fP was killed by a SIGTERM (or in debug mode, a SIGQUIT).
634.TP
635.B 1:
636Commandline did not parse.
637.TP
638.B 2:
639There was a syntax error in the config file.
640.TP
641.B 3:
642Forking the daemon failed.
643.TP
644.B 4:
645Couldn\'t create PID file.
646.TP
647.B 5:
648Config file does not exist (only returned in conjunction with the \'\-c\' option).
649.TP
650.B 6:
651Config file exists, but cannot be read.
652.TP
653.B 8:
654\fBsmartd\fP
655ran out of memory during startup.
656.TP
657.B 10:
658An inconsistency was found in \fBsmartd\fP\'s internal data
659structures. This should never happen. It must be due to either a
660coding or compiler bug. \fIPlease\fP report such failures to
661smartmontools developers, see REPORTING BUGS below.
662.TP
663.B 16:
664A device explicitly listed in
665.B /usr/local/etc/smartd.conf
666can\'t be monitored.
667.TP
668.B 17:
669\fBsmartd\fP
670didn\'t find any devices to monitor.
671.TP
672.B 254:
673When in daemon mode,
674\fBsmartd\fP
675received a SIGINT or SIGQUIT. (Note that in debug mode, SIGINT has
676the same effect as SIGHUP, and makes \fBsmartd\fP reload its
677configuration file. SIGQUIT has the same effect as SIGTERM and causes
678\fBsmartd\fP to exit with zero exit status.
679.TP
680.B 132 and above
681\fBsmartd\fP
682was killed by a signal that is not explicitly listed above. The exit
683status is then 128 plus the signal number. For example if
684\fBsmartd\fP
685is killed by SIGKILL (signal 9) then the exit status is 137.
686
687.\" %IF NOT OS Windows
688.SH FILES
689.TP
690.B /usr/local/sbin/smartd
691full path of this executable.
692.TP
693.B /usr/local/etc/smartd.conf
694configuration file (see \fBsmartd.conf\fP(5) man page).
695.TP
696.B /usr/local/etc/smartd_warning.sh
697script run on warnings (see \'\-M exec\' directive on
698\fBsmartd.conf\fP(5) man page).
699.\" %IF ENABLE_SMARTDPLUGINDIR
700.TP
701.B /usr/local/etc/smartd_warning.d/
702plugin directory for smartd warning script (see \'\-m\' directive on
703\fBsmartd.conf\fP(5) man page).
704.\" %ENDIF ENABLE_SMARTDPLUGINDIR
705.\" %IF ENABLE_DRIVEDB
706.TP
707.B /usr/local/share/smartmontools/drivedb.h
708drive database (see \'\-B\' option).
709.\" %ENDIF ENABLE_DRIVEDB
710.TP
711.B /usr/local/etc/smart_drivedb.h
712optional local drive database (see \'\-B\' option).
713
714.\" %ENDIF NOT OS Windows
715.SH AUTHORS
716\fBBruce Allen\fP (project initiator),
717.br
718\fBChristian Franke\fP (project manager, Windows port and all sort of things),
719.br
720\fBDouglas Gilbert\fP (SCSI subsystem),
721.br
722\fBVolker Kuhlmann\fP (moderator of support and database mailing list),
723.br
724\fBGabriele Pohl\fP (wiki & development team support),
725.br
726\fBAlex Samorukov\fP (FreeBSD port and more, new Trac wiki).
727
728Many other individuals have made contributions and corrections,
729see AUTHORS, ChangeLog and repository files.
730
731The first smartmontools code was derived from the smartsuite package,
732written by Michael Cornwell and Andre Hedrick.
733
734.SH REPORTING BUGS
735To submit a bug report, create a ticket in smartmontools wiki:
736.br
737<\fBhttp://www.smartmontools.org/\fP>.
738.br
739Alternatively send the info to the smartmontools support mailing list:
740.br
741<\fBhttps://lists.sourceforge.net/lists/listinfo/smartmontools-support\fB>.
742
743.SH SEE ALSO
744\fBsmartd.conf\fP(5), \fBsmartctl\fP(8), \fBupdate-smart-drivedb\fP(8).
745
746.SH REFERENCES
747Please see the following web site for more info:
748\fBhttp://smartmontools.sourceforge.net/\fP
749
750An introductory article about smartmontools is \fIMonitoring Hard
751Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
752pages 74-77. This is \fBhttp://www.linuxjournal.com/article/6983\fP
753online.
754
755If you would like to understand better how SMART works, and what it
756does, a good place to start is with Sections 4.8 and 6.54 of the first
757volume of the \'AT Attachment with Packet Interface-7\' (ATA/ATAPI-7)
758specification Revision 4b. This documents the SMART functionality which the
759\fBsmartmontools\fP utilities provide access to.
760
761The functioning of SMART was originally defined by the SFF-8035i
762revision 2 and the SFF-8055i revision 1.4 specifications. These are
763publications of the Small Form Factors (SFF) Committee.
764
765Links to these and other documents may be found on the Links page of the
766\fBsmartmontools\fP Wiki at \fBhttp://www.smartmontools.org/wiki/Links\fP .
767
768.SH PACKAGE VERSION
769CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
770.br
771$Id: smartd.8.in 4102 2015-06-01 19:25:47Z chrfranke $