squidsites - a Squid access log analyzer
squidsites is a tool that parses Squid access log file (usually /usr/local/squid/logs/access.log) and generates a report of the most visited sites, sorting by hit count or by bytes count.
2. Installing squidsites
squidsites comes with a compressed tar file. To expand, type
gunzip -c squidsites-x.x.tar.gz | tar tvf -
where x.x is the version of squidsites you have.
Cd into the src/ subdirectory.
Now you should have an executable file called squidsites.
3. Using squidsites
squidsites is extremely simple to use.
squidsites < /usr/local/squid/logs/access.log
will generate a report on console, sorting sites by hit count.
squidsites -b < /usr/local/squid/logs/access.log
will generate a report on console, sorting sites by bytes count.
squidsites -b < /usr/local/squid/logs/access.log > report.txt
will generate a report on file report.txt, sorting sites by bytes count. You can also use squidsites as a filter:
cat /usr/local/squid/logs/access.log | squidsites > report.txt
4. Related tools
squidclients, by Nico Tranquilli (http://www.cineca.it/~nico/squidclients.html)