LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Squid log report by time (https://www.linuxquestions.org/questions/linux-server-73/squid-log-report-by-time-874719/)

yoachan 04-13-2011 04:33 AM

Squid log report by time
 
Dear all,

Does anyone know any log report generator (e.g. webalizer or SARG) which can display Squid's access log by time?
What I mean is I want to see that e.g. during 8:00 till 8:59, what is the most popular site, how many hit, and by whom. I want the report to be able to make a sum per hour.

Awstats can display sum of request per hour, but can't display what sites being requested....

What I actually need is I wan't to make sure that during office hour my clients doesn't open non job related pages, especially during specific hour. We allow our clients to open fun sites (such facebook) during break time, but we need to monitor them during work hour.

I can build a script to get what I want, but I don't want to re-invent the wheel. And I know many other people can do this task much better than I am.

regards,

Yoachan

never say never 04-13-2011 07:23 AM

Take a look at lightsquid.

See if that does what you need, you can look by day, user, time ...


If you want to look at squids logs with a human readable time try something like this.

For realtime:
Code:

tail -f access.log | perl -pe's/([\d.]+)/localtime $1/e;'
Or something like this to just step through the logs
Code:

less access.log | perl -pe's/([\d.]+)/localtime $1/e;'

yoachan 04-13-2011 07:35 AM

@never say never:
Thanks. I'll give lightsquid a shot.

And that realtime tail with pipe, I never thought about that before.
That will be so great. :)
thanks again.

regards,

Yoachan


All times are GMT -5. The time now is 02:14 AM.