procmail
[Top] [All Lists]

Re: counting how often my rules hit with LOGFILE

2002-08-26 21:42:10
I've just been through this.  I started by incrementing a counter (named
after the rule) every time the rule got hit.  This made for a huge
.procmailrc and didn't really give me what I wanted.  I wound up using
the $MATCH process on each rule; ie * ()\/somerule.  When you do this,
with VERBOSE and LOGFILE enabled, the log reflects
"Matched: whatevergothit".

I "grep Matched >> matched.file" and then use sort to view.  (Actually, I
use 'sort matched.file | uniq -c' which gives me the number of hits as
well - and 'sort matched.file | uniq -c | sort -g' if I want the numbers
in order.

                                - fleet -


On Tue, 27 Aug 2002, Fuzzy Logic wrote:

Out of curiosity, I wanted to see how often each of my rules was used in
an average day, so I turned on VERBOSE and LOGFILE.  Now, I have a
question.  I searched the archives, but didn't find anyone who had asked a
similar question.

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