Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 May 2002 23:20:28 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        RichardH <rh@storm2k.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Parsing Log Files
Message-ID:  <3CD0B07C.6030207@potentialtech.com>
References:  <5.1.0.14.0.20020501192418.02cea050@pop.wsonline.net>

next in thread | previous in thread | raw e-mail | index | archive | help
RichardH wrote:
> I have looked all in here and on the net for more specific info on 
> parsing access logs for multiple user accounts. If I have 300 users on a 
> server and want to have a "log" directory in each users home directory 
> is there a script or a simple grep that will pull that users info from 
> the raw access logs and split/parse the info out to the individual log 
> directory in each users account so that it can then be viewed by the 
> user with AWStats, Analog, etc. I know this has to be accomplished 
> failry easily but cannot find any links or data giving the exact way of 
> doing it. Any input would be greatly appreciated. OS is FreeBSD4.5 
> w/Apache Web Server 1.3.24.

<SNIP>

> The above post says 300 users as an example, actually looking at 3000+ 
> users per server.
> 
> Any input, tips, etc. would be greatly appreciated.
> Thanks,Richard Hutson

Have you tried simply running a grep on the main log at a certain schedule
to extract the records that pertain to a specific host?  It would work
around your open files concern.
Apache logs are pretty configurable, I don't remember details, but it should
be possible to ensure that each virtual host puts something in the log
file that is distinct, that can then be grepped out.
If you run the grep processes on a daily basis, you should probably stagger
them.  3000 greps trying to extract data from the same file at the same time
is going to be a HUGE load.  Probably a script that simply ran all the required
greps, one after another in succession would work.


-- 
Bill Moran
Potential Technology
http://www.potentialtech.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CD0B07C.6030207>