LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Squid access log file (https://www.linuxquestions.org/questions/linux-newbie-8/squid-access-log-file-900542/)

agar_000 09-01-2011 04:59 AM

Squid access log file
 
Dear all,

Please help me to analyse squid access log.It was not clear to me how to analyze the file as the time format is not clear.please give some advice as I am a beginner in LINUX.
Also tell me how to run a file in LINUX

repo 09-01-2011 05:10 AM

The format is "Unix time" (seconds since Jan 1, 1970) with millisecond resolution.
You can use perl to make the time human readable.
Code:

perl -pe 's/\d+/localtime($&)/e' /var/log/squid/access.log
or use log parsers that will produce pretty reports from squid logs as web pages, like webalizer.
http://www.webalizer.org/

Quote:

Also tell me how to run a file in LINUX
Which file do you mean?
Make the file executable
Code:

chmod +x file
Kind regards


All times are GMT -5. The time now is 07:56 AM.