shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Monitorar logs em real time


From: Tiago Barcellos Peczenyj
Subject: Re: [shell-script] Monitorar logs em real time
Date: Thu, 28 Dec 2006 14:52:21 -0200

Uma forma poderia ser esta :

tail -f xxx | awk '/\(erro\)/{system("mail address@hidden ...")}'

Entretanto o mecanismo de log não permite que vc envie um email em caso de
erro, automaticamente?

On 12/26/06, Flavio Torres <address@hidden> wrote:
>
>   -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Deivid Vilela escreveu:
> >
> >
> > Existe alguma forma de manter o tail em loop dentro do script?
> >
> >
>
> Talvez funcione com:
>
> while read; [[ grep erro ]] && mata;done < arquivolog
>
> - --
>
>
> /*---------------------------------------------------*/
> /* * Flavio Torres - Administrador de Sistemas*/
> /* /_\ */int y,z;main(x){x=(x>0?-9:x);z=((z=(x+5)
> /* o. .o */)>0?z:-z);printf(!x&&++y?"\n":z?z>y%3+y/
> /* ((Y)) */3?" ":x<-5?"/":"\\":y?"|":"*");y-9?main(
> /* ()) (() */++x):puts(" _|_|_")&&puts(" \\___/");}
> /* ()^() A party animal isn't just for Christmas.*/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
>
> iD8DBQFFkQ+pNRQApncg294RArhaAKC4bHPqd/xccmuQEfFiyVhfZ9ZUygCgmJtK
> dU9JTU6E50hrVSfm8ghfxPc=
> =2vRq
> -----END PGP SIGNATURE-----
>
>  
>



-- 
Tiago B Peczenyj
Linux User #405772

# cd /pub
# more beer


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]