Oscar Fernandez
August 02, 2011 07:14AM
You can apply "split" to the output of "tail"j to generate files of with the
same number of lines, that you would process with the program that extracts
the intereresting data from them:

NAME
split - split a file into pieces

SYNOPSIS
split [OPTION]... [INPUT [PREFIX]]

DESCRIPTION
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT
is -, read standard input.

Mandatory arguments to long options are mandatory for short options
too.

-a, --suffix-length=N
use suffixes of length N (default 2)

-b, --bytes=SIZE
put SIZE bytes per output file

-C, --line-bytes=SIZE
put at most SIZE bytes of lines per output file

-d, --numeric-suffixes
use numeric suffixes instead of alphabetic

-l, --lines=NUMBER
put NUMBER lines per output file

--verbose
print a diagnostic just before each output file is opened

--help display this help and exit

--version
output version information and exit

SIZE may have a multiplier suffix: b 512, kB 1000, K 1024, MB
1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for
T, P, E, Z, Y.


On Mon, Aug 1, 2011 at 5:48 PM, Akins, Brian <Brian.Akins@turner.com> wrote:

> You could use something like syslog-ng that can "tail" the log file and run
> them through a script.
>
>
> --
> Brian Akins
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--
Oscar Fernandez Sierra
oscaretu@gmail.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Log Parsing - Near Real Time

John Macleod August 01, 2011 09:56AM

Re: Log Parsing - Near Real Time

splitice August 01, 2011 10:26AM

Re: Log Parsing - Near Real Time

Reinis Rozitis August 01, 2011 10:40AM

Re: Log Parsing - Near Real Time

Randy Parker August 01, 2011 10:58AM

Re: Log Parsing - Near Real Time

Dennis Jacobfeuerborn August 01, 2011 02:58PM

Re: Log Parsing - Near Real Time

Harold Sinclair August 01, 2011 03:14PM

Re: Log Parsing - Near Real Time

splitice August 01, 2011 09:10PM

Re: Log Parsing - Near Real Time

Neil Mckee August 04, 2011 01:00PM

Re: Log Parsing - Near Real Time

Dennis Jacobfeuerborn August 04, 2011 03:18PM

Re: Log Parsing - Near Real Time

Neil Mckee August 04, 2011 08:32PM

Re: Log Parsing - Near Real Time

David Yu August 01, 2011 10:24PM

Re: Log Parsing - Near Real Time

Akins, Brian August 01, 2011 11:50AM

Re: Log Parsing - Near Real Time

Oscar Fernandez August 02, 2011 07:14AM

Re: Log Parsing - Near Real Time

Neil McKee August 01, 2011 12:26PM

Re: Log Parsing - Near Real Time

Ed W August 05, 2011 02:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 256
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready