SMARTD.CONF
Section: 2011-10-20 (5)Updated: 2011-10-20
Index Return to Main Contents
NAME
smartd.conf - SMART Disk Monitoring Daemon Configuration FileFULL PATH
/etc/smartd.confPACKAGE VERSION
smartmontools-5.42 2011-10-20 r3458DESCRIPTION
[This man page is generated for the Linux version of smartmontools. It does not contain info specific to other platforms.]/etc/smartd.conf is the configuration file for the smartd daemon, which monitors the Self-Monitoring, Analysis and Reporting Technology (SMART) system built into many ATA-3 and later ATA, IDE and SCSI-3 hard drives.
If the configuration file /etc/smartd.conf is present, smartd reads it at startup, before fork(2)ing into the background. If smartd subsequently receives a HUP signal, it will then re-read the configuration file. If smartd is running in debug mode, then an INT signal will also make it re-read the configuration file. This signal can be generated by typing <CONTROL-C> in the terminal window where smartd is running.
CONFIGURATION FILE /etc/smartd.conf
In the absence of a configuration file smartd will try to open all available devices. Ubder linux will try to open the 20 ATA devices /dev/hd[a-t] and the 26 SCSI devices /dev/sd[a-z].This can be annoying if you have an ATA or SCSI device that hangs or misbehaves when receiving SMART commands. Even if this causes no problems, you may be annoyed by the string of error log messages about block-major devices that can't be found, and SCSI devices that can't be opened.
One can avoid this problem, and gain more control over the types of events monitored by smartd, by using the configuration file /etc/smartd.conf. This file contains a list of devices to monitor, with one device per line. An example file is included with the smartmontools distribution. You will find this sample configuration file in /usr/share/doc/smartmontools/. For security, the configuration file should not be writable by anyone but root. The syntax of the file is as follows:
- *
- There should be one device listed per line, although you may have lines that are entirely comments or white space.
- *
- Any text following a hash sign '#' and up to the end of the line is taken to be a comment, and ignored.
- *
- Lines may be continued by using a backslash '\' as the last non-whitespace or non-comment item on a line.
- *
- Note: a line whose first character is a hash sign '#' is treated as a white-space blank line, not as a non-existent line, and will end a continuation line.
Here is an example configuration file. It's for illustrative purposes only; please don't copy it onto your system without reading to the end of the DIRECTIVES Section below!
################################################ # This is an example smartd startup config file # /etc/smartd.conf for monitoring three # ATA disks, three SCSI disks, six ATA disks # behind two 3ware controllers, three SATA disks # directly connected to the HighPoint Rocket- # RAID controller, two SATA disks connected to # the HighPoint RocketRAID controller via a pmport # device, four SATA disks connected to an Areca # RAID controller, and one SATA disk. # # First ATA disk on two different interfaces. On # the second disk, start a long self-test every # Sunday between 3 and 4 am. # /dev/hda -a -m admin@example.com,root@localhost /dev/hdc -a -I 194 -I 5 -i 12 -s L/../../7/03 # # SCSI disks. Send a TEST warning email to admin on # startup. # /dev/sda /dev/sdb -m<EMAIL_ADDRESS>-M test # # Strange device. It's SCSI. Start a scheduled # long self test between 5 and 6 am Monday/Thursday /dev/weird -d scsi -s L/../../(1|4)/05 # # An ATA disk may appear as a SCSI device to the # OS. If a SCSI to ATA Translation (SAT) layer # is between the OS and the device then this can be # flagged with the '-d sat' option. This situation # may become common with SATA disks in SAS and FC # environments. /dev/sda -a -d sat # # Three disks connected to a MegaRAID controller # Start short self-tests daily between 1-2, 2-3, and # 3-4 am. /dev/sda -d megaraid,0 -a -s S/../.././01 /dev/sda -d megaraid,1 -a -s S/../.././02 /dev/sda -d megaraid,2 -a -s S/../.././03 # # Four ATA disks on a 3ware 6/7/8000 controller. # Start short self-tests daily between midnight and 1am, # 1-2, 2-3, and 3-4 am. Starting with the Linux 2.6 # kernel series, /dev/sdX is deprecated in favor of # /dev/tweN. For example replace /dev/sdc by /dev/twe0 # and /dev/sdd by /dev/twe1. /dev/sdc -d 3ware,0 -a -s S/../.././00 /dev/sdc -d 3ware,1 -a -s S/../.././01 /dev/sdd -d 3ware,2 -a -s S/../.././02 /dev/sdd -d 3ware,3 -a -s S/../.././03 # # Two ATA disks on a 3ware 9000 controller. # Start long self-tests Sundays between midnight and # 1am and 2-3 am /dev/twa0 -d 3ware,0 -a -s L/../../7/00 /dev/twa0 -d 3ware,1 -a -s L/../../7/02 # # Two SATA (not SAS) disks on a 3ware 9750 controller. # Start long self-tests Sundays between midnight and # 1am and 2-3 am /dev/twl0 -d 3ware,0 -a -s L/../../7/00 /dev/twl0 -d 3ware,1 -a -s L/../../7/02 # # Three SATA disks on a HighPoint RocketRAID controller. # Start short self-tests daily between 1-2, 2-3, and # 3-4 am. # under Linux /dev/sde -d hpt,1/1 -a -s S/../.././01 /dev/sde -d hpt,1/2 -a -s S/../.././02 /dev/sde -d hpt,1/3 -a -s S/../.././03 # # Two SATA disks connected to a HighPoint RocketRAID # via a pmport device. Start long self-tests Sundays # between midnight and 1am and 2-3 am. # under Linux /dev/sde -d hpt,1/4/1 -a -s L/../../7/00 /dev/sde -d hpt,1/4/2 -a -s L/../../7/02 # Three SATA disks connected to an Areca # RAID controller. Start long self-tests Sundays # between midnight and 3 am. /dev/sg2 -d areca,1 -a -s L/../../7/00 /dev/sg2 -d areca,2 -a -s L/../../7/01 /dev/sg2 -d areca,3 -a -s L/../../7/02 # # The following line enables monitoring of the # ATA Error Log and the Self-Test Error Log. # It also tracks changes in both Prefailure # and Usage Attributes, apart from Attributes # 9, 194, and 231, and shows continued lines: # /dev/hdd -l error \ -l selftest \ -t \ # Attributes not tracked: -I 194 \ # temperature -I 231 \ # also temperature -I 9 # power-on hours # ################################################
CONFIGURATION FILE DIRECTIVES
If a non-comment entry in the configuration file is the text string DEVICESCAN in capital letters, then smartd will ignore any remaining lines in the configuration file, and will scan for devices. DEVICESCAN may optionally be followed by Directives that will apply to all devices that are found in the scan. Please see below for additional details.
The following are the Directives that may appear following the device name or DEVICESCAN on any line of the /etc/smartd.conf configuration file. Note that these are NOT command-line options for smartd. The Directives below may appear in any order, following the device name.
For an ATA device, if no Directives appear, then the device will be monitored as if the '-a' Directive (monitor all SMART properties) had been given.
If a SCSI disk is listed, it will be monitored at the maximum implemented level: roughly equivalent 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 SCSI disks, the '-m' Directive sends a warning email if the SMART status indicates a disk failure or problem, if the SCSI inquiry about disk status fails, or if new errors appear in the self-test log.
If a 3ware controller is used then the corresponding SCSI (/dev/sd?) or character device (/dev/twe?, /dev/twa? or /dev/twl?) must be listed, along with the '-d 3ware,N' Directive (see below). The individual ATA disks hosted by the 3ware controller appear to smartd as normal ATA devices. Hence all the ATA directives can be used for these disks (but see note below).
If an Areca controller is used then the corresponding device (SCSI /dev/sg? on Linux or /dev/arcmsr0 on FreeBSD) must be listed, along with the '-d areca,N' Directive (see below). The individual SATA disks hosted by the Areca controller appear to smartd as normal ATA devices. Hence all the ATA directives can be used for these disks. Areca firmware version 1.46 or later which supports smartmontools must be used; Please see the smartctl(8) man page for further details.
- -d TYPE
-
Specifies the type of the device.
The valid arguments to this directive are:
auto - attempt to guess the device type from the device name or from controller type info provided by the operating system or from a matching USB ID entry in the drive database. This is the default.
ata - the device type is ATA. This prevents smartd from issuing SCSI commands to an ATA device.
scsi - the device type is SCSI. This prevents smartd from issuing ATA commands to a SCSI device.
sat - the device type is SCSI to ATA Translation (SAT). This is for ATA disks that have a SCSI to ATA Translation (SAT) Layer (SATL) between the disk and the operating system. SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and the other 16 bytes long. The default is the 16 byte variant which can be overridden with either '-d sat,12' or '-d sat,16'.
usbcypress - this device type is for ATA disks that are behind a Cypress USB to PATA bridge. This will use the ATACB proprietary scsi pass through command. The default SCSI operation code is 0x24, but although it can be overridden with '-d usbcypress,0xN', where N is the scsi operation code, you're running the risk of damage to the device or filesystems on it.
usbjmicron - this device type is for SATA disks that are behind a JMicron USB to PATA/SATA bridge. The 48-bit ATA commands (required e.g. for '-l xerror', see below) do not work with all of these bridges and are therefore disabled by default. These commands can be enabled by '-d usbjmicron,x'. If two disks are connected to a bridge with two ports, an error message is printed if no PORT is specified. The port can be specified by '-d usbjmicron[,x],PORT' where PORT is 0 (master) or 1 (slave). This is not necessary if the device uses a port multiplier to connect multiple disks to one port. The disks appear under separate /dev/ice names then. CAUTION: Specifying ',x' for a device which does not support it results in I/O errors and may disconnect the drive. The same applies if the specified PORT does not exist or is not connected to a disk.
usbsunplus - this device type is for SATA disks that are behind a SunplusIT USB to SATA bridge.
marvell - [Linux only] interact with SATA disks behind Marvell chip-set controllers (using the Marvell rather than libata driver).
megaraid,N - [Linux only] the device consists of one or more SCSI/SAS disks connected to a MegaRAID controller. The non-negative integer N (in the range of 0 to 127 inclusive) denotes which disk on the controller is monitored. This interface will also work for Dell PERC controllers. In log files and email messages this disk will be identified as megaraid_disk_XXX with XXX in the range from 000 to 127 inclusive. Please see the smartctl(8) man page for further details.
3ware,N - [FreeBSD and Linux only] the device consists of one or more ATA disks connected to a 3ware RAID controller. The non-negative integer N (in the range from 0 to 127 inclusive) denotes which disk on the controller is monitored. In log files and email messages this disk will be identified as 3ware_disk_XXX with XXX in the range from 000 to 127 inclusive.
Note that while you may use any of the 3ware SCSI logical devices /dev/tw* to address any of the physical disks (3ware ports), error and log messages will make the most sense if you always list the 3ware SCSI logical device corresponding to the particular physical disks. Please see the smartctl(8) man page for further details.
areca,N - [Linux and FreeBSD only] the device consists of one or more SATA disks connected to an Areca SATA RAID controller. The positive integer N (in the range from 1 to 24 inclusive) denotes which disk on the controller is monitored. In log files and email messages this disk will be identifed as areca_disk_XX with XX in the range from 01 to 24 inclusive. Please see the smartctl(8) man page for further details.
cciss,N - [FreeBSD and Linux only] the device consists of one or more SCSI/SAS disks connected to a cciss RAID controller. The non-negative integer N (in the range from 0 to 15 inclusive) denotes which disk on the controller is monitored. In log files and email messages this disk will be identified as cciss_disk_XX with XX in the range from 00 to 15 inclusive. Please see the smartctl(8) man page for further details.
hpt,L/M/N - [FreeBSD and Linux only] the device consists of one or more ATA disks connected to a HighPoint RocketRAID controller. The integer L is the controller id, the integer M is the channel number, and the integer N is the PMPort number if it is available. The allowed values of L are from 1 to 4 inclusive, M are from 1 to 16 inclusive and N from 1 to 4 if PMPort available. And also these values are limited by the model of the HighPoint RocketRAID controller. In log files and email messages this disk will be identified as hpt_X/X/X and X/X/X is the same as L/M/N, note if no N indicated, N set to the default value 1. Please see the smartctl(8) man page for further details.
removable - the device or its media is removable. This indicates to smartd that it should continue (instead of exiting, which is the default behavior) if the device does not appear to be present when smartd is started. This Directive may be used in conjunction with the other '-d' Directives.
- -n POWERMODE[,N][,q]
-
[ATA only] This 'nocheck' Directive is used to prevent a disk from
being spun-up when it is periodically polled by smartd.
ATA disks have five different power states. In order of increasing power consumption they are: 'OFF', 'SLEEP', 'STANDBY', 'IDLE', and 'ACTIVE'. Typically in the OFF, SLEEP, and STANDBY modes the disk's platters are not spinning. But usually, in response to SMART commands issued by smartd, the disk platters are spun up. So if this option is not used, then a disk which is in a low-power mode may be spun up and put into a higher-power mode when it is periodically polled by smartd.
Note that if the disk is in SLEEP mode when smartd is started, then it won't respond to smartd commands, and so the disk won't be registered as a device for smartd to monitor. If a disk is in any other low-power mode, then the commands issued by smartd to register the disk will probably cause it to spin-up.
The '-n' (nocheck) Directive specifies if smartd's periodic checks should still be carried out when the device is in a low-power mode. It may be used to prevent a disk from being spun-up by periodic smartd polling. The allowed values of POWERMODE are:
never - smartd will poll (check) the device regardless of its power mode. This may cause a disk which is spun-down to be spun-up when smartd checks it. This is the default behavior if the '-n' Directive is not given.
sleep - check the device unless it is in SLEEP mode.
standby - check the device unless it is in SLEEP or STANDBY mode. In these modes most disks are not spinning, so if you want to prevent a laptop disk from spinning up each time that smartd polls, this is probably what you want.
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 probably not what you want.
Maximum number of skipped checks (in a row) can be specified by appending positive number ',N' to POWERMODE (like '-n standby,15'). After N checks are skipped in a row, powermode is ignored and the check is performed anyway.
When a periodic test is skipped, smartd normally writes an informal log message. The message can be suppressed by appending the option ',q' to POWERMODE (like '-n standby,q'). This prevents a laptop disk from spinning up due to this message.
Both ',N' and ',q' can be specified together.
- -T TYPE
-
Specifies how tolerant
smartd
should be of SMART command failures. The valid arguments to this
Directive are:
normal - do not try to monitor the disk if a mandatory SMART command fails, but continue if an optional SMART command fails. This is the default.
permissive - try to monitor the disk even if it appears to lack SMART capabilities. This may be required for some old disks (prior to ATA-3 revision 4) that implemented SMART before the SMART standards were incorporated into the ATA/ATAPI Specifications. This may also be needed for some Maxtor disks which fail to comply with the ATA Specifications and don't properly indicate support for error- or self-test logging.
[Please see the smartctl -T command-line option.]
- -o VALUE
-
[ATA only] Enables or disables SMART Automatic Offline Testing when
smartd
starts up and has no further effect.
The delay between tests is vendor-specific, but is typically four hours.
Note that SMART Automatic Offline Testing is not part of the ATA Specification. Please see the smartctl -o command-line option documentation for further information about this feature.
- -S VALUE
- Enables or disables Attribute Autosave when smartd starts up and has no further effect.  Also affects SCSI devices. [Please see the smartctl -S command-line option.]
- -H
- [ATA only] Check the SMART health status of the disk. If any Prefailure Attributes are less than or equal to their threshold values, then disk failure is predicted in less than 24 hours, and a message at loglevel 'LOG_CRIT' will be logged to syslog. [Please see the smartctl -H command-line option.]
- -l TYPE
-
Reports increases in the number of errors in one of three SMART logs. The
valid arguments to this Directive are:
error - [ATA only] report if the number of ATA errors reported in the Summary SMART error log has increased since the last check.
xerror - [ATA only] report if the number of ATA errors reported in the Extended Comprehensive SMART error log has increased since the last check.
If both '-l error' and '-l xerror' are specified, smartd checks the maximum of both values.
[Please see the smartctl -l xerror command-line option.]
selftest - report if the number of failed tests reported in the SMART Self-Test Log has increased since the last check, or if the timestamp associated with the most recent failed test has increased. Note that such errors will only be logged if you run self-tests on the disk (and it fails a test!). Self-Tests can be run automatically by smartd: please see the '-s' Directive below. Self-Tests can also be run manually by using the '-t short' and '-t long' options of smartctl and the results of the testing can be observed using the smartctl '-l selftest' command-line option. [Please see the smartctl -l and -t command-line options.]
[ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored. The warning email counter is reset if the number of failed self tests dropped to 0. This typically happens when an extended self-test is run after all bad sectors have been reallocated.
offlinests - [ATA only] report if the Offline Data Collection status has changed since the last check. The report will be logged as LOG_CRIT if the new status indicates an error. With some drives the status often changes, therefore '-l offlinests' is not enabled by '-a' Directive.
selfteststs - [ATA only] report if the Self-Test execution status has changed since the last check. The report will be logged as LOG_CRIT if the new status indicates an error.
scterc,READTIME,WRITETIME - [ATA only] [NEW EXPERIMENTAL SMARTD FEATURE] sets the SCT Error Recovery Control settings to the specified values (deciseconds) when smartd starts up and has no further effect. Values of 0 disable the feature, other values less than 65 are probably not supported. For RAID configurations, this is typically set to 70,70 deciseconds. [Please see the smartctl -l scterc command-line option.]
- -s REGEXP
-
Run Self-Tests or Offline Immediate Tests, at scheduled times. A
Self- or Offline Immediate Test will be run at the end of periodic
device polling, if all 12 characters of the string T/MM/DD/d/HH
match the extended regular expression REGEXP. Here:
-
- T
-
is the type of the test. The values that smartd will try to
match (in turn) are: 'L' for a Long Self-Test, 'S' for a
Short Self-Test, 'C' for a Conveyance Self-Test (ATA
only), and 'O' for an Offline Immediate Test (ATA only). As
soon as a match is found, the test will be started and no additional
matches will be sought for that device and that polling cycle.
To run scheduled Selective Self-Tests, use 'n' for next span, 'r' to redo last span, or 'c' to continue with next span or redo last span based on status of last test. The LBA range is based on the first span from the last test. See the smartctl -t select,[next|redo|cont] options for further info.
[NEW EXPERIMENTAL SMARTD FEATURE] Some disks (e.g. WD) do not preserve the selective self test log accross power cycles. If state persistence ('-s' option) is enabled, the last test span is preserved by smartd and used if (and only if) the selective self test log is empty.
- MM
- is the month of the year, expressed with two decimal digits. The range is from 01 (January) to 12 (December) inclusive. Do not use a single decimal digit or the match will always fail!
- DD
- is the day of the month, expressed with two decimal digits. The range is from 01 to 31 inclusive. Do not use a single decimal digit or the match will always fail!
- d
- is the day of the week, expressed with one decimal digit. The range is from 1 (Monday) to 7 (Sunday) inclusive.
- HH
- is the hour of the day, written with two decimal digits, and given in hours after midnight. The range is 00 (midnight to just before 1am) to 23 (11pm to just before midnight) inclusive. Do not use a single decimal digit or the match will always fail!
-
-
Some examples follow. In reading these, keep in mind that in extended
regular expressions a dot '.' matches any single character, and
a parenthetical expression such as '(A|B|C)' denotes any one of the three possibilities A,
B, or C.
To schedule a short Self-Test between 2-3am every morning, use:
-s S/../.././02
To schedule a long Self-Test between 4-5am every Sunday morning, use:-s L/../../7/04
To schedule a long Self-Test between 10-11pm on the first and fifteenth day of each month, use:-s L/../(01|15)/./22
To schedule an Offline Immediate test after every midnight, 6am, noon,and 6pm, plus a Short Self-Test daily at 1-2am and a Long Self-Test every Saturday at 3-4am, use:-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)
If Long Self-Tests of a large disks take longer than the system uptime, a full disk test can be performed by several Selective Self-Tests. To setup a full test of a 1TB disk within 20 days (one 50GB span each day), run this command once:smartctl -t select,0-99999999 /dev/sda
To run the next test spans on Monday-Friday between 12-13am, run smartd with this directive:-s n/../../[1-5]/12
Scheduled tests are run immediately following the regularly-scheduled device polling, if the current local date, time, and test type, match REGEXP. By default the regularly-scheduled device polling occurs every thirty minutes after starting smartd. Take caution if you use the '-i' option to make this polling interval more than sixty minutes: the poll times may fail to coincide with any of the testing times that you have specified with REGEXP. In this case the test will be run following the next device polling.
Before running an offline or self-test, smartd checks to be sure that a self-test is not already running. If a self-test is already running, then this running self test will not be interrupted to begin another test.
smartd will not attempt to run any type of test if another test was already started or run in the same hour.
To avoid performance problems during system boot, smartd will not attempt to run any scheduled tests following the very first device polling (unless '-q onecheck' is specified).
Each time a test is run, smartd will log an entry to SYSLOG. You can use these or the '-q showtests' command-line option to verify that you constructed REGEXP correctly. The matching order (L before S before C before O) ensures that if multiple test types are all scheduled for the same hour, the longer test type has precedence. This is usually the desired behavior.
If the scheduled tests are used in conjunction with state persistence ('-s' option), smartd will also try to match the hours since last shutdown (or 90 days at most). If any test would have been started during downtime, the longest (see above) of these tests is run after second device polling.
If the '-n' directive is used and any test would have been started during disk standby time, the longest of these tests is run when the disk is active again.
Unix users: please beware that the rules for extended regular expressions [regex(7)] are not the same as the rules for file-name pattern matching by the shell [glob(7)]. smartd will issue harmless informational warning messages if it detects characters in REGEXP that appear to indicate that you have made this mistake.
- -m ADD
-
Send a warning email to the email address ADD if the '-H',
'-l', '-f', '-C', or '-O' Directives detect a failure or a
new error, or if a SMART command to the disk fails. This Directive
only works in conjunction with these other Directives (or with the
equivalent default '-a' Directive).
To prevent your email in-box from getting filled up with warning messages, by default only a single warning will be sent for each of the enabled alert types, '-H', '-l', '-f', '-C', or '-O' even if more than one failure or error is detected or if the failure 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 "comma separated" form for the address: user1@add1,user2@add2,...,userN@addN (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 smartd startup.
By default, email is sent using the system mail command. In order that smartd find the mail command (normally /bin/mail) an executable named 'mail' must be in the path of the shell or environment from which smartd was started. If you wish to specify an explicit path to the mail executable (for example /usr/local/bin/mail) or a custom script to run, please use the '-M exec' Directive below.
Note also that there is a special argument <nomailer> which can be given to the '-m' Directive in conjunction with the '-M exec' Directive. Please see below for an explanation of its effect.
If the mailer or the shell running it produces any STDERR/STDOUT output, then a snippet of that output will be copied to SYSLOG. The remainder of the output is discarded. If problems are encountered in sending mail, this should help you to understand and fix them. If you have mail problems, we recommend running smartd in debug mode with the '-d' flag, using the '-M test' Directive described below.
- -M TYPE
-
These Directives modify the behavior of the
smartd
email 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 the following 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 following three):
once - send only one warning email for each type of disk problem detected. This is the default unless state persistence ('-s' option) is enabled.
daily - send additional warning reminder emails, once per day, for each type of disk problem detected. This is the default if state persistence ('-s' option) is enabled.
diminishing - send additional warning reminder emails, after a one-day interval, then a two-day interval, then a four-day interval, and so on for each type of disk problem detected. Each interval is twice as long as the previous interval.
If a disk problem is no longer detected, the internal email counter is reset. If the problem reappears a new warning email is sent immediately.
In addition, one may add zero or more of the following Directives:
test - send a single test email immediately upon smartd startup. This allows one to verify that email is delivered correctly. Note that if this Directive is used, smartd will also send the normal email warnings that were enabled with the '-m' Directive, in addition to the single test email!
exec PATH - run the executable PATH instead of the default mail command, when smartd needs to send email. PATH must point to an executable binary file or script.
By setting PATH to point to a customized script, you can make smartd perform useful tricks when a disk problem is detected (beeping the console, shutting down the machine, broadcasting warnings to all logged-in users, etc.) But please be careful. smartd will block until the executable PATH returns, so if your executable hangs, then smartd will also hang. Some sample scripts are included in /usr/share/doc/smartmontools/examplescripts/.
The return status of the executable is recorded by smartd in SYSLOG. The executable is not expected to write to STDOUT or STDERR. If it does, then this is interpreted as indicating that something is going wrong with your executable, and a fragment of this output is logged to SYSLOG to help you to understand the problem. Normally, if you wish to leave some record behind, the executable should send mail or write to a file or device.
Before running the executable, smartd sets a number of environment variables. These environment variables may be used to control the executable's behavior. The environment variables exported by smartd are:
-
- SMARTD_MAILER
- is set to the argument of -M exec, if present or else to 'mail' (examples: /bin/mail, mail).
- SMARTD_DEVICE
- is set to the device path (examples: /dev/hda, /dev/sdb).
- SMARTD_DEVICETYPE
- is set to the device type specified by '-d' directive or 'auto' if none.
- SMARTD_DEVICESTRING
- is set to the device description. For SMARTD_DEVICETYPE of ata or scsi, this is the same as SMARTD_DEVICE. For 3ware RAID controllers, the form used is '/dev/sdc [3ware_disk_01]'. For HighPoint RocketRAID controller, the form is '/dev/sdd [hpt_1/1/1]' under Linux or '/dev/hptrr [hpt_1/1/1]' under FreeBSD. For Areca controllers, the form is '/dev/sg2 [areca_disk_09]' on Linux or '/dev/arcmsr0 [areca_disk_09]' on FreeBSD. In these cases the device string contains a space and is NOT quoted. So to use $SMARTD_DEVICESTRING in a bash script you should probably enclose it in double quotes.
- SMARTD_FAILTYPE
-
gives the reason for the warning or message email. The possible values that
it takes and their meanings are:
EmailTest: this is an email test message.
Health: the SMART health status indicates imminent failure.
Usage: a usage Attribute has failed.
SelfTest: the number of self-test failures has increased.
ErrorCount: the number of errors in the ATA error log has increased.
CurrentPendingSector: one of more disk sectors could not be read and are marked to be reallocated (replaced with spare sectors).
OfflineUncorrectableSector: during off-line testing, or self-testing, one or more disk sectors could not be read.
Temperature: Temperature reached critical limit (see -W directive).
FailedHealthCheck: the SMART health status command failed.
FailedReadSmartData: the command to read SMART Attribute data failed.
FailedReadSmartErrorLog: the command to read the SMART error log failed.
FailedReadSmartSelfTestLog: the command to read the SMART self-test log failed.
FailedOpenDevice: the open() command to the device failed. - SMARTD_ADDRESS
- is determined by the address argument ADD of the '-m' Directive. If ADD is <nomailer>, then SMARTD_ADDRESS is not set. Otherwise, it is set to the comma-separated-list of email addresses given by the argument ADD, with the commas replaced by spaces<EMAIL_ADDRESS>root). If more than one email address is given, then this string will contain space characters and is NOT quoted, so to use it in a bash script you may want to enclose it in double quotes.
- SMARTD_MESSAGE
- is set to the one sentence summary warning email message string from smartd. This message string contains space characters and is NOT quoted. So to use $SMARTD_MESSAGE in a bash script you should probably enclose it in double quotes.
- SMARTD_FULLMESSAGE
- is set to the contents of the entire email warning message string from smartd. This message string contains space and return characters and is NOT quoted. So to use $SMARTD_FULLMESSAGE in a bash script you should probably enclose it in double quotes.
- SMARTD_TFIRST
-
is a text string giving the time and date at which the first problem
of this type was reported. This text string contains space characters
and no newlines, and is NOT quoted. For example:
Sun Feb 9 14:58:19 2003 CST - SMARTD_TFIRSTEPOCH
- is an integer, which is the unix epoch (number of seconds since Jan 1, 1970) for SMARTD_TFIRST.
-
-
The shell which is used to run PATH is system-dependent. For vanilla
Linux/glibc it's bash. For other systems, the man page for
popen(3) should say what shell is used.
If the '-m ADD' Directive is given with a normal address argument, then the executable pointed to by PATH will be run in a shell with STDIN receiving the body of the email message, and with the same command-line arguments:
-s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
that would normally be provided to 'mail'. Examples include:-m user@home -M exec /bin/mail -m admin@work -M exec /usr/local/bin/mailto -m root -M exec /Example_1/bash/script/below
If the '-m ADD' Directive is given with the special address argument <nomailer> then the executable pointed to by PATH is run in a shell with no STDIN and no command-line arguments, for example:
-m <nomailer> -M exec /Example_2/bash/script/below
If the executable produces any STDERR/STDOUT output, then smartd assumes that something is going wrong, and a snippet of that output will be copied to SYSLOG. The remainder of the output is then discarded.Some EXAMPLES of scripts that can be used with the '-M exec' Directive are given below. Some sample scripts are also included in /usr/share/doc/smartmontools/examplescripts/.
- -f
- [ATA only] Check for 'failure' of any Usage Attributes. If these Attributes are less than or equal to the threshold, it does NOT indicate imminent disk failure. It "indicates an advisory condition where the usage or age of the device has exceeded its intended design life period." [Please see the smartctl -A command-line option.]
- -p
- [ATA only] Report anytime that a Prefail Attribute has changed its value since the last check, 30 minutes ago. [Please see the smartctl -A command-line option.]
- -u
- [ATA only] Report anytime that a Usage Attribute has changed its value since the last check, 30 minutes ago. [Please see the smartctl -A command-line option.]
- -t
- [ATA only] Equivalent to turning on the two previous flags '-p' and '-u'. Tracks changes in all device Attributes (both Prefailure and Usage). [Please see the smartctl -A command-line option.]
- -i ID
-
[ATA only] Ignore device Attribute number ID when checking for failure
of Usage Attributes. ID must be a decimal integer in the range
from 1 to 255. This Directive modifies the behavior of the '-f'
Directive and has no effect without it.
This is useful, for example, if you have a very old disk and don't want to keep getting messages about the hours-on-lifetime Attribute (usually Attribute 9) failing. This Directive may appear multiple times for a single device, if you want to ignore multiple Attributes.
- -I ID
-
[ATA only] Ignore device Attribute ID when tracking changes in the
Attribute values. ID must be a decimal integer in the range
from 1 to 255. This Directive modifies the behavior of the '-p',
'-u', and '-t' tracking Directives and has no effect without one
of them.
This is useful, for example, if one of the device Attributes is the disk temperature (usually Attribute 194 or 231). It's annoying to get reports each time the temperature changes. This Directive may appear multiple times for a single device, if you want to ignore multiple Attributes.
- -r ID[!]
-
[ATA only] When tracking, report the Raw value of Attribute ID
along with its (normally reported) Normalized value. ID must
be a decimal integer in the range from 1 to 255. This Directive modifies
the behavior of the '-p', '-u', and '-t' tracking Directives
and has no effect without one of them. This Directive may be given
multiple times.
A common use of this Directive is to track the device Temperature (often ID=194 or 231).
If the optional flag '!' is appended, a change of the Normalized value is considered critical. The report will be logged as LOG_CRIT and a warning email will be sent if '-m' is specified.
- -R ID[!]
-
[ATA only] When tracking, report whenever the Raw value of Attribute
ID changes. (Normally smartd only tracks/reports changes
of the Normalized Attribute values.) ID must be a decimal
integer in the range from 1 to 255. This Directive modifies the
behavior of the '-p', '-u', and '-t' tracking Directives and
has no effect without one of them. This Directive may be given
multiple times.
If this Directive is given, it automatically implies the '-r' Directive for the same Attribute, so that the Raw value of the Attribute is reported.
A common use of this Directive is to track the device Temperature (often ID=194 or 231). It is also useful for understanding how different types of system behavior affects the values of certain Attributes.
If the optional flag '!' is appended, a change of the Raw value is considered critical. The report will be logged as LOG_CRIT and a warning email will be sent if '-m' is specified. An example is '-R 5!' to warn when new sectors are reallocated.
- -C ID[+]
-
[ATA only] Report if the current number of pending sectors is
non-zero. Here ID is the id number of the Attribute whose raw
value is the Current Pending Sector count. The allowed range of
ID is 0 to 255 inclusive. To turn off this reporting, use
ID = 0. If the -C ID option is not given, then it defaults to
-C 197 (since Attribute 197 is generally used to monitor
pending sectors). If the name of this Attribute is changed by a
'-v 197,FORMAT,NAME' directive, the default is changed to
-C 0.
If '+' is specified, a report is only printed if the number of sectors has increased between two check cycles. Some disks do not reset this attribute when a bad sector is reallocated. See also '-v 197,increasing' below.
The warning email counter is reset if the number of pending sectors dropped to 0. This typically happens when all pending sectors have been reallocated or could be read again.
A pending sector is a disk sector (containing 512 bytes of your data) which the device would like to mark as ``bad" and reallocate. Typically this is because your computer tried to read that sector, and the read failed because the data on it has been corrupted and has inconsistent Error Checking and Correction (ECC) codes. This is important to know, because it means that there is some unreadable data on the disk. The problem of figuring out what file this data belongs to is operating system and file system specific. You can typically force the sector to reallocate by writing to it (translation: make the device substitute a spare good sector for the bad one) but at the price of losing the 512 bytes of data stored there.
- -U ID[+]
-
[ATA only] Report if the number of offline uncorrectable sectors is
non-zero. Here ID is the id number of the Attribute whose raw
value is the Offline Uncorrectable Sector count. The allowed range of
ID is 0 to 255 inclusive. To turn off this reporting, use
ID = 0. If the -U ID option is not given, then it defaults to
-U 198 (since Attribute 198 is generally used to monitor
offline uncorrectable sectors). If the name of this Attribute is changed
by a '-v 198,FORMAT,NAME' (except '-v 198,FORMAT,Offline_Scan_UNC_SectCt'),
directive, the default is changed to -U 0.
If '+' is specified, a report is only printed if the number of sectors has increased since the last check cycle. Some disks do not reset this attribute when a bad sector is reallocated. See also '-v 198,increasing' below.
The warning email counter is reset if the number of offline uncorrectable sectors dropped to 0. This typically happens when all offline uncorrectable sectors have been reallocated or could be read again.
An offline uncorrectable sector is a disk sector which was not readable during an off-line scan or a self-test. This is important to know, because if you have data stored in this disk sector, and you need to read it, the read will fail. Please see the previous '-C' option for more details.
- -W DIFF[,INFO[,CRIT]]
-
Report if the current temperature had changed by at least DIFF
degrees since last report, or if new min or max temperature is detected.
Report or Warn if the temperature is greater or equal than one of
INFO or CRIT degrees Celsius.
If the limit CRIT is reached, a message with loglevel
'LOG_CRIT' will be logged to syslog and a warning email
will be send if '-m' is specified. If only the limit INFO is
reached, a message with loglevel 'LOG_INFO' will be logged.
The warning email counter is reset if the temperature dropped below INFO or CRIT-5 if INFO is not specified.
If this directive is used in conjunction with state persistence ('-s' option), the min and max temperature values are preserved across boot cycles. The minimum temperature value is not updated during the first 30 minutes after startup.
To disable any of the 3 reports, set the corresponding limit to 0. Trailing zero arguments may be omitted. By default, all temperature reports are disabled ('-W 0').
To track temperature changes of at least 2 degrees, use:
-W 2
To log informal messages on temperatures of at least 40 degrees, use:-W 0,40
For warning messages/mails on temperatures of at least 45 degrees, use:-W 0,0,45
To combine all of the above reports, use:-W 2,40,45
For ATA devices, smartd interprets Attribute 194 as Temperature Celsius by default. This can be changed to Attribute 9 or 220 by the drive database or by the '-v' directive, see below.
- -F TYPE
-
[ATA only] Modifies the behavior of smartd to compensate for
some known and understood device firmware bug. The arguments to this
Directive are exclusive, so that only the final Directive given is
used. The valid values are:
none - Assume that the device firmware obeys the ATA specifications. This is the default, unless the device has presets for '-F' in the device database.
samsung - In some Samsung disks (example: model SV4012H Firmware Version: RM100-08) some of the two- and four-byte quantities in the SMART data structures are byte-swapped (relative to the ATA specification). Enabling this option tells smartd to evaluate these quantities in byte-reversed order. Some signs that your disk needs this option are (1) no self-test log printed, even though you have run self-tests; (2) very large numbers of ATA errors reported in the ATA error log; (3) strange and impossible values for the ATA error log timestamps.
samsung2 - In some Samsung disks the number of ATA errors reported is byte swapped. Enabling this option tells smartd to evaluate this quantity in byte-reversed order.
samsung3 - Some Samsung disks (at least SP2514N with Firmware VF100-37) report a self-test still in progress with 0% remaining when the test was already completed. If this directive is specified, smartd will not skip the next scheduled self-test (see Directive '-s' above) in this case.
Note that an explicit '-F' Directive will over-ride any preset values for '-F' (see the '-P' option below).
[Please see the smartctl -F command-line option.]
- -v ID,FORMAT[:BYTEORDER][,NAME]
-
[ATA only] Sets a vendor-specific raw value print FORMAT, an optional
BYTEORDER and an optional NAME for Attribute ID.
This directive may be used multiple times.
Please see smartctl -v command-line option for further details.
The following arguments affect smartd warning output:
197,increasing - Raw Attribute number 197 (Current Pending Sector Count) is not reset if uncorrectable sectors are reallocated. This sets '-C 197+' if no other '-C' directive is specified.
198,increasing - Raw Attribute number 198 (Offline Uncorrectable Sector Count) is not reset if uncorrectable sector are reallocated. This sets '-U 198+' if no other '-U' directive is specified.
- -P TYPE
-
[ATA only] Specifies whether smartd should use any preset options
that are available for this drive.
The valid arguments to this Directive are:
use - use any presets that are available for this drive. This is the default.
ignore - do not use any presets for this drive.
show - show the presets listed for this drive in the database.
showall - show the presets that are available for all drives and then exit.
[Please see the smartctl -P command-line option.]
- -a
-
Equivalent to turning on all of the following Directives:
'-H'
to check the SMART health status,
'-f'
to report failures of Usage (rather than Prefail) Attributes,
'-t'
to track changes in both Prefailure and Usage Attributes,
'-l error'
to report increases in the number of ATA errors,
'-l selftest'
to report increases in the number of Self-Test Log errors,
'-l selfteststs'
to report changes of Self-Test execution status,
'-C 197'
to report nonzero values of the current pending sector count, and
'-U 198'
to report nonzero values of the offline pending sector count.
Note that -a is the default for ATA devices. If none of these other Directives is given, then -a is assumed.
- #
- Comment: ignore the remainder of the line.
- \
- Continuation character: if this is the last non-white or non-comment character on a line, then the following line is a continuation of the current one.
If you are not sure which Directives to use, I suggest experimenting for a few minutes with smartctl to see what SMART functionality your disk(s) support(s). If you do not like voluminous syslog messages, a good choice of smartd configuration file Directives might be:
-H -l selftest -l error -f.If you want more frequent information, use: -a.
- ADDITIONAL DETAILS ABOUT DEVICESCAN
-
If a non-comment entry in the configuration file is the text
string DEVICESCAN in capital letters, then smartd will
ignore any remaining lines in the configuration file, and will scan
for devices.
Configuration entries for devices not found by the platform-specific device scanning may precede the DEVICESCAN entry.
If DEVICESCAN is not followed by any Directives, then smartd will scan for both ATA and SCSI devices, and will monitor all possible SMART properties of any devices that are found.
DEVICESCAN may optionally be followed by any valid Directives, which will be applied to all devices that are found in the scan. For example
DEVICESCAN -m<EMAIL_ADDRESS>will scan for all devices, and then monitor them. It will send one email warning per device for any problems that are found.DEVICESCAN -d ata -m<EMAIL_ADDRESS>will do the same, but restricts the scan to ATA devices only.DEVICESCAN -H -d ata -m<EMAIL_ADDRESS>will do the same, but only monitors the SMART health status of the devices, (rather than the default -a, which monitors all SMART properties). - EXAMPLES OF SHELL SCRIPTS FOR '-M exec'
-
These are two examples of shell scripts that can be used with the '-M
exec PATH' Directive described previously. The paths to these scripts
and similar executables is the PATH argument to the '-M exec PATH'
Directive.
Example 1: This script is for use with '-m ADDRESS -M exec PATH'. It appends the output of smartctl -a to the output of the smartd email warning message and sends it to ADDRESS.
#! /bin/bash # Save the email message (STDIN) to a file: cat > /root/msg # Append the output of smartctl -a to the message: /usr/sbin/smartctl -a -d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg # Now email the message to the user at address ADD: /bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg
Example 2: This script is for use with '-m <nomailer> -M exec PATH'. It warns all users about a disk problem, waits 30 seconds, and then powers down the machine.
#! /bin/bash # Warn all users of a problem wall 'Problem detected with disk: ' "$SMARTD_DEVICESTRING" wall 'Warning message from smartd is: ' "$SMARTD_MESSAGE" wall 'Shutting down machine in 30 seconds... ' # Wait half a minute sleep 30 # Power down the machine /sbin/shutdown -hf now
Some example scripts are distributed with the smartmontools package, in /usr/share/doc/smartmontools/examplescripts/.
Please note that these scripts typically run as root, so any files that they read/write should not be writable by ordinary users or reside in directories like /tmp that are writable by ordinary users and may expose your system to symlink attacks.
As previously described, if the scripts write to STDOUT or STDERR, this is interpreted as indicating that there was an internal error within the script, and a snippet of STDOUT/STDERR is logged to SYSLOG. The remainder is flushed.
AUTHOR
Bruce Allen<EMAIL_ADDRESS>University of Wisconsin - Milwaukee Physics Department
CONTRIBUTORS
The following have made large contributions to smartmontools:Casper Dik (Solaris SCSI interface) Christian Franke (Windows interface, C++ redesign, USB support, ...) Douglas Gilbert (SCSI subsystem) Guido Guenther (Autoconf/Automake packaging) Geoffrey Keating (Darwin ATA interface) Eduard Martinescu (FreeBSD interface) Fr['e]d['e]ric L. W. Meunier (Web site and Mailing list) Gabriele Pohl (Web site and Wiki, conversion from CVS to SVN) Keiji Sawada (Solaris ATA interface) Manfred Schwarb (Drive database) Sergey Svishchev (NetBSD interface) David Snyder and Sergey Svishchev (OpenBSD interface) Phil Williams (User interface and drive database) Shengfeng Zhou (Linux/FreeBSD HighPoint RocketRAID interface)Many other individuals have made smaller contributions and corrections.
CREDITS
This code was derived from the smartsuite package, written by Michael Cornwell, and from the previous UCSC smartsuite package. It extends these to cover ATA-5 disks. This code was originally developed as a Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory (now part of the Storage Systems Research Center), Jack Baskin School of Engineering, University of California, Santa Cruz. http://ssrc.soe.ucsc.edu/ .HOME PAGE FOR SMARTMONTOOLS:
Please see the following web site for updates, further documentation, bug reports and patches: http://smartmontools.sourceforge.net/SEE ALSO:
smartd(8), smartctl(8), syslogd(8), syslog.conf(5), badblocks(8), ide-smart(8), regex(7).SVN ID OF THIS PAGE:
$Id: smartd.conf.5.in 3445 2011-10-12 21:53:02Z chrfranke $
Index
- NAME
- FULL PATH
- PACKAGE VERSION
- DESCRIPTION
- CONFIGURATION FILE /etc/smartd.conf
- CONFIGURATION FILE DIRECTIVES
- AUTHOR
- CONTRIBUTORS
- CREDITS
- HOME PAGE FOR SMARTMONTOOLS:
- SEE ALSO:
- SVN ID OF THIS PAGE:
This document was created by man2html, using the manual pages.
Time: 05:34:00 GMT, December 24, 2015


Essentially every programming language has built in syntax to allow the user to "loop" through a section of code. This process is useful when you need to iterate over every element in an array, or other data structure, or even to do something a certain number of times. When we boil down the reasons why we would want to loop through some chunk of code, we are left with basically two reasons: we want to do something UNTIL a condition is met, or we know ahead of time how many cycles we want to perform. This first type of loop is included in both JavaScript and Ruby as a "While" loop, and the second is called a "For" loop in JavaScript, while Ruby has several built in methods called enumerables for dealing with loops like this.
Lets say we wanted to print out a * character a certain number of times. We can implement this as either type of loop really, but in this example we will use a while loop. In JavaScript, the code to print out 5 * characters is:
> var num = 0; > while (num < 5) { > console.log("*"); > num ++; > }
The implementation is pretty simple: we define a counter variable, num and intialize to 0. In the while loop, the condition that is checked BEFORE each execution of the code is (num < 5). The block of code itself is inside the curly brackets and is pretty self explanitory. Another type of loop in JavaScript is the "Do" loop. It's essentially the same as While, except the condtion is checked AFTER the code is executed. In this way, you guarantee the code is always used once.
Now let's do the same code in Ruby:
> num = 0 > while num < 5 do > puts "*" > num += 1 > end
Again, we initialize a counter variable to 0, and increment it each time. In Ruby, the code block is everything between the keyword "do" and "end". Other than these syntactical differences, while loops are essentially the same in both languages.
> var array = [1,2,3,4,5,6,7,8,9,10] > for (var n = 0; n <= (array.length - 1); n++) { > console.log(array[n]); > }
Here, we are doing essentially the same thing as in the while loop, except the for loop declaration takes care of a lot of the work. In the first part, we define a new variable, n, and initialze it to zero. This is our looping counter. The next part is the stop condition, in this case array.length-1 = 9, the max index in the array. The final part, n++, tells JavaScript how to change n after each pass. For looping through structures like arrays, there is also an alternative syntax:
> var array = [1,2,3,4,5,6,7,8,9,10] > for (var n in array) { > console.log(array[n]); > }
Here, we just define our looping variable and use the in keyword to specify the structure we are looping trough, and JavaScript will automatically look at each element.
In Ruby, there isn't an explicit "for" loop. Ruby uses several built-in "enumerable methods" to accomplish these kind of tasks. See the Ruby Documentation for a full list of these methods. These methods can be used to loop through array or hash data structures. One of these methods is the Array#each method, which goes through each element of an array:
> array = [1,2,3,4,5,6,7,8,9,10] > array.each { |element| > puts element > }
In this code, we use the .each method, and define |element| as the looping variable. The code block is encapsulated in the curly brackets.


Endless Plains [an80], plain, in Imperia, peasants: 144
Last updated Turn #132
Endless Plains [an80], plain, in Imperia, peasants: 144
------------------------------------------------------------------------
10: Captain Kraken [k3k], Imperial Empire, earl, priest of the Church of
10: Halon [157], with 50 nazgul, arrived from the south, accompanied by:
10: Phantom III [d6x], Imperial Empire, priest of the Church of
10: Dol [153], with 13 nazgul
10: Veejay [v8j], Imperial Empire, Bishop of the Church of Ham [155],
10: with five angels
10: Goon III [b9v], Imperial Empire, Bishop of the Church of Dol [153],
10: with five angels, 37 hvy. xbowmen, six nazgul
10: Lord Rodrigo Bane [c8b], Imperial Empire, priest of the Church of
10: Dol [153], with ten workers, 50 hvy. xbowmen, five nazgul
10: Licia [i1l], Imperial Empire, Bishop of the Church of Ham [155],
10: with five angels, 50 hvy. xbowmen
10: Odin [y5z], Imperial Empire, with 55 hvy. xbowmen
10: Thorg [j8u], Imperial Empire, with one warmount
10: Jupiter [m8j], Imperial Empire, duke, the High Priest of the Church
10: of Halon [157], with ten angels, 52 hvy. xbowmen
10: Dryeth [q4e], Imperial Empire, priest of the Church of Dol [153],
10: with seven nazgul
10: Firefly [f3f], Imperial Empire, priest of the Church of
10: Halon [157], with 50 hvy. xbowmen
10: Sunwalker [a8x], Imperial Empire, earl, Bishop of the Church of
10: Halon [157], with five angels, 40 nazgul
10: Thomas [o5y], Imperial Empire, priest of the Church of Dol [153],
10: with 42 hvy. xbowmen, five nazgul
10: Alexei Galantor [j7l], Imperial Empire, earl, priest of the Church
10: of Halon [157], with 50 nazgul
10: Sir Peter [u9p], Imperial Empire, with 57 peasants
10: George [p7f], Imperial Empire, earl, priest of the Church of
10: Dol [153], with 29 nazgul
10: Lucca [h0t], Imperial Empire, priest of the Church of Halon [157],
10: with two skirmishers, 49 nazgul, eight soldiers
10: Johny [w2d], Imperial Empire, priest of the Church of Halon [157]
10: Osmosis [o2n], Imperial Empire, priest of the Church of
10: Halon [157], with 43 nazgul
10: Stefano [t8e], Imperial Empire, Bishop of the Church of
10: Halon [157], with five angels, two skirmishers, 50 nazgul,
10: eight soldiers
10: Sir Andrew [v9a], Imperial Empire, priest of the Church of
10: Halon [157], with seven soldiers, 47 nazgul
10: Sir Charles [j5r], Imperial Empire, priest of the Church of
10: Halon [157], with 45 nazgul
11: Captain Kraken [k3k], Imperial Empire, earl, priest of the Church of
11: Halon [157], with 50 nazgul, went east, accompanied by:
11: Phantom III [d6x], Imperial Empire, priest of the Church of
11: Dol [153], with 14 nazgul
11: Veejay [v8j], Imperial Empire, Bishop of the Church of Ham [155],
11: with five angels
11: Goon III [b9v], Imperial Empire, Bishop of the Church of Dol [153],
11: with five angels, 37 hvy. xbowmen, six nazgul
11: Lord Rodrigo Bane [c8b], Imperial Empire, priest of the Church of
11: Dol [153], with ten workers, 50 hvy. xbowmen, five nazgul
11: Licia [i1l], Imperial Empire, Bishop of the Church of Ham [155],
11: with five angels, 50 hvy. xbowmen
11: Odin [y5z], Imperial Empire, with 55 hvy. xbowmen
11: Thorg [j8u], Imperial Empire, with one warmount
11: Jupiter [m8j], Imperial Empire, duke, the High Priest of the Church
11: of Halon [157], with ten angels, 52 hvy. xbowmen
11: Dryeth [q4e], Imperial Empire, priest of the Church of Dol [153],
11: with eight nazgul
11: Firefly [f3f], Imperial Empire, priest of the Church of
11: Halon [157], with 50 hvy. xbowmen
11: Sunwalker [a8x], Imperial Empire, earl, Bishop of the Church of
11: Halon [157], with five angels, 40 nazgul
11: Thomas [o5y], Imperial Empire, priest of the Church of Dol [153],
11: with 42 hvy. xbowmen, six nazgul
11: Alexei Galantor [j7l], Imperial Empire, earl, priest of the Church
11: of Halon [157], with 50 nazgul
11: Sir Peter [u9p], Imperial Empire, with 57 peasants
11: George [p7f], Imperial Empire, earl, priest of the Church of
11: Dol [153], with 29 nazgul
11: Lucca [h0t], Imperial Empire, priest of the Church of Halon [157],
11: with one skirmisher, 49 nazgul, nine soldiers
11: Johny [w2d], Imperial Empire, priest of the Church of Halon [157]
11: Osmosis [o2n], Imperial Empire, priest of the Church of
11: Halon [157], with 43 nazgul
11: Stefano [t8e], Imperial Empire, Bishop of the Church of
11: Halon [157], with five angels, one skirmisher, 50 nazgul,
11: nine soldiers
11: Sir Andrew [v9a], Imperial Empire, priest of the Church of
11: Halon [157], with six soldiers, 47 nazgul, one hvy. xbowman
11: Sir Charles [j5r], Imperial Empire, priest of the Church of
11: Halon [157], with 45 nazgul
14: Stack of nazgul [gi6v], nazgul, number: 2, arrived from the west.
16: Stack of nazgul [gi6v], nazgul, number: 2, went east.
24: Stack of nazgul [gi6v], nazgul, number: 2, arrived from the east.
26: Stack of nazgul [gi6v], nazgul, number: 2, went west.
30: The population grows by one peasant.
Routes leaving Endless Plains:
North, to Ocean [am80], The Outer Sea, 2 days
East, plain, to Endless Plains [an81], 7 days
South, to Ocean [ao80], The Outer Sea, 2 days
West, plain, to Endless Plains [an79], 7 days
Seen here:
Stack of nazgul [hs1h], nazgul, number: 3


Christian Kahle
Home
About Me
Github
Raytracing
Home
About Me
Github
Raytracing
menu
Welcome
Feel free to explore my website!
Image photographed at Garden Of The Gods, Colorado.
Resources
About Me
Github
Raytracing
A standalone ray tracer programmed in java.
My Project
Image courtesy of Wikimedia Commons.
Contact Me
email
email
smartphone
phone
About Me
Learn more about me
Bio


Student Record Management System
A website for keeping students record safe..
Home
Login
Contact Us
About Us
Username
Password
Login
Remember me


public enum RegisterType
Represents the type of a register.
| Enum Constant and Description |
|---|
Calculation
A register that can be used for calculations and will be loaded
with some default value (given by a
interface DefaultValueProvider ). |
Constant
A register that is read-only and will be initialised with values
from a set of constants in the LGP environment.
|
Input
A register that contains input values from a data set instance.
|
Unknown
A register that does not fall in some known range will have unknown
type. This type primarily serves as a default case when mapping register
index ranges to register types.
|
public static RegisterType Input
A register that contains input values from a data set instance.
public static RegisterType Calculation
A register that can be used for calculations and will be loaded
with some default value (given by a interface DefaultValueProvider
).
interface DefaultValueProvider
public static RegisterType Constant
A register that is read-only and will be initialised with values from a set of constants in the LGP environment.
public static RegisterType Unknown
A register that does not fall in some known range will have unknown type. This type primarily serves as a default case when mapping register index ranges to register types.


Methods
-
string|null
-
string
-
string
Methods Details
-
public static function
get
(string $extension,variable $defaultValue)Returns a mime/type by file extension -
public static function
getForFile
(string $filename)Attempts to return a mime/type for a file -
public static function
getForHttp
(string $extension)Attempts to return a mime/type for an HTTP response


A SINGLE GIRL (LA FILLE SEULE) A film review by James Berardinelli Copyright 1997 James Berardinelli
RATING (0 TO 10): 8.0 Alternative Scale: ***1/2 out of ****
France, 1995 U.S. Release Date: variable; early 1997 (limited) Running Length: 1:30 MPAA Classification: No MPAA Rating (Mature themes, sexual situations, profanity) Theatrical Aspect Ratio: 1.85:1
Cast: Virginie Ledoyen, Benoit Magimel, Dominique Valadie, Vera Briole Director: Benoit Jacquot Producers: Philippe Carcassonne, Brigitte Faure Screenplay: Benoit Jacquot, Jerome Beaujour Cinematography: Caroline Champetier U.S. Distributor: Strand Releasing In French with subtitles
Rarely has any film so accurately and effectively captured the essence of a human being -- the look, the feel, the mannerisms, the vocal inflections. Benoit Jacquot's A SINGLE GIRL isn't a typical motion picture in any sense. Narrative is curtailed in favor of pure character development, and the result is akin to suspending your own life for ninety minutes and spending that time living in someone else's skin. It's extremely unusual for a director, actress, and writer to bring an audience into such a close rapport with a character.
A SINGLE GIRL shows us seventy-five ordinary minutes in the life of Valerie (Virginie Ledoyen), a young woman who's beginning a new job as a room service waitress at a Paris hotel. She's four weeks pregnant, and has just informed her boyfriend, Remi (Benoit Magimel). Her life is at a watershed: does she continue in a strained relationship with him that may lead to discord and abandonment, or does she make a clean break now and attempt to raise the baby on her own? This is the question that preys upon her mind as she gets to know her co-workers and experiences the ups and downs of the morning room service rush.
Not once in seventy-five minutes does Jacquot's film transition away from Valerie or jump forward in time. It is strictly chronological, presenting a minute in real time as a minute in screen action. The camera follows Valerie's every move, no matter how mundane. She's shown walking down streets and through the halls of the hotel, riding elevators, and stealing a moment for a quick smoke. She's not just in every scene, she's in practically every frame.
Yet, even though the voyeuristic perspective of the camera allows us intimate access to Valerie's thoughts and actions, it is not invasive, nor is it interested in exploitation. For example, during a scene when she changes her clothes in a locker room, the camera cuts to her face, passing up the opportunity to peer at her topless body. This scene clearly indicates what the director's motives are (and aren't) in telling this particular story in this manner.
The quiet, intense realism of Virginie Ledoyen's (the daughter in LA CEREMONIE) performance is one of the paramount reasons for A SINGLE GIRL's unqualified success. Not only does Ledoyen have a pleasant countenance for the camera to dote upon longingly, but she's a shrewd actress who understands the importance of details in making the character real. There are numerous occasions when we understand Valerie's mindset and intentions as a result of some subtle action: a gesture, an expression, or a mannerism. Yes, Ledoyen is beautiful, but it's her aptitude, not her comeliness, that draws us in.
A SINGLE GIRL concludes with a fifteen minute epilogue that takes place some three years after the bulk of the film. It's a nice addition that offers a sense of closure to the story and answers many of the questions that couldn't have been resolved had Jacquot decided to restrict the entire movie to one time-frame. The Valerie we meet in this future segment is a more mature, secure woman, but much of the same tempestuousness and obstinacy are still evident. It's a credit to everyone involved that the growth and change of several years can be conveyed in such a relatively short sequence.
When a character study fails, it is, more often than not, because the audience never really connects with the film's protagonist. This is a flaw that never plagues A SINGLE GIRL, because Jacquot bends all of his film making talents to forging a deep link. As a result, even though nothing much happens during the course of the movie (Valerie spends over half the running time wandering around the inside of a hotel), this is a thoroughly engrossing motion picture. This is one single girl I wouldn't mind spending more time with.
- James Berardinelli e-mail<EMAIL_ADDRESS>ReelViews web site: http://www.cybernex.net/~berardin
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Composition and Inheritance
Prefer composition over inheritance
Software mantras can often lead developers into believing that design philosphies are laws that cannot be broken. In particular, favoring composition over inheritance tends to often be morphed into ‘never inheritance.’ And while this may be a backlash to generations of programs that caused developers to experience a kind of pain that can only be brought about by the intense coupling created by misapplying inheritance, the mantra is surprisingly robust, and has few exceptions.
Composition is Natural
How to break a problem down in order to build a solution up
Composition tends to align well with how humans like to understand the natural world. When we encounter a complex problem, a proven approach throughout history is to ask, ‘Can we break this into smaller, approachable pieces?’ This is the take smaller bites until you can chew approach. Composition allows us to gradually build up objects in our mind and creates clear delineations that allow for magical properties like the ability to test small units and their interactions with one another.
Composition in the Analog World
Creating software without the use of composition would be like trying to reason about a car as one mass entity. When dealing with the complexities of an automobile it helps to think in terms of its subsquent parts. And even those subsequent parts can be broken down further. An engine is responsible for turning a drive shaft. But an engine is made up of, among other things, a fuel injector for creating aerosolized gasoline, a spark plug for igniting the aerosol, and cylinders inside of pistons to take advantage of the force generated by the subsequent explosion.
Breaking the engine down into it’s components allows us not just to reason about how it works, but reason about how to design it in the first place. Instead of asking how to rotate a drive shaft we can ask, how can I efficiently create a force, and how can I use the force to accomplish a rotation. Someone answered “small explosions” and the rest is history.
Composition in the Digital World
When building a game like Tic Tac Toe composition plays a simlar role in reasoning about how to break a problem down in order to build a solution up. If we simply think of tic tac toe as a game with rules we have no idea where to start building a solution. But by breaking it down we can start to reason about the various components in play. The game takes place on a board. There are players that wield symbols. The game has rules, and so on. Each of these individual pieces may also be composed of smaller, more digestable (and testable!) pieces.
Composition also promotes the use of polymorphism and duck typing to provide a variety of behaviors that can be injected as dependencies into higher level classes that expect a certain interface. These concepts promote generalized and robust solutions that follow another useful mantra of software design.
Code to an interface, not an implementation
So with all of this praise for composition, are there use cases for inheritance, or is it an old dinosaur of software design mucking up the compilers of enterprise loved languages like Java and C#?
The Dark Art of Inheritance
Inheritance provides a syntax supported, directed way to share behavior between classes. Inheritance achieves this by providing automatic message forwarding. Inheritance functions by allowing developers to create subclass-superclass relationships, or more naturally, parent-child relationships. Children of superclasses inherit all of the behavior of the parent class, and add their own behavior into the mix. With this inheritance comes the responsibility to anticipate changes to the parent classes interface and thus the problems emerge.
Inheritance creates strong coupling between the parent and child
Whenever changes to the parent classes public interface are performed, all child classes must be altered to accomodate the change. This means that developers must be extremely careful to manage their dependencies. Superclasses should only be abstracted when they are unlikely to change. From a similar perspective, if adhering to the dependency inversion principle, superclasses should be less likely to change than their children. In addition, because children inherit all of the public behavior of their parent, if we are to adhere to the Liskov substitution principle, we should only abstract superclasses when we are sure that the superclass behavior will be shared and used by all of it’s children.
So with a careful mindset, when should we proceed forward with the decision to utilize the seemingly dark art of inheritance?
Inheritance is special
Inheritance can be extremely useful when we desire specialization. If we discover that we have a class that has a single responsibility and our goal is to make a variety of different variations on that class that will all utilize the behavior provided by our SRP abiding parent, we have a strong argument to apply inheritance.
The trick is to recognize when our classes are specializations of a generalization, and not when we simply want to share some behavior between classes.
Inheritance is a feature in many programming languages because it is useful to employ hierarchies when building data types. In Ruby, everything is an object. Whether it is a string or an integer, every value is an object and therefore is imbued with behavior. This provides a classic use case for inheritance, where it provides consistency and a clear direction for the relationships among classes. All data types in Ruby forward messages that cannot be found within their own handlers to their superclass. This allowed the designers of the language to provide common behavior to every data type in Ruby, and model everything as objects.
Prefer is a Powerful Word
Inheritance can be powerful when employed correctly, but it’s defacto usage for decades and the subsequent pain caused by the strong coupling it introduces have given developers a mantra that makes sense. Composition is a natural and unbelievably powerful technique to approach problems and build beautiful decoupled applications. But the word prefer should not be forgotten, and when we need nothing more than specialization, we should look to inheritance for assistance.


Overview
So the longest 3 months for the premier league was over this weekend. The fairytale start for some team and nightmares for some other was the talking point of this gameweek. So here we are with a look at each team's performance and their next moves.
A.F.C Bournemouth
So the promoted side ended up on the losing side against a new look Aston Villa team but there were a lot of positives to take. Good attaking sides chances being created are excellent just the final finishing is the thing which is being missed dearly. Early days so there are more tough teams to face so got to buck up quickly to the new surroundings.
Arsenal
The worst start Arsenal would have ever imagined after the success over defending champ Chelsea in the Community Shield. The 2-0 loss just showed that they have a lot of departments to work on. Cech might just have to regain his prime and defenders too have to do a better marking.Attack was good copared to the defense but a poacher is what the team needs right now.
Aston Villa
3 Points in the bag already.But still they have to face stronger opponents so attack needs to be ore precise.with the good form of Guzan it's pretty much tough for opponent to sore past him.The new team has to bring in the co ordination eve faster as the premier league has started too soon.
Chelsea
So the defending champions were very strong on the attacks and counter attack but maybe they just lost their greatest strength "THE BUS" which was very well exploited by shelvey and company who scored two past them. Although the red card and the penalty issue was a bit harsh still then you just can't forgive the mistakes made by terry with Manchester City knocking at the door it would be intersting to see "special one's" tatis and changes.
Crystal Palace
The form from the end of the last season has continued....Puncheon the most creative player for them last season did create chances which were taken well by his team mates...New signing Cabaye did not dissapoint the new fans too..the team looks good for the future.
Everton
They did share the points with Watford but oh my boy the match was by far the most entertaing match of the week..drama,action and comeback.although they conceeded too early but fought back to make it level.Ross Barkley's form is an onus for the team but defense need to tighten up soon.
Leichester City
The best way the new manager could have dreamt of debuting..Maharez sored two with Albrighton assisting twice showed their attack is as strong as it was in the latter half of the previous season..switched off their defense in the second half which allowed Sunderland to save their pride.
Liverpool
So everyone did expect to see what the new signings had in store for the team.With a new captain in Henderson the team looked quiet average with no lot of chances being created.A lot will be expected of Benteke while Coutinho has already shown his class.A win to start for the new look team might be a boost for them.
Manchester City
The best start for the contender.3-0 win with a boost as ain man Yaya Toure did come in form and the tea looked too stable and attacking.with City aiming to sign De Bruyne it would be great to see how the tea keeps attaking against the big guns.
Manchester United
The first win for them via own goal was not the idle start Van Gaal would have expected of his strong team.Although a lot of plus point from the match were there for them..The first being Darmian who was the best layer of the match with Mephis playing well too.Let's see how do they now take up much weaker teas as compared to Spurs.
Newcastle United
A well fought draw against Southampton which was really well applauded by the crowd was the way Newcastle began their journey this season.Newcastle promise to be infinitely more attractive to watch than last season, with Georginio Wijnaldum and Chancel Mbemba looking very good signings. Less positively, Fabricio Coloccini was, not for the first time, far from convincing, while Aleksander Mitrovic appears to be a young man potentially in need of Alan Pardew\rquote s old anger management counsellor.The passing was of a bit high order and intelligent which is the plus point they can take from the first gameweek.
Norwich City
Promoted club do find it tough to adapt to the tougher Premier league..And it was exatly the same case for the Canaries who found it tough to face the prolific attack of Crystal Palace.Yeah they could complain of the big decisions that went against them but you just can't take away the success from Crystal.Attack and defense both need to buck up to prevent relegation zone finish.
Southampton
Pelle and Long were on the scoresheet for the saints as they drew level with Newcastle.The attack was stupendous which was greatly shown by a glancing header from Pelle.What they have to guard against is the counter attacks which might tear their defense apart.
Stoke City
It might had been a great weekend for them had Coutinho hadn' delivered the stunner to seal it for Liverpool.the defense was quite good with midfield playing a bit of a holding game.They might just be stronger then ever with the arrival of Shaqiri.
Sunderland
A real poor show which could had been even worse ha they didn't score the 2 goals near the end of the match.They were just clueless against the attacks which shows the department they have to work upon before the season gets tougher for them.
Swansea City
< p>The best team of 2015 did find it real hard to deal with the attacks of Swansea..Shelvey did provide lot of good passes in the area,playing deep balls.Had Gomis didn't miss the one on one chance it had been a different story altogether.Defense wasn't totally at it's best but they should be pretty happy with the performance they showed.Tottenham Hotspurs
Yeah they lost in what can be said one of the most boring match of the weekend.The tea looks too dependent on Kane and Eriksen which is not a good sign at all considering the fact they do have a quality mid.Never mind they an just take this defeat as a inspiration to grow better as eague progresses.
Watford
The best surprise team of the promoted clubs.Their game was a treat to watch as captain Deeney led the team to respectful 2-2 draw against Everton.The attack looks the strength of the team but defense needs to work up on.the team as a whole looks promising enough to struggle hard for surviva in premier league.
West Bromwich Albion
Well you don't expect to start well enough when you face an attacking Manchester City.With likes of Lescott,Lambert,Berhaino and Fletcher we expect them to come out all guns blazzing against the next opponents.
West Ham United
All thanks Cech West Ham went of to a flyer by winning against favourites Arsenal.Although Arsenal played quite aggresively but West Ham did manage to somehow avoid it.With confidence on sky high we do hope the level of theirs to increase.


This website was inspired by a checklist sent to me by my friend Taylor to help keep people mentally, physically, and spiritually well while in quarantine during the Covid-19 pandemic.
You're doing great!