+ Post New Thread
Results 1 to 7 of 7
Web Development Thread, Format of Squid log time stamp in Coding and Web Development; In March uk101man posted a nice script to read the URL history files kept by Internet Explorer in a user's ...
  1. #1

    Join Date
    Mar 2006
    Posts
    537
    Thank Post
    2
    Thanked 3 Times in 2 Posts
    Rep Power
    19

    Format of Squid log time stamp

    In March uk101man posted a nice script to read the URL history files kept by Internet Explorer in a user's profile. I wanted to write a script to process Squid access log for our on-site proxy but I can't workout the the format of the time stamp it uses.

    Does anyone how to convert it into a human readble format.
    I haven't got the time to go all Blechly Park on its ass.

  2. #2

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,610
    Thank Post
    647
    Thanked 1,616 Times in 1,446 Posts
    Rep Power
    421

    Re: Format of Squid log time stamp

    isn't it the amount of seconds elapsed since a specific time? 1970?

    The format is "Unix time" (seconds since Jan 1, 1970) with millisecond resolution.
    Ben

  3. #3

    Join Date
    Mar 2006
    Posts
    537
    Thank Post
    2
    Thanked 3 Times in 2 Posts
    Rep Power
    19

    Re: Format of Squid log time stamp

    Thanks for that Ben.

    You're not the same Ben of the Unix Time Stamp .com fame are you?

  4. #4

    Join Date
    Mar 2006
    Posts
    537
    Thank Post
    2
    Thanked 3 Times in 2 Posts
    Rep Power
    19

    Re: Format of Squid log time stamp

    Doh!

    Just found this on the Squid mailing list
    Code:
    perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e' <access.log

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Format of Squid log time stamp

    You might want to hook something up more permenant. There's serveral log parsers that will produce pretty reports from squid logs as web pages.

  6. #6

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,610
    Thank Post
    647
    Thanked 1,616 Times in 1,446 Posts
    Rep Power
    421

    Re: Format of Squid log time stamp

    @IT : nope nothing to do with that.

    Cheers.

  7. #7
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,966
    Thank Post
    248
    Thanked 49 Times in 45 Posts
    Blog Entries
    2
    Rep Power
    46

    Re: Format of Squid log time stamp

    @IT Feel the urge to share?

SHARE:
+ Post New Thread

Similar Threads

  1. Even more SP releases in RC format.
    By Kyle in forum Windows
    Replies: 3
    Last Post: 13th December 2007, 04:38 PM
  2. VBS File takes long time to load 1st time?
    By Samson in forum Scripts
    Replies: 3
    Last Post: 4th September 2007, 07:40 AM
  3. squid acl
    By browolf in forum *nix
    Replies: 20
    Last Post: 20th April 2007, 08:55 AM
  4. Who works term time only? How many full time?
    By gwendes in forum General Chat
    Replies: 45
    Last Post: 10th February 2007, 05:38 PM
  5. Linux Format
    By kingswood in forum *nix
    Replies: 22
    Last Post: 23rd October 2005, 11:25 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •