procmail
[Top] [All Lists]

"Atomic" updates to the LOGFILE...

2002-07-25 22:38:24

Here's what we do now (snarfed from Bart Schaefer 
<schaefer(_at_)zanshin(_dot_)com>,
from a post to this list on 2002.05.30):

        TEMPFILE=$HOME/procmail.log.$$
        REALFILE=$HOME/procmail.log
        LOGFILE=$TEMPFILE
        TRAP='procmail -p DEFAULT=$REALFILE /dev/null < $TEMPFILE && rm -f 
$TEMPFILE'

'There's Just One Little Problem...[tm]'

And it's this. When we did some load-tests on a scratch server with
one machine using postal to simulate an 'Average' load (for us) of
about 2 messages delivered per second, plus another server similating
a 'SpamRun' of 1 message per second to a test account, we found that
adding the above gem resulted in a jump in the load of about ~75%.

We're talking a 1 minute Load Average of about 20-25 going to 45-50.
I think the test MTA for this was PostFix.

We'd like something a bit more economical in terms of processor
performance, as we are trying to run some scripts based on the logfiles
to report the 'Performance' of our SpamTraps.

I guess we could write a little script that calls lockfile, and then
appends the result, and then tosses the lock, or just put the various
logfiles into their own directory, and date 'em (log.1027659003.1234),
ec. etc. etc., but ... it would be even spiffier if ProcMail had some
sort of facility that made this automatic instead of a Kludge, However
Elegant[tm].

And ideas?
Or are we just behind the times and in need of updating our software?

Aloha mai Nai`a!
-- 
"Please have your Internet License             http://kapu.net/~mjwise/
  and Usenet Registration handy..."

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail