[ale] SHELL: log files monitoring
Zyman, Andy
zymana at hra.nyc.gov
Thu Feb 14 14:43:08 EST 2002
Danny,
> Why not use grep? It will almost certainly be faster
> than the above.
I don't know. Originnaly I thought that I'll need differnet type of action
in diff. siuations. But know, U are right I'l changeit to grep. Thank You
for input.
> More broadly, what are you trying to accomplish? Is
> there a need, for example, to not see dups? Is that the reason 'tail' is
used?
I have Oracle Db and I'm monitoring alert<sid>.log ( it's the output of what
happenning to instance (db) ).
I just want to see if db:
was shutting down - shoot email do dba,
up - email.
"Alter database" statemnet - email. this kind of action.
Andy
> -----Original Message-----
> From: Danny Cox [mailto:danscox at mindspring.com]
> Sent: Thursday, February 14, 2002 2:35 PM
> To: Zyman, Andy
> Cc: 'ale at ale.org'
> Subject: Re: [ale] SHELL: log files monitoring
>
>
> Andy,
>
> On Thu, 2002-02-14 at 11:45, Zyman, Andy wrote:
> > Hello.
> > Happy Valentines Day folks :)
>
> And to you too.
>
> > I have simple task : I need to monitor a log files for
> particular string.
> >
> > for this purpose I made QD script which is doing basically this:
> >
> > for i in $* ; do
> > tail -f | while read line
> > case $line
> > <word i'm looking for>) send email ;;
> > esac
> > done &
> > done
>
> Why not use grep? It will almost certainly be faster
> than the above.
>
> More broadly, what are you trying to accomplish? Is
> there a need, for
> example, to not see dups? Is that the reason 'tail' is used?
>
> --
> kernel, n.: A part of an operating system that preserves the
> medieval traditions of sorcery and black art.
>
> Danny
>
InterScan VirusWall processing complete - message virus-free.
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list