Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2000 09:12:14 +0200
From:      Mark Rowlands <mark.rowlands@minmail.net>
To:        Andy Farkas <andyf@speednet.com.au>, Mauricio Westendorff Pegoraro <mwp@pucrs.br>
Cc:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Squid Statistics
Message-ID:  <00072609154600.02236@marbsd.tninet.se>
In-Reply-To: <Pine.BSF.4.10.10007261103140.56070-100000@backup.af.speednet.com.au>
References:  <Pine.BSF.4.10.10007261103140.56070-100000@backup.af.speednet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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 (<LOGF>) {
@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




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