IPFW Log question

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Jun 20 06:43:37 PDT 2003

On Fri, Jun 20, 2003 at 06:00:49AM -0700, Ronnie Clark wrote:
> Hello all, 
> I have what is hopefully an easy question. Is there a
> way to stop IPFW from adding lines in logs like: 
> "last message repeated 'x' times"?

It's not IPFW that does that, it's syslogd(8) trying to avoid
cluttering up the logs with hundreds and hundreds of identical lines.

If you like that sense of deja-vu then add '-c' to the syslogd_flags
variable in /etc/rc.conf.  As ever, the syslogd(8) man page is the
place to read all about it.
> Or if anyone has a perl script that tosses out the odd
> lines and just keeps the full lines and is willing to
> share it, that would work too. Otherwise, I am going
> to have to get better at perl in a big way. 

    #!/usr/bin/perl -w
    $prevline = "";
    while (<>) {
        if (m/last message repeated (\d+) times/) {
            for ( 1 .. $1 ) {
                print $prevline;
        } else {
            print $_;
            $prevline = $_;



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030620/ef364545/attachment.bin

More information about the freebsd-questions mailing list