From owner-freebsd-questions@FreeBSD.ORG Fri Jun 20 06:43:36 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D075C37B415 for ; Fri, 20 Jun 2003 06:43:36 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1E9943F85 for ; Fri, 20 Jun 2003 06:43:34 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h5KDhQo2001155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Jun 2003 14:43:30 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h5KDhQsv001154; Fri, 20 Jun 2003 14:43:26 +0100 (BST) (envelope-from matthew) Date: Fri, 20 Jun 2003 14:43:26 +0100 From: Matthew Seaman To: Ronnie Clark Message-ID: <20030620134326.GA615@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Ronnie Clark , FreeBSD Questions References: <20030620130049.63710.qmail@web10002.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20030620130049.63710.qmail@web10002.mail.yahoo.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-10.9 required=5.0 tests=AWL,BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: FreeBSD Questions Subject: Re: IPFW Log question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2003 13:43:37 -0000 --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--