Annotation of embedaddon/smartmontools/smartd.8.in, revision 1.1.1.3

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>