⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smartd.8.in

📁 硬盘各项性能的测试,如温度容量版本健康度型号
💻 IN
📖 第 1 页 / 共 5 页
字号:
.igCopyright (C) 2002-8 Bruce Allen <smartmontools-support@lists.sourceforge.net> $Id: smartd.8.in,v 1.121 2008/03/04 22:09:47 ballen4705 Exp $This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version. You should have received a copy of the GNU General Public License (forexample COPYING); if not, write to the Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA. This code was originally developed as a Senior Thesis by MichaelCornwell at the Concurrent Systems Laboratory (now part of the StorageSystems Research Center), Jack Baskin School of Engineering,University of California, Santa Cruz. http://ssrc.soe.ucsc.edu/...TH SMARTD 8 CURRENT_CVS_DATE CURRENT_CVS_VERSION CURRENT_CVS_DATE.SH NAME\fBsmartd\fP \- SMART Disk Monitoring Daemon.SH SYNOPSIS.B smartd [options].SH FULL PATH.B /usr/local/sbin/smartd.SH PACKAGE VERSIONCURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME.SH DESCRIPTION\fBsmartd\fP is a daemon that monitors the Self-Monitoring, Analysisand Reporting Technology (SMART) system built into many ATA-3 andlater ATA, IDE and SCSI-3 hard drives. The purpose of SMART is tomonitor the reliability of the hard drive and predict drive failures,and to carry out different types of drive self-tests.  This version of\fBsmartd\fP is compatible with ATA/ATAPI-7 and earlier standards (see\fBREFERENCES\fP below).\fBsmartd\fP will attempt to enable SMART monitoring on ATA devices(equivalent to \fBsmartctl -s on\fP) and polls these and SCSI devicesevery 30 minutes (configurable), logging SMART errors and changes ofSMART Attributes via the SYSLOG interface.  The default location forthese SYSLOG notifications and warnings is \fB/var/log/messages\fP.To change this default location, please see the \fB\'-l\'\fPcommand-line option described below.In addition to logging to a file, \fBsmartd\fP can also be configuredto send email warnings if problems are detected.  Depending upon thetype of problem, you may want to run self\-tests on the disk, back upthe disk, replace the disk, or use a manufacturer\'s utility to forcereallocation of bad or unreadable disk sectors.  If disk problems aredetected, please see the \fBsmartctl\fP manual page and the\fBsmartmontools\fP web page/FAQ for further guidance.If you send a \fBUSR1\fP signal to \fBsmartd\fP it will immediatelycheck the status of the disks, and then return to polling the disksevery 30 minutes. See the \fB\'\-i\'\fP option below for additionaldetails.\fBsmartd\fP can be configured at start-up using the configurationfile \fB/usr/local/etc/smartd.conf\fP (Windows: \fB./smartd.conf\fP).If the configuration file is subsequently modified, \fBsmartd\fPcan be told to re-read the configuration file by sending it a\fBHUP\fP signal, for example with the command:.fi\fBkillall -HUP smartd\fP..fi(Windows: See NOTES below.)On startup, if \fBsmartd\fP finds a syntax error in the configurationfile, it will print an error message and then exit. However if\fBsmartd\fP is already running, then is told with a \fBHUP\fP signalto re-read the configuration file, and then find a syntax error inthis file, it will print an error message and then continue, ignoringthe contents of the (faulty) configuration file, as if the \fBHUP\fPsignal had never been received.When \fBsmartd\fP is running in debug mode, the \fBINT\fP signal(normally generated from a shell with CONTROL\-C) is treated in thesame way as a \fBHUP\fP signal: it makes \fBsmartd\fP reload itsconfiguration file. To exit \fBsmartd\fP use CONTROL-\e(Cygwin: 2x CONTROL\-C, Windows: CONTROL\-Break).On startup, in the absence of the configuration file\fB/usr/local/etc/smartd.conf\fP, the \fBsmartd\fP daemon first scans for alldevices that support SMART.  The scanning is done as follows:.IP \fBLINUX:\fP 9Examine all entries \fB"/dev/hd[a-t]"\fP for IDE/ATAdevices, and \fB"/dev/sd[a-z]"\fP for SCSI devices..IP \fBFREEBSD:\fP 9Examine all entries \fB"/dev/ad[0-9]+"\fP for IDE/ATAdevices and \fB"/dev/da[0-9]+"\fP for SCSI devices..IP \fBNETBSD/OPENBSD:\fP 9Authoritative list of disk devices is obtained from sysctl \'hw.disknames\'..IP \fBSOLARIS:\fP 9Examine all entries \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI diskdevices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices..IP \fBDARWIN:\fP 9The IOService plane is scanned for ATA block storage devices..IP \fBWINDOWS\ 9x/ME\fP: 9Examine all entries \fB"/dev/hd[a-d]"\fP (bitmaskfrom "\\\\.\\SMARTVSD") for IDE/ATA devices.Examine all entries \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices on ASPI adapter 0\-9, ID 0\-15..IP \fBWINDOWS\ NT4/2000/XP/2003/Vista\fP: 9Examine all entries \fB"/dev/sd[a-j]"\fP ("\\\\.\\PhysicalDrive[0-9]")for IDE/(S)ATA and SCSI disk devices If a 3ware 9000 controller is installed, examine all entries\fB"/dev/sdX,N"\fP for the first logical drive (\'unit\'\fB"/dev/sdX"\fP) and all physical disks (\'ports\' \fB",N"\fP)detected behind this controller. Same for a second controller if present..IP \fBCYGWIN\fP: 9See "WINDOWS NT4/2000/XP/2003/Vista" above..IP \fBOS/2,eComStation\fP: 9Use the form \fB"/dev/hd[a\-z]"\fP for IDE/ATA devices..PP\fBsmartd\fP then monitorsfor \fIall\fP possible SMART errors (corresponding to the \fB\'\-a\'\fPDirective in the configuration file; see \fBCONFIGURATION FILE\fPbelow). .SH OPTIONSLong options are not supported on all systems.  Use \fB\'smartd\-h\'\fP to see the available options..TP.B \-c FILE, \-\-configfile=FILERead \fBsmartd\fP configuration Directives from FILE, instead of fromthe default location \fB/usr/local/etc/smartd.conf\fP (Windows: \fB./smartd.conf\fP).If FILE does \fBnot\fP exist, then \fBsmartd\fP will print an errormessage and exit with nonzero status.  Thus, \'\-c /usr/local/etc/smartd.conf\'can be used to verify the existence of the default configuration file.By using \'\-\' for FILE, the configuration is read from standardinput. This is useful for commands like:.nf.B echo /dev/hdb \-m user@home \-M test | smartd \-c \- \-q onecheck.fito perform quick and simple checks without a configuration file..TP.B \-d, \-\-debugRuns \fBsmartd\fP in "debug" mode. In this mode, it displays statusinformation to STDOUT rather than logging it to SYSLOG and does not\fBfork(2)\fP into the background and detach from the controllingterminal.  In this mode, \fBsmartd\fP also prints more verboseinformation about what it is doing than when operating in "daemon"mode. In this mode, the \fBQUIT\fP signal (normally generated from aterminal with CONTROL\-C) makes \fBsmartd\fP reload its configurationfile.  Please use CONTROL-\e to exit(Cygwin: 2x CONTROL\-C, Windows: CONTROL\-Break).Windows only: The "debug" mode can be toggled by the command\fBsmartd sigusr2\fP. A new console for debug output is opened whendebug mode is enabled..TP.B \-D, \-\-showdirectivesPrints a list (to STDOUT) of all the possible Directives which mayappear in the configuration file /usr/local/etc/smartd.conf, and then exits.These Directives are also described later in this man page. They mayappear in the configuration file following the device name..TP.B \-h, \-\-help, \-\-usagePrints usage message to STDOUT and exits..TP.B \-i N, \-\-interval=NSets the interval between disk checks to \fIN\fP seconds, where\fIN\fP is a decimal integer.  The minimum allowed value is ten andthe maximum is the largest positive integer that can be represented onyour system (often 2^31-1).  The default is 1800 seconds.Note that the superuser can make \fBsmartd\fP check the status of thedisks at any time by sending it the \fBSIGUSR1\fP signal, for examplewith the command:.nf.B kill -SIGUSR1 <pid>.fiwhere \fB<pid>\fP is the process id number of \fBsmartd\fP.  One mayalso use:.nf.B killall -USR1 smartd.fifor the same purpose..fi(Windows: See NOTES below.).TP.B \-l FACILITY, \-\-logfacility=FACILITYUses syslog facility FACILITY to log the messages from \fBsmartd\fP.Here FACILITY is one of \fIlocal0\fP, \fIlocal1\fP, ..., \fIlocal7\fP,or \fIdaemon\fP [default].  If this command-line option is not used,then by default messages from \fBsmartd\fP are logged to the facility\fIdaemon\fP.If you would like to have \fBsmartd\fP messages logged somewhere otherthan the default \fB/var/log/messages\fP location, this can typicallybe accomplished with (for example) the following steps:.RS 7.IP \fB[1]\fP 4Modify the script that starts \fBsmartd\fP to include the \fBsmartd\fPcommand-line argument \'\-l local3\'.  This tells \fBsmartd\fP to log itsmessages to facility \fBlocal3\fP..IP \fB[2]\fP 4Modify the \fBsyslogd\fP configuration file (typically\fB/etc/syslog.conf\fP) by adding a line of the form:.nf\fBlocal3.* /var/log/smartd.log\fP.fiThis tells \fBsyslogd\fP to log all the messages from facility \fBlocal3\fP tothe designated file: /var/log/smartd.log..IP \fB[3]\fP 4Tell \fBsyslogd\fP to re-read its configuration file, typically bysending the \fBsyslogd\fP process a \fBSIGHUP\fP hang-up signal..IP \fB[4]\fP 4Start (or restart) the \fBsmartd\fP daemon..RE.\"  The following two lines are a workaround for a man2html bug.  Please leave them..\" They define a non-existent option; useful because man2html can't correctly reset the margins..TP.B \&For more detailed information, please refer to the man pages for\fBsyslog.conf\fP, \fBsyslogd\fP, and \fBsyslog\fP.  You may also wantto modify the log rotation configuration files; see the man pages for\fBlogrotate\fP and examine your system\'s /etc/logrotate.conf file.Cygwin: Support for \fBsyslogd\fP as described above is available starting with Cygwin 1.5.15.On older releases or if no local \fBsyslogd\fP is running, the \'\-l\' option has no effect.In this case, all \fBsyslog\fP messages are written to Windows event logor to file \fBC:/CYGWIN_SYSLOG.TXT\fP if the event log is not available.Windows: Some \fBsyslog\fP functionality is implementedinternally in \fBsmartd\fP as follows: If no \'\-l\' option(or \'\-l daemon\') is specified, messages are written to Windowsevent log or to file \fB./smartd.log\fP if event log is not available(Win9x/ME or access denied). By specifying other values of FACILITY,log output is redirected as follows:\'\-l local0\' to file \fB./smartd.log\fP,\'\-l local1\' to standard output (redirect with \'>\' to any file),\'\-l local2\' to standard error,\'\-l local[3-7]\': to file \fB./smartd[1-5].log\fP.When using the event log, the enclosed utility \fBsyslogevt.exe\fPshould be registered as an event message file to avoid errormessages from the event viewer. Use \'\fBsyslogevt -r smartd\fP\'to register, \'\fBsyslogevt -u smartd\fP\' to unregister and\'\fBsyslogevt\fP\' for more help..TP.B \-n, \-\-no\-forkDo not fork into background; this is useful when executed from moderninit methods like initng, minit or supervise.On Cygwin, this allows running \fBsmartd\fP as service via cygrunsrv,see NOTES below.On Windows, this option is not available, use \'\-\-service\' instead..TP.B \-p NAME, \-\-pidfile=NAMEWrites pidfile \fINAME\fP containing the \fBsmartd\fP Process IDnumber (PID).  To avoid symlink attacks make sure the directory towhich pidfile is written is only writable for root.  Without thisoption, or if the \-\-debug option is given, no PID file is written onstartup.  If \fBsmartd\fP is killed with a maskable signal then thepidfile is removed..TP.B \-q WHEN, \-\-quit=WHENSpecifies when, if ever, \fBsmartd\fP should exit.  The validarguments are to this option are:.I nodev\- Exit if there are no devices to monitor, or if any errors are foundat startup in the configuration file.  This is the default..I errors\- Exit if there are no devices to monitor, or if any errors are foundin the configuration file /usr/local/etc/smartd.conf at startup or whenever itis reloaded..I nodevstartup\- Exit if there are no devices to monitor at startup.  But continueto run if no devices are found whenever the configuration file isreloaded..I never\- Only exit if a fatal error occurs (no remaining system memory,invalid command line arguments). In this mode, even if there are nodevices to monitor, or if the configuration file\fB/usr/local/etc/smartd.conf\fP has errors, \fBsmartd\fP will continue to run,waiting to load a configuration file listing valid devices..I onecheck\- Start \fBsmartd\fP in debug mode, then register devices, then checkdevice\'s SMART status once, and then exit with zero exit status if allof these steps worked correctly.This last option is intended for \'distribution-writers\' who want tocreate automated scripts to determine whether or not to automaticallystart up \fBsmartd\fP after installing smartmontools.  After starting\fBsmartd\fP with this command-line option, the distribution\'s installscripts should wait a reasonable length of time (say ten seconds).  If\fBsmartd\fP has not exited with zero status by that time, the scriptshould send \fBsmartd\fP a SIGTERM or SIGKILL and assume that\fBsmartd\fP will not operate correctly on the host.  Conversely, if\fBsmartd\fP exits with zero status, then it is safe to run\fBsmartd\fP in normal daemon mode. If \fBsmartd\fP is unable tomonitor any devices or encounters other problems then it will returnwith non-zero exit status..I showtests\- Start \fBsmartd\fP in debug mode, then register devices, then writea list of future scheduled self tests to stdout, and then exit with zeroexit status if all of these steps worked correctly.Device's SMART status is not checked.This option is intended to test whether the '-s REGEX' directives insmartd.conf will have the desired effect. The output lists the next testschedules, limited to 5 tests per type and device. This is followed by asummary of all tests of each device within the next 90 days..TP.B \-r TYPE, \-\-report=TYPEIntended primarily to help.B smartmontoolsdevelopers understand the behavior of

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -