Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2003 14:43:26 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Ronnie Clark <ronj_clark@yahoo.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: IPFW Log question
Message-ID:  <20030620134326.GA615@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20030620130049.63710.qmail@web10002.mail.yahoo.com>
References:  <20030620130049.63710.qmail@web10002.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 20, 2003 at 06:00:49AM -0700, Ronnie Clark wrote:
> Hello all,=20
>=20
> I have what is hopefully an easy question. Is there a
> way to stop IPFW from adding lines in logs like:=20
> "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.
=20
> 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.=20

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

	Cheers,

	Matthew

--=20
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

--tKW2IUtsqtDRztdT
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE+8w9+dtESqEQa7a0RAkEVAJ9Z3O55a8Eo58Npuxr/lvvKI8loxgCfRbnt
li6lYULT4qAdOstANrLTWXM=
=+PQ6
-----END PGP SIGNATURE-----

--tKW2IUtsqtDRztdT--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030620134326.GA615>