On Mon, 12 Oct 1998, Julian wrote:
> I have RTFM, and do use COMPRESS_COMMAND, TYVM. I was refering to the _exim_
> process doing it, not the exicyclelog program, this was a direct follow up to
> the previous suggestion.
Oh sorry, I didn't understand you properly. Apologies.
However, I'm afraid I don't agree with you. Firstly, not everyone runs
an Exim daemon; they use inetd and cron instead. Such people wouldn't be
catered for. Secondly, I don't really like the idea of cluttering up the
daemon with the additional code. There isn't really any reason why it
should be done from the daemon rather than started by cron. (There *is*
a reason for starting queue-runners from the daemon - so it can keep a
count of them and limit their number.)
Or have I misunderstood again? Are you suggesting that Exim should
automatically initiate compression and rotation if it finds the logging
disk is getting full? That wouldn't be done by _the_ Exim process, but
by _an_ Exim process, since any Exim process can write to the log. The
only way it could do this would be to fire up a sub-process and run
exicyclog in it. Hmm. No. You wouldn't want to do that because several
simultaneously running processes would tend to fire off several
exicyclogs at the same time. It would have to be a single, long-running
process that watched the log. I don't really fancy writing another
separate process, and I equally don't fancy modifying the existing
daemon to do this (see above).
It would of course be possible to write a cron script that you could run
every so often that checked the space on the disc and ran exicyclog if
it was getting full. However, there would have to be some safeguards
against it running it too often (e.g. if rotation and compression didn't
actually bring you below the threshold).
Also, it occurs to me, that for both this and the original suggestion,
it would be necessary to obey statvfs() every time anything is written
to the log; would this be an unnecessary cost?
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
--
*** Exim information can be found at
http://www.exim.org/ ***