RE: [pmfirewall] Syslog Entries

Date view Thread view Subject view Author view

From: Jeremy Brooks (JeremyB@univista.com)
Date: Mon Nov 06 2000 - 08:55:47 PST


a really simple shell script would be:

cat /var/log/messages | grep "something" > /../../somefile.log.archive
tail 0 -f /var/log/messages > /../../somefile.log #not sure if the 0 is
in the right place

YOu could stick this in a PMF script if you wanted.
I'll try and work on a Perl script for you.
Are you familiar with Perl syntax?

-----Original Message-----
From: Rick Onanian [mailto:rick@mail.artmold.com]
Sent: Monday, November 06, 2000 8:10 AM
To: pmfirewall@pointman.org
Subject: Re: [pmfirewall] Syslog Entries

Jeremy Brooks wrote:
> you could write a shell script (or perl if you want flexibility) to
> extract the messages you want and direct the output to some file. This
> could be automated too. It's not exactly realtime logging but it'll
> work. If you're interested I can help you work out the syntax. I'm
> dong something similar and it works fine.

I'd be interested in this; I've considered doing similar things
a few times myself. My concern is, how do you keep track of your
position in the log file so you don't keep getting the same stuff
over and over? I can figure out a few ways that require quite a
bit of cleaning-up that could conceivably eat up CPU and RAM on a
low-end box... but maybe in combination with 'tail -f', one could
minimize the need for the syncing and cleanup...

> ,Jeremy

-- 
rick -- A mind is like a parachute... it only works when it's open.

ICQ# 1590117 rick@mail.artmold.com (work) thc@psynet.net (home) Help with LRP: lrp.c0wz.com 68 Camaro wanted: dingo.mcrnet.net Windows users: Please delete me from your contact list when done corresponding with me. You should trim your contact list often anyway.

My opinions don't exist, and as such, are not anyone elses. I don't represent anyone, not even myself, and especially not my employer..

**************************************************************************** * To UNSUBSCRIBE from the list, send a message with "unsubscribe pmfirewall" * in the message body to majordomo@pointman.org. Please direct other * questions, comments, or problems to pmfirewall-owner@pointman.org. * * Need answers fast? Check the list archive located at: * http://www.pointman.org/PMFirewall/list-archive/ * **************************************************************************** * To UNSUBSCRIBE from the list, send a message with "unsubscribe pmfirewall" * in the message body to majordomo@pointman.org. Please direct other * questions, comments, or problems to pmfirewall-owner@pointman.org. * * Need answers fast? Check the list archive located at: * http://www.pointman.org/PMFirewall/list-archive/ *


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sun Jun 10 2001 - 02:37:23 PDT