From owner-freebsd-questions@FreeBSD.ORG Wed Jun 4 18:50:55 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C64F37B401 for ; Wed, 4 Jun 2003 18:50:55 -0700 (PDT) Received: from svmarshal.bytecraft.au.com (svmarshal.bytecraft.au.com [203.39.118.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E9DE43FB1 for ; Wed, 4 Jun 2003 18:50:53 -0700 (PDT) (envelope-from murraytaylor@bytecraftsystems.com) Received: from wombat.dand02.au.bytecraft.au.com (Not Verified[10.0.0.3]) by svmarshal.bytecraft.au.com with MailMarshal (v5,0,3,78) id ; Thu, 05 Jun 2003 11:52:50 +1000 Received: from ?GD?U??W8?? ???j (mjtdev1.dand06.au.bytecraft.au.com [10.0.17.42]) by wombat.dand02.au.bytecraft.au.com (Postfix) with ESMTP id 8D0793F0A; Thu, 5 Jun 2003 11:50:40 +1000 (EST) From: Murray Taylor To: keith@smmc.qld.edu.au In-Reply-To: <2280.10.0.0.2.1054777172.squirrel@localhost.smmc.qld.edu.au> References: <2280.10.0.0.2.1054777172.squirrel@localhost.smmc.qld.edu.au> Content-Type: text/plain Organization: Bytecraft Systems Message-Id: <1054777839.77085.28.camel@mjtdev1.dand06.au.bytecraft.au.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.3.3 (Preview Release) Date: 05 Jun 2003 01:50:40 +0000 Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: How to analyse squid logs and wierd time stamps X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2003 01:50:55 -0000 Strange as it seems ... one of our netadmins came to me with the same query, so I created this little program #include #include void main(int argc, char *argv[]) { time_t clockval; if ( argc != 2 ) { printf("\nUsage: ctime time_in_seconds\n"); printf("returns DDD MMM dd HH:MM:SS YYYY\n"); printf(" in local timezone ...\n\n"); printf("To get GMT use\n"); printf("env TZ=GMT ctime time_in_seconds\n\n"); return; } argv++; sscanf(argv[0],"%lu", &clockval); printf("clockval = %ld\n", clockval); printf ("time = %s\n", ctime(&clockval)); } It should be self explanatory once compiled ... cheers mjt On Thu, 2003-06-05 at 01:39, keith@smmc.qld.edu.au wrote: > Hi all, > Here is a squid log sample... > 1049884671.477 240 10.0.1.121 TCP_HIT/200 744 GET > ftp://ftpav.ca.com/pub/inoculan/scaneng/Siglist.txt - NONE/- text/plain > ... Whoa! > Anyone know of a port to analyse this stuff and change what MIGHT be a > timestamp to something a mortal like me can read?? > Appreciate help > Keith > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > ************************************************************************ > This Email has been scanned for Viruses by MailMarshal. > ************************************************************************ ************************************************************************ This Email has been scanned for Viruses by MailMarshal. ************************************************************************