Re: how to control how often smartd-runner fires.
Christian Franke <[email protected]> Thu, 19 Jan 2017 10:55:40 +0100
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <[email protected]> |
Ray Andrews wrote: > I'm trying to control how often 'smart-notifier'/'smartd-runner' sends > me a message. I seem to be able to control how often 'smartd' itself > runs: > > in /etc/smartd.conf: > > DEVICESCAN -a -i 30 -m root -M test -M exec > /usr/share/smartmontools/smartd-runner The '-i 30' smartd.conf directive means "ignore Attribute number 30 when checking for failure of Usage Attributes" (see smartd.conf man page). This is probably not what you want. The '-i 30' smartd command line(!) option "sets the interval between disk checks to 30 seconds" (see smartd man page). Using such short intervals is not recommend, except for testing purposes. The usage of 'smartd-runner' suggests that you are using Debian or Ubuntu. If yes, the smartd command line options could be configured in '/etc/default/smartmontools'. Note that both are Debian/Ubuntu specific and not part of the upstream source code. > $ smartctl -t short /dev/sdb > $ killall -HUP smartd > $ /etc/init.d/smartmontools restart > > ... and sure enough the test messages popup, but they contain no > actualinformation. This is as expected. The '-M test' directive is only intended to test the functionality of the '-m ... -M exec ...' directives. > But it seems that setting '-i xxxx' to anything does not change how > often smartd-runner works in practice, I get about one message per day. The '-M exec' script is only run on error conditions which also result in a LOG_CRIT syslog message. For LOG_INFO messages issued by smartd, see the configured syslog. On Debian/Ubuntu, this is usually '/var/log/daemon.log'. > Also, I get the same message over and over again about my 77 pending > sectors, but it's been 77 pending sectors for years, and I'd really > rather not seeany further notifications about it untilsomethingelse > goes wrong. By default, pending sectors are considered critical and therefore daily reminder LOG_CRIT messages are issued. Try '-C 197+' directive to change this. See '-m', '-M'and '-C' sections on smartd.conf man page for further details. Thanks, Christian ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot