How to analyse squid logs and wierd time stamps
Murray Taylor
murraytaylor at bytecraftsystems.com
Wed Jun 4 18:50:55 PDT 2003
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 at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
> ************************************************************************
> This Email has been scanned for Viruses by MailMarshal.
> ************************************************************************
************************************************************************
This Email has been scanned for Viruses by MailMarshal.
************************************************************************
More information about the freebsd-questions
mailing list