[IRCServices] Rotate Log function - performance

Mark Hetherington markh at eurodltd.co.uk
Mon Feb 26 23:58:02 PST 2001


I am considering adding a rotate log function to services (and to the ircd
but that is beyond the scope of this list) which will automatically rotate
the log each day at Midnight but am looking for a low/no performance impact
determination that Midnight has occured.

The daylight build used to have an isMidnight function called in the "main
loop" but this rarely succeeded  I guess because if Services happened to be
idle or very busy at this time, Midnight passed before the isMidnight
function activated.

Eggdrop has a number of settings for automatic log rotation and after
investigation it uses

  add_hook(HOOK_SECONDLY, (Function) core_secondly);

with the per second function checking for Midnight among other things.

Having not used this system before I wonder as to what impact on performance
this may have on services. If anyone knows much about using per second
routines or what impact it might have on services it would be much
appreciated.

Mark.
CTCP Networks.