From owner-freebsd-questions Wed Jul 26 0:19:33 2000 Delivered-To: freebsd-questions@freebsd.org Received: from rush.telenordia.se (mail.telenordia.se [194.213.64.42]) by hub.freebsd.org (Postfix) with SMTP id C518237B63B for ; Wed, 26 Jul 2000 00:19:29 -0700 (PDT) (envelope-from mark.rowlands@minmail.net) Received: (qmail 5258 invoked from network); 26 Jul 2000 09:19:28 +0200 Received: from bb-62-5-4-193.bb.tninet.se (HELO marbsd.tninet.se) (62.5.4.193) by mail.telenordia.se with SMTP; 26 Jul 2000 09:19:28 +0200 From: Mark Rowlands Reply-To: mark.rowlands@minmail.net To: Andy Farkas , Mauricio Westendorff Pegoraro Subject: Re: Squid Statistics Date: Wed, 26 Jul 2000 09:12:14 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain Cc: "freebsd-questions@FreeBSD.ORG" References: In-Reply-To: MIME-Version: 1.0 Message-Id: <00072609154600.02236@marbsd.tninet.se> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jul 2000, Andy Farkas wrote: > On Tue, 25 Jul 2000, Mauricio Westendorff Pegoraro wrote: > > > I'd like a program to make statistics on squid. What I want to know is > > something like: computer X accessed page/link Y on time Z (more or less > > like this...). > > That info is in the access.log file generated by squid: > > $ awk '{print $3,$7,$1};' access.log > > Andy Farkas > System Administrator > Speednet Communications > http://www.speednet.com.au/ #! /usr/bin/perl -w open (LOGF, "$ARGV[0]") || die "where's the file $ARGV[0] \n"; while () { @log = split (); $log[0] = localtime($log[0]); print "computer $log[2] accessed page link $log[6] on time $log[0]\n";} should do the trick and give you nice dates too -- Mark Rowlands +4686224510 GMT + 1 _______________________________________________ These opinions are mine, they are just opinions you are free to disagree, please do so quietly _______________________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message