Re: [squid-users] HowDo I: Get Date stamp on the access.log

From: Michael W. Lucas <mwlucas@dont-contact.us>
Date: Wed, 2 Aug 2006 09:00:08 -0400

I'm lazy, and hate remembering commands like that. I have a shell script:

$ cat squidtime.sh
#!/bin/sh

p
erl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'

(yeah, yeah, it's a sh script that calls perl. What part of "I'm
lazy" didn't you understand? :-)

This lets me do:

$ cat access.log | squidtime.sh | less

On Wed, Aug 02, 2006 at 01:56:56PM +0100, Paul Mattingly wrote:
> I was looking at a similar issue today and needed to convert the epoch
> time into a human readable time on the command line. With FreeBSD you
> can use
>
> date -r <epoch time>
>
> i.e.
>
> # date -r 1154520379
> Wed Aug 2 13:06:19 BST 2006
> #
>
> I imagine you can do this with other OSs using their specific syntax.
>
> Paul.
>
>
> -----Original Message-----
> From: John Walubengo [mailto:jwalu@yahoo.com]
> Sent: 10 July 2006 06:48
> To: Geoff Varney
> Cc: squid-users@squid-cache.org
> Subject: RE: [squid-users] HowDo I: Get Date stamp on the access.log
>
> Thanx Geoff.
>
> U have given me exactly what I needed; a step by step
> solution aka the 'dummy's version' ;-).
>
> thanx alot.
>
> walu.
>
> --- Geoff Varney <geoff.varney@esd112.org> wrote:
>
> > John,
> > Here are the files if you're interested.
> >
> > Geoff
> >
> > -----Original Message-----
> > From: John Walubengo [mailto:jwalu@yahoo.com]
> > Sent: Friday, July 07, 2006 1:39 AM
> > To: Guido Serassio; Laurent Marc 00
> > Cc: squid-users@squid-cache.org
> > Subject: Re: [squid-users] HowDo I: Get Date stamp on the
> > access.log
> >
> > Below is my sample access.log data:
> >
> > 1152258629.089 23364 172.16.32.80 TCP_MISS/200 4625 GET
> > http://www.pcreview.co.uk/template/vbulletin.css student
> > DIRECT/70.86.33.18 text/css
> >
> > 1152258629.261 2792 172.16.32.80 TCP_MISS/200 2570 GET
> > http://www.htmlgoodies.com/css/starlight/star-light.css
> > student DIRECT/63.236.73.67 text/css
> >
> >
> > It is basically the default log; how can i get it to show
> > the date:time stamp so that I get to know WHEN the users
> > accessed these sites?
> >
> > walu.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection
> > around
> > http://mail.yahoo.com
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

-- 
Michael W. Lucas	mwlucas@FreeBSD.org, mwlucas@BlackHelicopters.org
		http://www.BlackHelicopters.org/~mwlucas/
	    Latest book: PGP & GPG -- http://www.pgpandgpg.com
"The cloak of anonymity protects me from the nuisance of caring." -Non Sequitur
Received on Wed Aug 02 2006 - 07:00:14 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:01 MDT