Monitor: reduce default poll interval if mdstat is pollable.

Since 2.6.16, mdstat responds to select/poll.
So in that case, increase the default poll interval to about 15
minutes.
This ensures that the background load is insignificant.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2009-06-02 14:35:44 +10:00
parent 4736b5dc77
commit ddc7201f96
1 changed files with 7 additions and 0 deletions

View File

@ -1373,6 +1373,13 @@ int main(int argc, char *argv[])
rv = 1;
break;
}
if (delay == 0) {
if (get_linux_version() > 20616)
/* mdstat responds to poll */
delay = 1000;
else
delay = 60;
}
rv= Monitor(devlist, mailaddr, program,
delay?delay:60, daemonise, scan, oneshot,
dosyslog, test, pidfile);