📄 smartd.conf.5.in
字号:
inclusive) denotes which disk on the controller is monitored. In logfiles and email messages this disk will be identified as cciss_disk_XXwith XX in the range from 00 to 15 inclusive..B 3ware and cciss controllers are currently ONLY supported under Linux..I hpt,L/M/N\- the device consists of one or more ATA disks connected to a HighPointRocketRAID controller. The integer L is the controller id, the integer Mis the channel number, and the integer N is the PMPort number if it isavailable. The allowed values of L are from 1 to 4 inclusive, M are from1 to 8 inclusive and N from 1 to 4 if PMPort available. And also thesevalues are limited by the model of the HighPoint RocketRAID controller.In log files and email messages this disk will be identified ashpt_X/X/X and X/X/X is the same as L/M/N, note if no N indicated, N setto the default value 1..B HighPoint RocketRAID controllers are currently ONLY supported under Linux..I removable\- the device or its media is removable. This indicates to\fBsmartd\fPthat it should continue (instead of exiting, which is the defaultbehavior) if the device does not appear to be present when\fBsmartd\fP is started. This Directive may be used in conjunctionwith the other \'\-d\' Directives..TP.B \-n POWERMODE[,q]This \'nocheck\' Directive is used to prevent a disk from beingspun-up when it is periodically polled by \fBsmartd\fP.ATA disks have five different power states. In order of increasingpower consumption they are: \'OFF\', \'SLEEP\', \'STANDBY\', \'IDLE\',and \'ACTIVE\'. Typically in the OFF, SLEEP, and STANDBY modes thedisk\'s platters are not spinning. But usually, in response to SMARTcommands issued by \fBsmartd\fP, the disk platters are spun up. So ifthis option is not used, then a disk which is in a low\-power mode maybe spun up and put into a higher\-power mode when it is periodicallypolled by \fBsmartd\fP.Note that if the disk is in SLEEP mode when \fBsmartd\fP is started,then it won't respond to \fBsmartd\fP commands, and so the disk won'tbe registered as a device for \fBsmartd\fP to monitor. If a disk is inany other low\-power mode, then the commands issued by \fBsmartd\fP toregister the disk will probably cause it to spin\-up.The \'\fB\-n\fP\' (nocheck) Directive specifies if \fBsmartd\fP\'speriodic checks should still be carried out when the device is in alow\-power mode. It may be used to prevent a disk from being spun\-upby periodic \fBsmartd\fP polling. The allowed values of POWERMODEare:.I never\- \fBsmartd\fP will poll (check) the device regardless of its powermode. This may cause a disk which is spun\-down to be spun\-up when\fBsmartd\fP checks it. This is the default behavior if the '\-n'Directive is not given..I sleep\- check the device unless it is in SLEEP mode..I standby\- check the device unless it is in SLEEP or STANDBY mode. Inthese modes most disks are not spinning, so if you want to preventa laptop disk from spinning up each time that \fBsmartd\fP polls,this is probably what you want..I idle\- check the device unless it is in SLEEP, STANDBY or IDLE mode.In the IDLE state, most disks are still spinning, so this is probablynot what you want.When a self test is scheduled (see \'\-s\' Directive below), the\'\fB\-n\fP\' Directive is ignored, and all tests are carried out.When a periodic test is skipped, \fBsmartd\fP normally writes aninformal log message. The message can be suppressed by appendingthe option \',q\' to POWERMODE (like \'\-n standby,q\').This prevents a laptop disk from spinning up due to this message..TP.B \-T TYPESpecifies how tolerant\fBsmartd\fPshould be of SMART command failures. The valid arguments to thisDirective are:.I normal\- do not try to monitor the disk if a mandatory SMART command fails, butcontinue if an optional SMART command fails. This is the default..I permissive\- try to monitor the disk even if it appears to lack SMARTcapabilities. This may be required for some old disks (prior toATA\-3 revision 4) that implemented SMART before the SMART standardswere incorporated into the ATA/ATAPI Specifications. This may also beneeded for some Maxtor disks which fail to comply with the ATASpecifications and don't properly indicate support for error\- orself\-test logging.[Please see the \fBsmartctl \-T\fP command-line option.].TP.B \-o VALUEEnables or disables SMART Automatic Offline Testing when\fBsmartd\fPstarts up and has no further effect. The valid arguments to thisDirective are \fIon\fP and \fIoff\fP.The delay between tests is vendor-specific, but is typically fourhours.Note that SMART Automatic Offline Testing is \fBnot\fP part of the ATASpecification. Please see the.B smartctl \-ocommand-line option documentation for further information about thisfeature..TP.B \-S VALUEEnables or disables Attribute Autosave when \fBsmartd\fPstarts up and has no further effect. The valid arguments to thisDirective are \fIon\fP and \fIoff\fP. Also affects SCSI devices.[Please see the \fBsmartctl \-S\fP command-line option.].TP.B \-HCheck the SMART health status of the disk. If any PrefailureAttributes are less than or equal to their threshold values, then diskfailure is predicted in less than 24 hours, and a message at loglevel.B \'LOG_CRITICAL\'will be logged to syslog. [Please see the.B smartctl \-Hcommand-line option.].TP.B \-l TYPEReports increases in the number of errors in one of the two SMART logs. Thevalid arguments to this Directive are:.I error\- report if the number of ATA errors reported in the ATA Error Loghas increased since the last check..I selftest\- report if the number of failed tests reported in the SMARTSelf-Test Log has increased since the last check, or if the timestampassociated with the most recent failed test has increased. Note thatsuch errors will \fBonly\fP be logged if you run self-tests on thedisk (and it fails a test!). Self-Tests can be run automatically by\fBsmartd\fP: please see the \fB\'\-s\'\fP Directive below.Self-Tests can also be run manually by using the \fB\'\-t\ short\'\fPand \fB\'\-t\ long\'\fP options of \fBsmartctl\fP and the results ofthe testing can be observed using the \fBsmartctl \'\-l\ selftest\'\fPcommand-line option.][Please see the \fBsmartctl \-l\fP and \fB\-t\fP command-lineoptions.].TP.B \-s REGEXPRun Self-Tests or Offline Immediate Tests, at scheduled times. ASelf- or Offline Immediate Test will be run at the end of periodicdevice polling, if all 12 characters of the string \fBT/MM/DD/d/HH\fPmatch the extended regular expression \fBREGEXP\fP. Here:.RS 7.IP \fBT\fP 4is the type of the test. The values that \fBsmartd\fP will try tomatch (in turn) are: \'L\' for a \fBL\fPong Self-Test, \'S\' for a\fBS\fPhort Self-Test, \'C\' for a \fBC\fPonveyance Self-Test (ATAonly), and \'O\' for an \fBO\fPffline Immediate Test (ATA only). Assoon as a match is found, the test will be started and no additionalmatches will be sought for that device and that polling cycle..IP \fBMM\fP 4is the month of the year, expressed with two decimal digits. Therange is from 01 (January) to 12 (December) inclusive. Do \fBnot\fPuse a single decimal digit or the match will always fail!.IP \fBDD\fP 4is the day of the month, expressed with two decimal digits. Therange is from 01 to 31 inclusive. Do \fBnot\fPuse a single decimal digit or the match will always fail!.IP \fBd\fP 4is the day of the week, expressed with one decimal digit. Therange is from 1 (Monday) to 7 (Sunday) inclusive..IP \fBHH\fP 4is the hour of the day, written with two decimal digits, and given inhours after midnight. The range is 00 (midnight to just before 1am)to 23 (11pm to just before midnight) inclusive. Do \fBnot\fP use asingle decimal digit or the match will always fail!.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 \&Some examples follow. In reading these, keep in mind that in extendedregular expressions a dot \fB\'.\'\fP matches any single character, anda parenthetical expression such as \fB\'(A|B|C)\'\fP denotes any one of the three possibilities \fBA\fP,\fBB\fP, or \fBC\fP.To schedule a short Self-Test between 2-3am every morning, use:.nf\fB \-s S/../.././02\fP.fiTo schedule a long Self-Test between 4-5am every Sunday morning, use:.nf\fB \-s L/../../7/04\fP.fiTo schedule a long Self-Test between 10-11pm on the first andfifteenth day of each month, use:.nf\fB \-s L/../(01|15)/./22\fP.fiTo schedule an Offline Immediate test after every midnight, 6am,noon,and 6pm, plus a Short Self-Test daily at 1-2am and a LongSelf-Test every Saturday at 3-4am, use:.nf\fB \-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)\fP.fiScheduled tests are run immediately following the regularly-scheduleddevice polling, if the current local date, time, and test type, match\fBREGEXP\fP. By default the regularly-scheduled device pollingoccurs every thirty minutes after starting \fBsmartd\fP. Take cautionif you use the \'\-i\' option to make this polling interval more thansixty minutes: the poll times may fail to coincide with any of thetesting times that you have specified with \fBREGEXP\fP, and so theself tests may not take place as you wish.Before running an offline or self-test, \fBsmartd\fP checks to be surethat a self-test is not already running. If a self-test \fBis\fPalready running, then this running self test will \fBnot\fP beinterrupted to begin another test.\fBsmartd\fP will not attempt to run \fBany\fP type of test if anothertest was already started or run in the same hour.To avoid performance problems during system boot, \fBsmartd\fP willnot attempt to run any scheduled tests following the very firstdevice polling (unless \'\-q onecheck\' is specified).Each time a test is run, \fBsmartd\fP will log an entry to SYSLOG.You can use these or the '-q showtests' command-line option to verifythat you constructed \fBREGEXP\fP correctly. The matching order(\fBL\fP before \fBS\fP before \fBC\fP before \fBO\fP) ensures thatif multiple test types are all scheduled for the same hour, thelonger test type has precedence. This is usually the desired behavior.Unix users: please beware that the rules for extended regularexpressions [regex(7)] are \fBnot\fP the same as the rules forfile\-name pattern matching by the shell [glob(7)]. \fBsmartd\fP willissue harmless informational warning messages if it detects charactersin \fBREGEXP\fP that appear to indicate that you have made thismistake..TP.B \-m ADDSend a warning email to the email address \fBADD\fP if the \'\-H\',\'\-l\', \'\-f\', \'\-C\', or \'\-O\' Directives detect a failure or anew error, or if a SMART command to the disk fails. This Directiveonly works in conjunction with these other Directives (or with theequivalent default \'\-a\' Directive).To prevent your email in-box from getting filled up with warningmessages, by default only a single warning will be sent for each ofthe enabled alert types, \'\-H\', \'\-l\', \'\-f\', \'\-C\', or\'\-O\' even if more than one failure or error is detected or if thefailure or error persists. [This behavior can be modified; see the\'\-M\' Directive below.]To send email to more than one user, please use the following "commaseparated" form for the address: \fBuser1@add1,user2@add2,...,userN@addN\fP(with no spaces).To test that email is being sent correctly, use the \'\-M test\'Directive described below to send one test email message on\fBsmartd\fPstartup.By default, email is sent using the system .B mailcommand. In order that\fBsmartd\fPfind the mail command (normally /bin/mail) an executable named.B \'mail\'must be in the path of the shell or environment from which\fBsmartd\fPwas started. If you wish to specify an explicit path to the mailexecutable (for example /usr/local/bin/mail) or a custom script torun, please use the \'\-M exec\' Directive below.Note that by default under Solaris, in the previous paragraph,\'\fBmailx\fP\' and \'\fB/bin/mailx\fP\' are used, since Solaris\'/bin/mail\' does not accept a \'\-s\' (Subject) command-lineargument.On Windows, the \'\fBBlat\fP\' mailer(\fBhttp://blat.sourceforge.net/\fP) is used by default.This mailer uses a different command line syntax, see\'\-M exec\' below.Note also that there is a special argument.B <nomailer>which can be given to the \'\-m\' Directive in conjunction with the \'\-Mexec\' Directive. Please see below for an explanation of its effect.If the mailer or the shell running it produces any STDERR/STDOUToutput, then a snippet of that output will be copied to SYSLOG. Theremainder of the output is discarded. If problems are encountered insending mail, this should help you to understand and fix them. Ifyou have mail problems, we recommend running \fBsmartd\fP in debugmode with the \'-d\' flag, using the \'-M test\' Directive describedbelow.The following extension is available on Windows:By specifying \'\fBmsgbox\fP\' as a mail address, a warning"email" is displayed as a message box on the screen.Using both \'\fBmsgbox\fP\' and regular mail addresses is possible,if \'\fBmsgbox\fP\' is the first word in the comma separated list.With \'\fBsysmsgbox\fP\', a system modal (always on top) message boxis used. If running as a service, a service notification message box(always shown on current visible desktop) is used..TP.B \-M TYPEThese Directives modify the behavior of the\fBsmartd\fPemail warnings enabled with the \'\-m\' email Directive described above.These \'\-M\' Directives only work in conjunction with the \'\-m\'Directive and can not be used without it.Multiple \-M Directives may be given. If more than one of thefollowing three \-M Directives are given (example: \-M once \-M daily)then the final one (in the example, \-M daily) is used.The valid arguments to the \-M Directive are (one of the followingthree):.I once\- send only one warning email for each type of disk problem detected. Thisis the default..I daily\- send additional warning reminder emails, once per day, for each typeof disk problem detected.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -