[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tiger-devel] tigercron for non 24h machines
From: |
Nicolas François |
Subject: |
[Tiger-devel] tigercron for non 24h machines |
Date: |
Sun, 18 May 2003 21:56:06 +0200 |
User-agent: |
Mutt/1.5.4i |
Hello,
I have a non 24h machine on which I want to run tiger. The problem with
non 24h is that not all checks are run.
(it is the same issue as Debian Bug #148274:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=148274)
I had some ideas to solve this issue (and thought about their pros and
cons):
+ Change the cronrc file
The simpliest method, but don't satify me because the machine is on
at very varying hour.
(the other ideas are based on methods providing a list of scripts
different from the (hourok,domok,dayok) curently implemented)
+ use a counter to read a specified line in a new configuration file.
To implement the current cronrc hourly checks (without weekly or
monthly checks), such a file will be:
cat <<EOF>cronrc.rotatedlist
check_known check_listeningprocs
deb_checkmd5sums deb_nopackfiles deb_checkadvisories
check_accounts check_rhosts check_netrc check_group check_passwd
check_listeningprocs
check_perms check_group check_passwd
check_listeningprocs
check_known
check_listeningprocs
check_listeningprocs
check_known
check_listeningprocs
check_listeningprocs
EOF
for weekly or monthly checks emulation, one can write a 672 lines
configuration file (24hours*7days*4weeks). This emulation wont
respect the exact day of month but approximatively the frequency.
This method is easy to implement, but need to add a new
configuration file (wich can be very long and very difficult to
maintain).
Some improvement can be added (support for comments ...)
+ Use the cronrc file, but don't rely on the hour provided by `date`,
use a counter instead (modulo 24)
With this method, we can't make sure weekly and monthly checks will
be run.
+ Add an option to tigercron that permits to provide the list of
scripts, and rewrite the /etc/cron.d/tiger file.
This method permits the use of a smarter crontab (support for
minutes, */2, ...)
This method will directly work with anacron, but will eat a lot of
CPU power on reboot
+ mix of the last ones:
use cronrc for hourly checks
add lines to /etc/cron.d/tiger for weekly and monthly checks
This method is the more flexible.
I implemented the different methods and attached a patch for the last
one. I can provide a patch for the second one if somebody wants it.
Implementation notes:
+ I added an option on tigerrc that permits to choose the current
method or this one.
+ I added an option to tigercron (--scripts)
+ I don't know where to save the counter (I put it on
/var/log/tiger/cron.counter)
Perhaps /usr/lib/tiger/cron.counter would be better, but the
directory did not exist on my debian box
+ I found it difficult to add an option to tigercron (options are read
in different places on 'tigercron' and also in 'config'
+ I found some bugs in tigercron and other scripts. Is it better to
report them here or on the debian BTS?
All this can also be used for people wanting to run checks more
frequently
The patch attached changes:
tigercron
cronrc
remove weekly and monthly checks
tigerrc
add the 'Tiger_CRON_Rotate_Checks' option
debian/cron.d
add weekly and monthly checks
Regards,
--
Nekral
anacron.patch
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tiger-devel] tigercron for non 24h machines,
Nicolas François <=