From owner-freebsd-questions Wed May 1 20:16: 6 2002 Delivered-To: freebsd-questions@freebsd.org Received: from infinity.aesredfish.net (ns1.aesredfish.net [65.168.0.12]) by hub.freebsd.org (Postfix) with ESMTP id 54C9B37B41C for ; Wed, 1 May 2002 20:16:01 -0700 (PDT) Received: from potentialtech.com (mhope-dhcp-65-168-1-181.dashfast.com [65.168.1.181]) by infinity.aesredfish.net (8.11.6/8.11.0) with ESMTP id g423FJU21984; Wed, 1 May 2002 23:15:20 -0400 Message-ID: <3CD0B07C.6030207@potentialtech.com> Date: Wed, 01 May 2002 23:20:28 -0400 From: Bill Moran Organization: Potential Technologies User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.3) Gecko/20010914 X-Accept-Language: en-us MIME-Version: 1.0 To: RichardH Cc: questions@FreeBSD.ORG Subject: Re: Parsing Log Files References: <5.1.0.14.0.20020501192418.02cea050@pop.wsonline.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. > 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