Date: 05 Jun 2003 01:50:40 +0000 From: Murray Taylor <murraytaylor@bytecraftsystems.com> To: keith@smmc.qld.edu.au Cc: freebsd-questions@freebsd.org Subject: Re: How to analyse squid logs and wierd time stamps Message-ID: <1054777839.77085.28.camel@mjtdev1.dand06.au.bytecraft.au.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
Strange as it seems ... one of our netadmins came to me with the same query, so I created this little program #include <stdio.h> #include <time.h> 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. ************************************************************************
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1054777839.77085.28.camel>