📄 smartd.8.in
字号:
.B smartmontoolson non-conforming or poorly-conforming hardware. This option reportsdetails of\fBsmartd\fPtransactions with the device. The option can be used multiple times.When used just once, it shows a record of the ioctl() transactionswith the device. When used more than once, the detail of these ioctl()transactions are reported in greater detail. The valid arguments tothis option are:.I ioctl\- report all ioctl() transactions..I ataioctl\- report only ioctl() transactions with ATA devices..I scsiioctl\- report only ioctl() transactions with SCSI devices.Any argument may include a positive integer to specify the level ofdetail that should be reported. The argument should be followed by acomma then the integer with no spaces. For example, \fIataioctl,2\fPThe default level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' areequivalent..TP.B \-\-serviceCygwin and Windows only: Enables \fBsmartd\fP to run as a Windows service.On Cygwin, this option is kept for backward compatibility only.It has the same effect as \'\-n, \-\-no\-fork\', see above.On Windows, this option enables the buildin service support.The option must be specified in the service command line as the firstargument. It should not be used from console.See NOTES below for details..TP.B \-V, \-\-version, \-\-license, \-\-copyrightPrints license, copyright, and CVS version information ontoSTDOUT and then exits. Please include this information if you arereporting bugs, or have specific questions about the behavior of\fBsmartd\fP..SH EXAMPLES.Bsmartd.fiRuns the daemon in forked mode. This is the normal way to run\fBsmartd\fP.Entries are logged to SYSLOG (by default.B /var/log/messages.).Bsmartd -d -i 30.fiRun in foreground (debug) mode, checking the disk statusevery 30 seconds..Bsmartd -q onecheck.fiRegisters devices, and checks the status of the devices exactlyonce. The exit status (the bash.B $?variable) will be zero if all went well, and nonzero if no deviceswere detected or some other problem was encountered..fi Note that \fBsmartmontools\fP provides a start-up script in\fB/usr/local/etc/rc.d/init.d/smartd\fP which is responsible for starting andstopping the daemon via the normal init interface. Using this script,you can start \fBsmartd\fP by giving the command:.nf.B /usr/local/etc/rc.d/init.d/smartd start.fiand stop it by using the command:.nf.B /usr/local/etc/rc.d/init.d/smartd stop.fiIf you want \fBsmartd\fP to start running whenever your machine isbooted, this can be enabled by using the command:.nf.B /sbin/chkconfig --add smartd.fiand disabled using the command:.nf.B /sbin/chkconfig --del smartd.fi.\" DO NOT MODIFY THIS OR THE FOLLOWING TWO LINES. THIS MATERIAL.\" IS AUTOMATICALLY INCLUDED IN THE FILE smartd.conf.5.\" STARTINCLUDE.SH CONFIGURATION FILE /usr/local/etc/smartd.confIn the absence of a configuration file, under Linux\fBsmartd\fP will try to open the 20 ATA devices .B /dev/hd[a-t] and the 26 SCSI devices.B /dev/sd[a-z].Under FreeBSD, \fBsmartd\fPwill try to open all existing ATA devices (with entries in /dev).B /dev/ad[0-9]+and all existing SCSI devices.B /dev/da[0-9]+. Under NetBSD/OpenBSD, \fBsmartd\fPwill try to open all existing ATA devices (with entries in /dev).B /dev/wd[0-9]+cand all existing SCSI devices.B /dev/sd[0-9]+c.Under Solaris \fBsmartd\fP will try to open 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.Under Windows \fBsmartd\fP will try to open all entries \fB"/dev/hd[a-j]"\fP ("\\\\.\\PhysicalDrive[0-9]")for IDE/ATA devices on WinNT4/2000/XP, \fB"/dev/hd[a-d]"\fP(bitmask from "\\\\.\\SMARTVSD") for IDE/ATA devices on Win95/98/98SE/ME,and \fB"/dev/scsi[0-9][0-7]"\fP (ASPI adapter 0-9, ID 0-7) for SCSIdevices on all versions of Windows.Under Darwin, \fBsmartd\fP will open any ATA block storage device.This can be annoying if you have an ATA or SCSI device that hangs ormisbehaves when receiving SMART commands. Even if this causes noproblems, you may be annoyed by the string of error log messages aboutblock-major devices that can\'t be found, and SCSI devices that can\'tbe opened.One can avoid this problem, and gain more control over the types ofevents monitored by\fBsmartd\fP,by using the configuration file.B /usr/local/etc/smartd.conf.This file contains a list of devices to monitor, with one device perline. An example file is included with the.B smartmontoolsdistribution. You will find this sample configuration file in\fB/usr/local/share/doc/smartmontools-5.1/\fP. For security, the configuration fileshould not be writable by anyone but root. The syntax of the file is asfollows:.IP \(bu 4There should be one device listed per line, although you may havelines that are entirely comments or white space..IP \(bu 4Any text following a hash sign \'#\' and up to the end of the line istaken to be a comment, and ignored..IP \(bu 4Lines may be continued by using a backslash \'\e\' as the lastnon-whitespace or non-comment item on a line..IP \(bu 4Note: a line whose first character is a hash sign \'#\' is treated asa white-space blank line, \fBnot\fP as a non-existent line, and will\fBend\fP a continuation line..PP 0.fiHere is an example configuration file. It\'s for illustrative purposesonly; please don\'t copy it onto your system without reading to the endof the.B DIRECTIVESSection below!.nf.B ################################################.B # This is an example smartd startup config file.B # /usr/local/etc/smartd.conf for monitoring three.B # ATA disks, three SCSI disks, six ATA disks.B # behind two 3ware controllers, three SATA disks.B # directly connected to the highpoint rocket-.B # raid controller, two SATA disks connected to.B # the highpoint rocketraid controller via a pmport.B # device and one SATA disk..B #.nf.B # First ATA disk on two different interfaces. On.B # the second disk, start a long self-test every.B # Sunday between 3 and 4 am..B #.B \ \ /dev/hda -a -m admin@example.com,root@localhost .B \ \ /dev/hdc -a -I 194 -I 5 -i 12 -s L/../../7/03.B #.nf.B # SCSI disks. Send a TEST warning email to admin on.B # startup..B #.B \ \ /dev/sda.B \ \ /dev/sdb -m admin@example.com -M test.B #.nf.B # Strange device. It\'s SCSI. Start a scheduled.B # long self test between 5 and 6 am Monday/Thursday.B \ \ /dev/weird -d scsi -s L/../../(1|4)/05.B #.nf.B # An ATA disk may appear as a SCSI device to the.B # OS. If a SCSI to ATA Translation (SAT) layer.B # is between the OS and the device then this can be.B # flagged with the '-d sat' option. This situation.B # may become common with SATA disks in SAS and FC.B # environments..B \ \ /dev/sda -a -d sat.B #.nf.B # Four ATA disks on a 3ware 6/7/8000 controller..B # Start short self-tests daily between midnight and 1am,.B # 1-2, 2-3, and 3-4 am. Starting with the Linux 2.6.B # kernel series, /dev/sdX is deprecated in favor of.B # /dev/tweN. For example replace /dev/sdc by /dev/twe0.B # and /dev/sdd by /dev/twe1..B \ \ /dev/sdc -d 3ware,0 -a -s S/../.././00.B \ \ /dev/sdc -d 3ware,1 -a -s S/../.././01.B \ \ /dev/sdd -d 3ware,2 -a -s S/../.././02.B \ \ /dev/sdd -d 3ware,3 -a -s S/../.././03.B #.nf.B # Two ATA disks on a 3ware 9000 controller..B # Start long self-tests Sundays between midnight and .B # 1am and 2-3 am.B \ \ /dev/twa0 -d 3ware,0 -a -s L/../../7/00.B \ \ /dev/twa0 -d 3ware,1 -a -s L/../../7/02.B #.nf.B # Three SATA disks on a highpoint rocketraid controller..B # Start short self-tests daily between 1-2, 2-3, and.B # 3-4 am..B \ \ /dev/sde -d hpt,1/1 -a -s S/../.././01.B \ \ /dev/sde -d hpt,1/2 -a -s S/../.././02.B \ \ /dev/sde -d hpt,1/3 -a -s S/../.././03.B #.nf.B # Two SATA disks connected to a highpoint rocketraid .B # via a pmport device. Start long self-tests Sundays.B # between midnight and 1am and 2-3 am..B \ \ /dev/sde -d hpt,1/4/1 -a -s L/../../7/00.B \ \ /dev/sde -d hpt,1/4/2 -a -s L/../../7/02.B #.nf.B # The following line enables monitoring of the .B # ATA Error Log and the Self-Test Error Log. .B # It also tracks changes in both Prefailure.B # and Usage Attributes, apart from Attributes.B # 9, 194, and 231, and shows continued lines:.B #.B \ \ /dev/hdd\ -l\ error\ \e.B \ \ \ \ \ \ \ \ \ \ \ -l\ selftest\ \e.B \ \ \ \ \ \ \ \ \ \ \ -t\ \e\ \ \ \ \ \ # Attributes not tracked:.B \ \ \ \ \ \ \ \ \ \ \ -I\ 194\ \e\ \ # temperature.B \ \ \ \ \ \ \ \ \ \ \ -I\ 231\ \e\ \ # also temperature.B \ \ \ \ \ \ \ \ \ \ \ -I 9\ \ \ \ \ \ # power-on hours.B #.B ################################################.fi.PP .SH CONFIGURATION FILE DIRECTIVES.PPIf the first non-comment entry in the configuration file is the textstring.B DEVICESCANin capital letters, then\fBsmartd\fPwill ignore any remaining lines in the configuration file, and willscan for devices..B DEVICESCANmay optionally be followed by Directives that will apply to alldevices that are found in the scan. Please see below for additionaldetails..sp 2The following are the Directives that may appear following the devicename or.B DEVICESCANon any line of the.B /usr/local/etc/smartd.confconfiguration file. Note that.B these are NOT command-line options for \fBsmartd\fP.The Directives below may appear in any order, following the devicename. .B For an ATA device,if no Directives appear, then the device will be monitoredas if the \'\-a\' Directive (monitor all SMART properties) had been given..B If a SCSI disk is listed,it will be monitored at the maximum implemented level: roughlyequivalent to using the \'\-H \-l selftest\' options for an ATA disk.So with the exception of \'\-d\', \'\-m\', \'\-l selftest\', \'\-s\', and\'\-M\', the Directives below are ignored for SCSI disks. For SCSIdisks, the \'\-m\' Directive sends a warning email if the SMART statusindicates a disk failure or problem, if the SCSI inquiry about diskstatus fails, or if new errors appear in the self-test log..B If a 3ware controller is usedthen the corresponding SCSI (/dev/sd?) or character device (/dev/twe?or /dev/twa?) must be listed, along with the \'\-d 3ware,N\' Directive(see below). The individual ATA disks hosted by the 3ware controllerappear to \fBsmartd\fP as normal ATA devices. Hence all the ATAdirectives can be used for these disks (but see note below)..TP.B \-d TYPESpecifies the type of the device. This Directive may be used multipletimes for one device, but the arguments \fIata\fP, \fIscsi\fP, \fIsat\fP,\fImarvell\fP, \fIcciss,N\fP and \fI3ware,N\fP are mutually-exclusive. If morethan one is given then \fBsmartd\fP will use the last one which appears.If none of these three arguments is given, then \fBsmartd\fP willfirst attempt to guess the device type by looking at whether the sixthcharacter in the device name is an \'s\' or an \'h\'. This will work fordevice names like /dev/hda or /dev/sdb, and corresponds to choosing\fIata\fP or \fIscsi\fP respectively. If\fBsmartd\fPcan\'t guess from this sixth character, then it will simply try toaccess the device using first ATA and then SCSI ioctl()s.The valid arguments to this Directive are:.I ata\- the device type is ATA. This prevents\fBsmartd\fPfrom issuing SCSI commands to an ATA device..I scsi\- the device type is SCSI. This prevents\fBsmartd\fPfrom issuing ATA commands to a SCSI device.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -