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