From owner-freebsd-questions Mon Oct 23 2:50:51 2000 Delivered-To: freebsd-questions@freebsd.org Received: from sentry.granch.com (sentry.granch.com [212.109.197.55]) by hub.freebsd.org (Postfix) with ESMTP id 4008737B479 for ; Mon, 23 Oct 2000 02:50:40 -0700 (PDT) Received: from sentry.granch.ru (IDENT:shelton@localhost [127.0.0.1]) by sentry.granch.com (8.9.3/8.9.3) with ESMTP id QAA49670; Mon, 23 Oct 2000 16:47:36 +0700 (NOVST) Message-ID: <39F40938.F2C9C5F2@sentry.granch.ru> Date: Mon, 23 Oct 2000 16:47:36 +0700 From: "Rashid N. Achilov" Reply-To: achilov@granch.ru Organization: Granch Ltd. X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: Sergey Nikolayev Cc: freebsd-questions@FreeBSD.ORG Subject: Re: A question about log References: <000801c03a65$a5e79760$210aa8c0@radiant.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sergey Nikolayev wrote: > located in Samara, Russia, is using a FreeBSD-based proxy (Squid? - not > sure) to connect our office to the Internet. It is possible to get logs and > control what was accessed, but what do all those records mean? In practice, > I'm interested to see time when an URL was accessed, and the downloaded > resource size. Squid proxy could be configured to write its logs in httpd-like format, but many Squid log analyzers confused, when try to parse it. If you will automatic check your log, you can try Calamaris (exist in ports collection). If you prefer to see log manually you can use this script to convert in more readable format (first field - time, second - URL, third - size) #!/usr/bin/perl if ($ARGV[0] eq '') { printf STDERR "Input file missing. Run: newlog \n"; exit; } open(INLOG,$ARGV[0]); while ($name = ) { chop $name; @line = split(/\s+/,$name); $string = localtime(@line[0]); printf "%s %25s %10s %s %s %s %s %s %s %s\n",$string,@line[2],@line[4],@line[5],@line[6],@line[1],@line[3],@line[7],@line[8],@line[9]; } close(INLOG); -- With Best Regards. Rashid N. Achilov (RNA1-RIPE), Brainbench ID: 28514 Granch Ltd. system administrator, e-mail: achilov@granch.ru tel/fax (383-2) 24-2363 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message