{
    "content": [
        {
            "type": "text",
            "text": "# smartd (man)\n\n## NAME\n\nsmartd - SMART Disk Monitoring Daemon\n\n## DESCRIPTION\n\n[This man page is generated for the Linux version of smartmontools.  It does not contain info\nspecific to other platforms.]\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS** (1 subsections)\n- **DESCRIPTION**\n- **OPTIONS** (16 subsections)\n- **EXAMPLES** (3 subsections)\n- **CONFIGURATION**\n- **NOTES** (1 subsections)\n- **LOG TIMESTAMP TIMEZONE**\n- **EXIT STATUS** (1 subsections)\n- **FILES** (3 subsections)\n- **AUTHORS**\n- **REPORTING BUGS**\n- **SEE ALSO**\n- **REFERENCES**\n- **PACKAGE VERSION**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "smartd",
        "section": "",
        "mode": "man",
        "summary": "smartd - SMART Disk Monitoring Daemon",
        "synopsis": "",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-A",
                "long": "--attributelog",
                "arg": "PREFIX",
                "description": "Writes smartd attribute information (normalized and raw attribute values) to files 'PREFIX''MODEL-SERIAL.ata.csv' or 'PREFIX''VENDOR-MODEL-SERIAL.scsi.csv'. At each check cycle attributes are logged as a line of semicolon separated triplets of the form \"attribute-ID;attribute-norm-value;attribute-raw-value;\". For SCSI devices error counters and temperature recorded in the form \"counter-name;counter-value;\". Each line is led by a date string of the form \"yyyy-mm-dd HH:MM:SS\" (in UTC). If this option is not specified, attribute information is written to files '/var/lib/smartmontools/attrlog.MODEL-SERIAL.ata.csv'. To disable attribute log files, specify this option with an empty string argument: '-A \"\"'. MODEL and SERIAL are build from drive identify information, invalid characters are replaced by under‐ line. If the PREFIX has the form '/path/dir/' (e.g. '/var/lib/smartd/'), then files 'MODEL-SERIAL.ata.csv' are created in directory '/path/dir'. If the PREFIX has the form '/path/name' (e.g. '/var/lib/misc/attrlog-'), then files 'nameMODEL-SE‐ RIAL.ata.csv' are created in directory '/path/'. The path must be absolute, except if debug mode is enabled."
            },
            {
                "flag": "-B",
                "long": "--drivedb",
                "arg": "[+]FILE",
                "description": "[ATA only] Read the drive database from FILE. The new database replaces the built in database by default. If '+' is specified, then the new entries prepend the built in entries. Please see the smartctl(8) man page for further details."
            },
            {
                "flag": "-c",
                "long": "--configfile",
                "arg": "FILE",
                "description": "Read smartd configuration Directives from FILE, instead of from the default location /etc/smartd.conf (Windows: EXEDIR/smartd.conf). If FILE does not exist, then smartd will print an error message and exit with nonzero status. Thus, '-c /etc/smartd.conf' can be used to verify the existence of the default configuration file. By using '-' for FILE, the configuration is read from standard input. This is useful for commands like: echo /dev/sdb -m user@home -M test | smartd -c - -q onecheck to perform quick and simple checks without a configuration file."
            },
            {
                "flag": "-C",
                "long": "--capabilities",
                "arg": null,
                "description": "[Linux only] Use libcap-ng to drop unneeded Linux process capabilities(7). The fol‐ lowing capabilities are kept: CAPSYSADMIN, CAPSYSRAWIO, CAPMKNOD. Warning: Mail notification does not work when used."
            },
            {
                "flag": "-d",
                "long": "--debug",
                "arg": null,
                "description": "Runs smartd in \"debug\" mode. In this mode, it displays status information to STDOUT rather than logging it to SYSLOG and does not fork(2) into the background and detach from the controlling terminal. In this mode, smartd also prints more verbose informa‐ tion about what it is doing than when operating in \"daemon\" mode. In this mode, the INT signal (normally generated from a terminal with CONTROL-C) makes smartd reload its configuration file. Please use CONTROL-\\ to exit"
            },
            {
                "flag": "-D",
                "long": "--showdirectives",
                "arg": null,
                "description": "Prints a list (to STDOUT) of all the possible Directives which may appear in the con‐ figuration file /etc/smartd.conf, and then exits. These Directives are described in the smartd.conf(5) man page. They may appear in the configuration file following the device name."
            },
            {
                "flag": "-h",
                "long": "--usage",
                "arg": null,
                "description": "Prints usage message to STDOUT and exits."
            },
            {
                "flag": "-i",
                "long": "--interval",
                "arg": "N",
                "description": "Sets the interval between disk checks to N seconds, where N is a decimal integer. The minimum allowed value is ten and the maximum is the largest positive integer that can be represented on your system (often 2^31-1). The default is 1800 seconds. Note that the superuser can make smartd check the status of the disks at any time by sending it the SIGUSR1 signal, for example with the command: kill -SIGUSR1 <pid> where <pid> is the process id number of smartd. One may also use: killall -USR1 smartd for the same purpose."
            },
            {
                "flag": "-l",
                "long": "--logfacility",
                "arg": "FACILITY",
                "description": "Uses syslog facility FACILITY to log the messages from smartd. Here FACILITY is one of local0, local1, ..., local7, or daemon [default]. If this command-line option is not used, then by default messages from smartd are logged to the facility daemon. If you would like to have smartd messages logged somewhere other than the default lo‐ cation, include (for example) '-l local3' in its start up argument list. Tell the syslog daemon to log all messages from facility local3 to (for example) '/var/log/smartd.log'. For more detailed information, please refer to the man pages for the local syslog dae‐ mon, typically syslogd(8), syslog-ng(8) or rsyslogd(8)."
            },
            {
                "flag": "-n",
                "long": "--no-fork",
                "arg": null,
                "description": "Do not fork into background; this is useful when executed from modern init methods like initng, minit, supervise or systemd."
            },
            {
                "flag": "-p",
                "long": "--pidfile",
                "arg": "NAME",
                "description": "Writes pidfile NAME containing the smartd Process ID number (PID). To avoid symlink attacks make sure the directory to which pidfile is written is only writable for root. Without this option, or if the --debug option is given, no PID file is written on startup. If smartd is killed with a maskable signal then the pidfile is removed."
            },
            {
                "flag": "-q",
                "long": "--quit",
                "arg": "WHEN",
                "description": "Specifies when, if ever, smartd should exit. The valid arguments are to this option are: nodev - Exit if there are no devices to monitor, or if any errors are found at startup in the configuration file. errors - Exit if there are no devices to monitor, or if any errors are found in the configuration file /etc/smartd.conf at startup or whenever it is reloaded. nodevstartup - Exit if there are no devices to monitor at startup. But continue to run if no devices are found whenever the configuration file is reloaded. never - Only exit if a fatal error occurs (no remaining system memory, invalid command line arguments). In this mode, even if there are no devices to monitor, or if the configuration file /etc/smartd.conf has errors, smartd will continue to run, waiting to load a configuration file listing valid devices. This is the default. onecheck - Start smartd in debug mode, then register devices, then check device's SMART status once, and then exit with zero exit status if all of these steps worked correctly. This last option is intended for 'distribution-writers' who want to create automated scripts to determine whether or not to automatically start up smartd after installing smartmontools. After starting smartd with this command-line option, the distribu‐ tion's install scripts should wait a reasonable length of time (say ten seconds). If smartd has not exited with zero status by that time, the script should send smartd a SIGTERM or SIGKILL and assume that smartd will not operate correctly on the host. Conversely, if smartd exits with zero status, then it is safe to run smartd in normal daemon mode. If smartd is unable to monitor any devices or encounters other problems then it will return with non-zero exit status. showtests - Start smartd in debug mode, then register devices, then write a list of future scheduled self tests to stdout, and then exit with zero exit status if all of these steps worked correctly. Device's SMART status is not checked. This option is intended to test whether the '-s REGEX' directives in smartd.conf will have the desired effect. The output lists the next test schedules, limited to 5 tests per type and device. This is followed by a summary of all tests of each device within the next 90 days."
            },
            {
                "flag": "-r",
                "long": "--report",
                "arg": "TYPE",
                "description": "Intended primarily to help smartmontools developers understand the behavior of smart‐‐ montools on non-conforming or poorly-conforming hardware. This option reports details of smartd transactions with the device. The option can be used multiple times. When used just once, it shows a record of the ioctl() transactions with the device. When used more than once, the detail of these ioctl() transactions are reported in greater detail. The valid arguments to this option are: ioctl - report all ioctl() transactions. ataioctl - report only ioctl() transactions with ATA devices. scsiioctl - report only ioctl() transactions with SCSI devices. nvmeioctl - report only ioctl() transactions with NVMe devices. Any argument may include a positive integer to specify the level of detail that should be reported. The argument should be followed by a comma then the integer with no spa‐ ces. For example, ataioctl,2 The default level is 1, so '-r ataioctl,1' and '-r ataioctl' are equivalent."
            },
            {
                "flag": "-s",
                "long": "--savestates",
                "arg": "PREFIX",
                "description": "Reads/writes smartd state information from/to files 'PREFIX''MODEL-SERIAL.ata.state' or 'PREFIX''VENDOR-MODEL-SERIAL.scsi.state'. This preserves SMART attributes, drive min and max temperatures (-W directive), info about last sent warning email (-m direc‐ tive), and the time of next check of the self-test REGEXP (-s directive) across boot cycles. If this option is not specified, state information is maintained in files '/var/lib/smartmontools/smartd.MODEL-SERIAL.ata.state' for ATA devices and '/var/lib/smartmontools/smartd.VENDOR-MODEL-SERIAL.scsi.state' for SCSI devices. To disable state files, specify this option with an empty string argument: '-s \"\"'. MODEL and SERIAL are build from drive identify information, invalid characters are re‐ placed by underline. If the PREFIX has the form '/path/dir/' (e.g. '/var/lib/smartd/'), then files 'MODEL-SERIAL.ata.state' are created in directory '/path/dir'. If the PREFIX has the form '/path/name' (e.g. '/var/lib/misc/smartd-'), then files 'nameMODEL-SE‐ RIAL.ata.state' are created in directory '/path/'. The path must be absolute, except if debug mode is enabled. The state information files are read on smartd startup. The files are always (re)written after reading the configuration file, before rereading the configuration file (SIGHUP), before smartd shutdown, and after a check forced by SIGUSR1. After a normal check cycle, a file is only rewritten if an important change (which usually re‐ sults in a SYSLOG output) occurred."
            },
            {
                "flag": "-w",
                "long": "--warnexec",
                "arg": "PATH",
                "description": "Run the executable PATH instead of the default script when smartd needs to send warn‐ ing messages. PATH must point to an executable binary file or script. The default script is /usr/share/smartmontools/smartdwarning.sh."
            },
            {
                "flag": "-V",
                "long": "--copyright",
                "arg": null,
                "description": "Prints version, copyright, license, home page and SVN revision information for your copy of smartd to STDOUT and then exits."
            }
        ],
        "examples": [
            "Runs the daemon in forked mode.  This is the normal way to run smartd.  Entries are logged to",
            "SYSLOG.",
            "Run in foreground (debug) mode, checking the disk status every 30 seconds.",
            "Registers devices, and checks the status of the devices exactly once.  The exit  status  (the",
            "shell $?  variable) will be zero if all went well, and nonzero if no devices were detected or",
            "some other problem was encountered."
        ],
        "see_also": [
            {
                "name": "smartd.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/smartd.conf/5/json"
            },
            {
                "name": "smartctl",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/smartctl/8/json"
            },
            {
                "name": "update-smart-drivedb",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/update-smart-drivedb/8/json"
            },
            {
                "name": "systemd.exec",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.exec/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "smartd [options]",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 63,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-A PREFIX, --attributelog=PREFIX",
                        "lines": 19,
                        "flag": "-A",
                        "long": "--attributelog",
                        "arg": "PREFIX"
                    },
                    {
                        "name": "-B [+]FILE, --drivedb=[+]FILE",
                        "lines": 4,
                        "flag": "-B",
                        "long": "--drivedb",
                        "arg": "[+]FILE"
                    },
                    {
                        "name": "-c FILE, --configfile=FILE",
                        "lines": 10,
                        "flag": "-c",
                        "long": "--configfile",
                        "arg": "FILE"
                    },
                    {
                        "name": "-C, --capabilities",
                        "lines": 5,
                        "flag": "-C",
                        "long": "--capabilities"
                    },
                    {
                        "name": "-d, --debug",
                        "lines": 7,
                        "flag": "-d",
                        "long": "--debug"
                    },
                    {
                        "name": "-D, --showdirectives",
                        "lines": 5,
                        "flag": "-D",
                        "long": "--showdirectives"
                    },
                    {
                        "name": "-h, --help, --usage",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--usage"
                    },
                    {
                        "name": "-i N, --interval=N",
                        "lines": 11,
                        "flag": "-i",
                        "long": "--interval",
                        "arg": "N"
                    },
                    {
                        "name": "-l FACILITY, --logfacility=FACILITY",
                        "lines": 12,
                        "flag": "-l",
                        "long": "--logfacility",
                        "arg": "FACILITY"
                    },
                    {
                        "name": "-n, --no-fork",
                        "lines": 3,
                        "flag": "-n",
                        "long": "--no-fork"
                    },
                    {
                        "name": "-p NAME, --pidfile=NAME",
                        "lines": 5,
                        "flag": "-p",
                        "long": "--pidfile",
                        "arg": "NAME"
                    },
                    {
                        "name": "-q WHEN, --quit=WHEN",
                        "lines": 40,
                        "flag": "-q",
                        "long": "--quit",
                        "arg": "WHEN"
                    },
                    {
                        "name": "-r TYPE, --report=TYPE",
                        "lines": 20,
                        "flag": "-r",
                        "long": "--report",
                        "arg": "TYPE"
                    },
                    {
                        "name": "-s PREFIX, --savestates=PREFIX",
                        "lines": 25,
                        "flag": "-s",
                        "long": "--savestates",
                        "arg": "PREFIX"
                    },
                    {
                        "name": "-w PATH, --warnexec=PATH",
                        "lines": 4,
                        "flag": "-w",
                        "long": "--warnexec",
                        "arg": "PATH"
                    },
                    {
                        "name": "-V, --version, --license, --copyright",
                        "lines": 4,
                        "flag": "-V",
                        "long": "--copyright"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "smartd",
                        "lines": 3
                    },
                    {
                        "name": "smartd -d -i 30",
                        "lines": 2
                    },
                    {
                        "name": "smartd -q onecheck",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "CONFIGURATION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 7,
                "subsections": [
                    {
                        "name": "[Raw 23]'",
                        "lines": 15
                    }
                ]
            },
            {
                "name": "LOG TIMESTAMP TIMEZONE",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 32,
                "subsections": [
                    {
                        "name": "132 and above",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "/usr/sbin/smartd",
                        "lines": 2
                    },
                    {
                        "name": "/etc/smartd.conf",
                        "lines": 10
                    },
                    {
                        "name": "/var/lib/smartmontools/drivedb/drivedb.h",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "AUTHORS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "REFERENCES",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "PACKAGE VERSION",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "smartd - SMART Disk Monitoring Daemon\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "",
                "subsections": [
                    {
                        "name": "smartd [options]",
                        "content": ""
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "[This man page is generated for the Linux version of smartmontools.  It does not contain info\nspecific to other platforms.]\n\nsmartd is a daemon that monitors  the  Self-Monitoring,  Analysis  and  Reporting  Technology\n(SMART) system built into most ATA/SATA and SCSI/SAS hard drives and solid-state drives.  The\npurpose of SMART is to monitor the reliability of the hard drive and predict drive  failures,\nand  to  carry out different types of drive self-tests.  This version of smartd is compatible\nwith ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards (see REFERENCES below).\n\nsmartd will attempt to enable SMART monitoring on ATA devices (equivalent to smartctl -s  on)\nand  polls  these  and SCSI devices every 30 minutes (configurable), logging SMART errors and\nchanges of SMART Attributes via the SYSLOG interface.  The default location for these  SYSLOG\nnotifications  and warnings is system-dependent (typically /var/log/messages or /var/log/sys‐‐\nlog).  To change this default location, please see the '-l' command-line option described be‐\nlow.\n\nIn  addition  to  logging  to a file, smartd can also be configured to send email warnings if\nproblems are detected.  Depending upon the type of problem, you may want to run self-tests on\nthe  disk, back up the disk, replace the disk, or use a manufacturer's utility to force real‐\nlocation of bad or unreadable disk sectors.  If disk problems are detected,  please  see  the\nsmartctl manual page and the smartmontools web page/FAQ for further guidance.\n\nIf  you  send  a USR1 signal to smartd it will immediately check the status of the disks, and\nthen return to polling the disks every 30 minutes.  See the '-i' option below for  additional\ndetails.\n\nsmartd  can be configured at start-up using the configuration file /etc/smartd.conf (Windows:\nEXEDIR/smartd.conf).  If the configuration file is subsequently modified, smartd can be  told\nto re-read the configuration file by sending it a HUP signal, for example with the command:\nkillall -HUP smartd.\n\nOn  startup, if smartd finds a syntax error in the configuration file, it will print an error\nmessage and then exit.  However if smartd is already running, then is told with a HUP  signal\nto  re-read  the configuration file, and then find a syntax error in this file, it will print\nan error message and then continue, ignoring the contents of the (faulty) configuration file,\nas if the HUP signal had never been received.\n\nWhen  smartd  is  running in debug mode, the INT signal (normally generated from a shell with\nCONTROL-C) is treated in the same way as a HUP signal: it makes smartd reload its  configura‐\ntion file.  To exit smartd use CONTROL-\\.\n\n[Linux  only] [NEW EXPERMIMENTAL SMARTD FEATURE] If smartd is started as a systemd(1) service\nand 'Type=Notify' is specified in the service file, the service  manager  is  notified  after\nsuccessful  startup.   Other  state  changes are reported via systemd notify STATUS messages.\nNotification of successful reloads (after HUP signal)  is  not  supported.   To  detect  this\nprocess start-up type, smartd checks whether the environment variable 'NOTIFYSOCKET' is set.\nNote  that  it  is  required  to  set  the   '-n'   ('--nofork')   option   in   the   'Exec‐\nStart=/usr/sbin/smartd' command line if 'Type=Notify' is used.\n\nOn  startup,  in  the  absence  of the configuration file /etc/smartd.conf, the smartd daemon\nfirst scans for all devices that support SMART.  The scanning is done as follows:\n\nLINUX:   Examine  all  entries  \"/dev/hd[a-t]\"  for  IDE/ATA  devices,  and   \"/dev/sd[a-z]\",\n\"/dev/sd[a-c][a-z]\" for ATA/SATA or SCSI/SAS devices.  Disks behind RAID controllers\nare not included.\n\nIf directive '-d nvme' or no  '-d'  directive  is  specified,  examine  all  entries\n\"/dev/nvme[0-99]\" for NVMe devices.\n\nsmartd  then  monitors  for all possible SMART errors (corresponding to the '-a' Directive in\nthe configuration file; see the smartd.conf(5) man page).\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-A PREFIX, --attributelog=PREFIX",
                        "content": "Writes smartd attribute information (normalized and raw  attribute  values)  to  files\n'PREFIX''MODEL-SERIAL.ata.csv'  or  'PREFIX''VENDOR-MODEL-SERIAL.scsi.csv'.   At  each\ncheck cycle attributes are logged as a line of semicolon  separated  triplets  of  the\nform \"attribute-ID;attribute-norm-value;attribute-raw-value;\".  For SCSI devices error\ncounters and temperature recorded in  the  form  \"counter-name;counter-value;\".   Each\nline is led by a date string of the form \"yyyy-mm-dd HH:MM:SS\" (in UTC).\n\nIf   this  option  is  not  specified,  attribute  information  is  written  to  files\n'/var/lib/smartmontools/attrlog.MODEL-SERIAL.ata.csv'.   To  disable   attribute   log\nfiles,  specify  this option with an empty string argument: '-A \"\"'.  MODEL and SERIAL\nare build from drive identify information, invalid characters are replaced  by  under‐\nline.\n\nIf  the  PREFIX  has  the  form  '/path/dir/'  (e.g.  '/var/lib/smartd/'),  then files\n'MODEL-SERIAL.ata.csv' are created in directory '/path/dir'.  If the  PREFIX  has  the\nform   '/path/name'   (e.g.   '/var/lib/misc/attrlog-'),   then  files  'nameMODEL-SE‐\nRIAL.ata.csv' are created in directory '/path/'.  The path must be absolute, except if\ndebug mode is enabled.\n",
                        "flag": "-A",
                        "long": "--attributelog",
                        "arg": "PREFIX"
                    },
                    {
                        "name": "-B [+]FILE, --drivedb=[+]FILE",
                        "content": "[ATA  only] Read the drive database from FILE.  The new database replaces the built in\ndatabase by default.  If '+' is specified, then the new entries prepend the  built  in\nentries.  Please see the smartctl(8) man page for further details.\n",
                        "flag": "-B",
                        "long": "--drivedb",
                        "arg": "[+]FILE"
                    },
                    {
                        "name": "-c FILE, --configfile=FILE",
                        "content": "Read  smartd  configuration Directives from FILE, instead of from the default location\n/etc/smartd.conf (Windows: EXEDIR/smartd.conf).  If FILE does not exist,  then  smartd\nwill print an error message and exit with nonzero status.  Thus, '-c /etc/smartd.conf'\ncan be used to verify the existence of the default configuration file.\n\nBy using '-' for FILE, the configuration is read from standard input.  This is  useful\nfor commands like:\necho /dev/sdb -m user@home -M test | smartd -c - -q onecheck\nto perform quick and simple checks without a configuration file.\n",
                        "flag": "-c",
                        "long": "--configfile",
                        "arg": "FILE"
                    },
                    {
                        "name": "-C, --capabilities",
                        "content": "[Linux  only]  Use libcap-ng to drop unneeded Linux process capabilities(7).  The fol‐\nlowing capabilities are kept: CAPSYSADMIN, CAPSYSRAWIO, CAPMKNOD.\n\nWarning: Mail notification does not work when used.\n",
                        "flag": "-C",
                        "long": "--capabilities"
                    },
                    {
                        "name": "-d, --debug",
                        "content": "Runs smartd in \"debug\" mode.  In this mode, it displays status information  to  STDOUT\nrather  than  logging it to SYSLOG and does not fork(2) into the background and detach\nfrom the controlling terminal.  In this mode, smartd also prints more verbose informa‐\ntion  about  what it is doing than when operating in \"daemon\" mode.  In this mode, the\nINT signal (normally generated from a terminal with CONTROL-C) makes smartd reload its\nconfiguration file.  Please use CONTROL-\\ to exit\n",
                        "flag": "-d",
                        "long": "--debug"
                    },
                    {
                        "name": "-D, --showdirectives",
                        "content": "Prints  a list (to STDOUT) of all the possible Directives which may appear in the con‐\nfiguration file /etc/smartd.conf, and then exits.  These Directives are  described  in\nthe  smartd.conf(5) man page.  They may appear in the configuration file following the\ndevice name.\n",
                        "flag": "-D",
                        "long": "--showdirectives"
                    },
                    {
                        "name": "-h, --help, --usage",
                        "content": "Prints usage message to STDOUT and exits.\n",
                        "flag": "-h",
                        "long": "--usage"
                    },
                    {
                        "name": "-i N, --interval=N",
                        "content": "Sets the interval between disk checks to N seconds, where N is a decimal integer.  The\nminimum  allowed value is ten and the maximum is the largest positive integer that can\nbe represented on your system (often 2^31-1).  The default is 1800 seconds.\n\nNote that the superuser can make smartd check the status of the disks at any  time  by\nsending it the SIGUSR1 signal, for example with the command:\nkill -SIGUSR1 <pid>\nwhere <pid> is the process id number of smartd.  One may also use:\nkillall -USR1 smartd\nfor the same purpose.\n",
                        "flag": "-i",
                        "long": "--interval",
                        "arg": "N"
                    },
                    {
                        "name": "-l FACILITY, --logfacility=FACILITY",
                        "content": "Uses  syslog  facility FACILITY to log the messages from smartd.  Here FACILITY is one\nof local0, local1, ..., local7, or daemon [default].  If this command-line  option  is\nnot used, then by default messages from smartd are logged to the facility daemon.\n\nIf  you would like to have smartd messages logged somewhere other than the default lo‐\ncation, include (for example) '-l local3' in its start up  argument  list.   Tell  the\nsyslog   daemon   to   log   all  messages  from  facility  local3  to  (for  example)\n'/var/log/smartd.log'.\n\nFor more detailed information, please refer to the man pages for the local syslog dae‐\nmon, typically syslogd(8), syslog-ng(8) or rsyslogd(8).\n",
                        "flag": "-l",
                        "long": "--logfacility",
                        "arg": "FACILITY"
                    },
                    {
                        "name": "-n, --no-fork",
                        "content": "Do  not  fork  into  background; this is useful when executed from modern init methods\nlike initng, minit, supervise or systemd.\n",
                        "flag": "-n",
                        "long": "--no-fork"
                    },
                    {
                        "name": "-p NAME, --pidfile=NAME",
                        "content": "Writes pidfile NAME containing the smartd Process ID number (PID).  To  avoid  symlink\nattacks make sure the directory to which pidfile is written is only writable for root.\nWithout this option, or if the --debug option is given, no  PID  file  is  written  on\nstartup.  If smartd is killed with a maskable signal then the pidfile is removed.\n",
                        "flag": "-p",
                        "long": "--pidfile",
                        "arg": "NAME"
                    },
                    {
                        "name": "-q WHEN, --quit=WHEN",
                        "content": "Specifies  when,  if ever, smartd should exit.  The valid arguments are to this option\nare:\n\nnodev - Exit if there are no devices to monitor, or if any errors are found at startup\nin the configuration file.\n\nerrors  -  Exit  if there are no devices to monitor, or if any errors are found in the\nconfiguration file /etc/smartd.conf at startup or whenever it is reloaded.\n\nnodevstartup - Exit if there are no devices to monitor at startup.   But  continue  to\nrun if no devices are found whenever the configuration file is reloaded.\n\nnever - Only exit if a fatal error occurs (no remaining system memory, invalid command\nline arguments).  In this mode, even if there are no devices to  monitor,  or  if  the\nconfiguration  file  /etc/smartd.conf has errors, smartd will continue to run, waiting\nto load a configuration file listing valid devices.  This is the default.\n\nonecheck - Start smartd in debug mode, then  register  devices,  then  check  device's\nSMART  status  once,  and then exit with zero exit status if all of these steps worked\ncorrectly.\n\nThis last option is intended for 'distribution-writers' who want to  create  automated\nscripts  to determine whether or not to automatically start up smartd after installing\nsmartmontools.  After starting smartd with this  command-line  option,  the  distribu‐\ntion's  install scripts should wait a reasonable length of time (say ten seconds).  If\nsmartd has not exited with zero status by that time, the script should send  smartd  a\nSIGTERM  or  SIGKILL  and  assume  that smartd will not operate correctly on the host.\nConversely, if smartd exits with zero status, then it is safe to run smartd in  normal\ndaemon  mode.  If smartd is unable to monitor any devices or encounters other problems\nthen it will return with non-zero exit status.\n\nshowtests - Start smartd in debug mode, then register devices, then write  a  list  of\nfuture  scheduled  self tests to stdout, and then exit with zero exit status if all of\nthese steps worked correctly.  Device's SMART status is not checked.\n\nThis option is intended to test whether the '-s REGEX' directives in smartd.conf  will\nhave the desired effect.  The output lists the next test schedules, limited to 5 tests\nper type and device.  This is followed by a summary of all tests of each device within\nthe next 90 days.\n",
                        "flag": "-q",
                        "long": "--quit",
                        "arg": "WHEN"
                    },
                    {
                        "name": "-r TYPE, --report=TYPE",
                        "content": "Intended  primarily to help smartmontools developers understand the behavior of smart‐‐\nmontools on non-conforming or poorly-conforming hardware.  This option reports details\nof  smartd transactions with the device.  The option can be used multiple times.  When\nused just once, it shows a record of the ioctl() transactions with the  device.   When\nused  more than once, the detail of these ioctl() transactions are reported in greater\ndetail.  The valid arguments to this option are:\n\nioctl - report all ioctl() transactions.\n\nataioctl - report only ioctl() transactions with ATA devices.\n\nscsiioctl - report only ioctl() transactions with SCSI devices.\n\nnvmeioctl - report only ioctl() transactions with NVMe devices.\n\nAny argument may include a positive integer to specify the level of detail that should\nbe reported.  The argument should be followed by a comma then the integer with no spa‐\nces.  For example, ataioctl,2 The default level is  1,  so  '-r  ataioctl,1'  and  '-r\nataioctl' are equivalent.\n",
                        "flag": "-r",
                        "long": "--report",
                        "arg": "TYPE"
                    },
                    {
                        "name": "-s PREFIX, --savestates=PREFIX",
                        "content": "Reads/writes  smartd  state information from/to files 'PREFIX''MODEL-SERIAL.ata.state'\nor 'PREFIX''VENDOR-MODEL-SERIAL.scsi.state'.  This preserves SMART  attributes,  drive\nmin and max temperatures (-W directive), info about last sent warning email (-m direc‐\ntive), and the time of next check of the self-test REGEXP (-s directive)  across  boot\ncycles.\n\nIf   this   option  is  not  specified,  state  information  is  maintained  in  files\n'/var/lib/smartmontools/smartd.MODEL-SERIAL.ata.state'    for    ATA    devices    and\n'/var/lib/smartmontools/smartd.VENDOR-MODEL-SERIAL.scsi.state'  for  SCSI devices.  To\ndisable state files, specify this option with  an  empty  string  argument:  '-s  \"\"'.\nMODEL and SERIAL are build from drive identify information, invalid characters are re‐\nplaced by underline.\n\nIf the  PREFIX  has  the  form  '/path/dir/'  (e.g.  '/var/lib/smartd/'),  then  files\n'MODEL-SERIAL.ata.state'  are created in directory '/path/dir'.  If the PREFIX has the\nform  '/path/name'   (e.g.   '/var/lib/misc/smartd-'),   then   files   'nameMODEL-SE‐\nRIAL.ata.state'  are created in directory '/path/'.  The path must be absolute, except\nif debug mode is enabled.\n\nThe state information files  are  read  on  smartd  startup.   The  files  are  always\n(re)written  after  reading the configuration file, before rereading the configuration\nfile (SIGHUP), before smartd shutdown, and after a check forced by SIGUSR1.   After  a\nnormal check cycle, a file is only rewritten if an important change (which usually re‐\nsults in a SYSLOG output) occurred.\n",
                        "flag": "-s",
                        "long": "--savestates",
                        "arg": "PREFIX"
                    },
                    {
                        "name": "-w PATH, --warnexec=PATH",
                        "content": "Run the executable PATH instead of the default script when smartd needs to send  warn‐\ning  messages.   PATH  must point to an executable binary file or script.  The default\nscript is /usr/share/smartmontools/smartdwarning.sh.\n",
                        "flag": "-w",
                        "long": "--warnexec",
                        "arg": "PATH"
                    },
                    {
                        "name": "-V, --version, --license, --copyright",
                        "content": "Prints version, copyright, license, home page and SVN revision  information  for  your\ncopy of smartd to STDOUT and then exits.\n\n",
                        "flag": "-V",
                        "long": "--copyright"
                    }
                ]
            },
            "EXAMPLES": {
                "content": "",
                "subsections": [
                    {
                        "name": "smartd",
                        "content": "Runs the daemon in forked mode.  This is the normal way to run smartd.  Entries are logged to\nSYSLOG.\n"
                    },
                    {
                        "name": "smartd -d -i 30",
                        "content": "Run in foreground (debug) mode, checking the disk status every 30 seconds.\n"
                    },
                    {
                        "name": "smartd -q onecheck",
                        "content": "Registers devices, and checks the status of the devices exactly once.  The exit  status  (the\nshell $?  variable) will be zero if all went well, and nonzero if no devices were detected or\nsome other problem was encountered.\n\n"
                    }
                ]
            },
            "CONFIGURATION": {
                "content": "The syntax of the smartd.conf(5) file is discussed separately.\n\n",
                "subsections": []
            },
            "NOTES": {
                "content": "smartd will make log entries at loglevel LOGINFO if the Normalized  SMART  Attribute  values\nhave changed, as reported using the '-t', '-p', or '-u' Directives.  For example:\n'Device: /dev/sda, SMART Attribute: 194 TemperatureCelsius changed from 94 to 93'\nNote  that in this message, the value given is the 'Normalized' not the 'Raw' Attribute value\n(the disk temperature in this case is about 22 Celsius).  The '-R' and '-r' Directives modify\nthis behavior, so that the information is printed with the Raw values as well, for example:\n'Device:  /dev/sda,  SMART  Attribute: 194 TemperatureCelsius changed from 94 [Raw 22] to 93",
                "subsections": [
                    {
                        "name": "[Raw 23]'",
                        "content": "Here the Raw values are the actual disk temperatures in Celsius.  The way in  which  the  Raw\nvalues are printed, and the names under which the Attributes are reported, is governed by the\nvarious '-v Num,Description' Directives described previously.\n\nPlease see the smartctl manual page for further explanation of the differences  between  Nor‐\nmalized and Raw Attribute values.\n\nsmartd  will make log entries at loglevel LOGCRIT if a SMART Attribute has failed, for exam‐\nple:\n'Device: /dev/sdc, Failed SMART Attribute: 5 ReallocatedSectorCt'\nThis loglevel is used for reporting enabled by the '-H', -f', '-l selftest', and  '-l error'\nDirectives.   Entries reporting failure of SMART Prefailure Attributes should not be ignored:\nthey mean that the disk is failing.  Use the smartctl utility to investigate.\n\n"
                    }
                ]
            },
            "LOG TIMESTAMP TIMEZONE": {
                "content": "When smartd makes log entries, these are time-stamped.  The time stamps are in the computer's\nlocal time zone, which is generally set using either the environment variable 'TZ' or using a\ntime-zone file such as /etc/localtime.  You may wish to change the timezone while  smartd  is\nrunning  (for example, if you carry a laptop to a new time-zone and don't reboot it).  Due to\na bug in the tzset(3) function of many unix standard C libraries,  the  time-zone  stamps  of\nsmartd might not change.  For some systems, smartd will work around this problem if the time-\nzone is set using /etc/localtime.  The work-around fails if the time-zone is  set  using  the\n'TZ' variable (or a file that it points to).\n\n",
                "subsections": []
            },
            "EXIT STATUS": {
                "content": "The exit status (return value) of smartd can have the following values:\n\n0:     Daemon  startup  successful,  or  smartd  was killed by a SIGTERM (or in debug mode, a\nSIGQUIT).\n\n1:     Commandline did not parse.\n\n2:     There was a syntax error in the config file.\n\n3:     Forking the daemon failed.\n\n4:     Couldn't create PID file.\n\n5:     Config file does not exist (only returned in conjunction with the '-c' option).\n\n6:     Config file exists, but cannot be read.\n\n8:     smartd ran out of memory during startup.\n\n10:    An inconsistency was found in smartd's internal data structures.   This  should  never\nhappen.   It must be due to either a coding or compiler bug.  Please report such fail‐\nures to smartmontools developers, see REPORTING BUGS below.\n\n16:    A device explicitly listed in /etc/smartd.conf can't be monitored.\n\n17:    smartd didn't find any devices to monitor.\n\n254:   When in daemon mode, smartd received a SIGINT or SIGQUIT.  (Note that in  debug  mode,\nSIGINT  has the same effect as SIGHUP, and makes smartd reload its configuration file.\nSIGQUIT has the same effect as SIGTERM and causes smartd to exit with zero  exit  sta‐\ntus.\n",
                "subsections": [
                    {
                        "name": "132 and above",
                        "content": "smartd was killed by a signal that is not explicitly listed above.  The exit status is\nthen 128 plus the signal number.  For example if smartd is killed by  SIGKILL  (signal\n9) then the exit status is 137.\n\n"
                    }
                ]
            },
            "FILES": {
                "content": "",
                "subsections": [
                    {
                        "name": "/usr/sbin/smartd",
                        "content": "full path of this executable.\n"
                    },
                    {
                        "name": "/etc/smartd.conf",
                        "content": "configuration file (see smartd.conf(5) man page).\n\n/usr/share/smartmontools/smartdwarning.sh\nscript   run   on  warnings  (see  '-w'  option  above  and  '-M  exec'  directive  on\nsmartd.conf(5) man page).\n\n/etc/smartmontools/smartdwarning.d/\nplugin directory for smartd warning script (see '-m' directive on  smartd.conf(5)  man\npage).\n"
                    },
                    {
                        "name": "/var/lib/smartmontools/drivedb/drivedb.h",
                        "content": "drive database (see '-B' option).\n\n/etc/smartdrivedb.h\noptional local drive database (see '-B' option).\n\n"
                    }
                ]
            },
            "AUTHORS": {
                "content": "Bruce Allen (project initiator),\nChristian Franke (project manager, Windows port and all sort of things),\nDouglas Gilbert (SCSI subsystem),\nVolker Kuhlmann (moderator of support and database mailing list),\nGabriele Pohl (wiki & development team support),\nAlex Samorukov (FreeBSD port and more, new Trac wiki).\n\nMany  other  individuals  have made contributions and corrections, see AUTHORS, ChangeLog and\nrepository files.\n\nThe first smartmontools code was derived from the  smartsuite  package,  written  by  Michael\nCornwell and Andre Hedrick.\n\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "To submit a bug report, create a ticket in smartmontools wiki:\n<https://www.smartmontools.org/>.\nAlternatively send the info to the smartmontools support mailing list:\n<https://listi.jpberlin.de/mailman/listinfo/smartmontools-support>.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "smartd.conf(5), smartctl(8).\nupdate-smart-drivedb(8).\nsystemd.exec(5).\n\n",
                "subsections": []
            },
            "REFERENCES": {
                "content": "Please see the following web site for more info: <https://www.smartmontools.org/>\n\nAn  introductory  article  about  smartmontools is Monitoring Hard Disks with SMART, by Bruce\nAllen, Linux Journal, January 2004,  pages  74–77.   See  <https://www.linuxjournal.com/arti‐‐\ncle/6983>.\n\nIf  you  would  like  to understand better how SMART works, and what it does, a good place to\nstart is with Sections 4.8 and 6.54 of the first volume of the 'AT Attachment with Packet In‐\nterface-7'  (ATA/ATAPI-7)  specification Revision 4b.  This documents the SMART functionality\nwhich the smartmontools utilities provide access to.\n\nThe functioning of SMART was originally defined by the SFF-8035i revision 2 and the SFF-8055i\nrevision  1.4 specifications.  These are publications of the Small Form Factors (SFF) Commit‐\ntee.\n\nLinks to these and other documents may be found on the Links page of the  smartmontools  Wiki\nat <https://www.smartmontools.org/wiki/Links>.\n\n",
                "subsections": []
            },
            "PACKAGE VERSION": {
                "content": "smartmontools-7.2 2020-12-30 r5155\n$Id: smartd.8.in 4861 2018-12-16 18:24:57Z chrfranke $\n\n\n\nsmartmontools-7.2                            2020-12-30                                    SMARTD(8)",
                "subsections": []
            }
        }
    }
}