29.7 Cache Report Generation with
Calamaris is a Perl script used to generate reports of cache activity in ASCII or HTML
format. It works with native Squid access log files. The Calamaris home page is located
at http://Calamaris.Cord.de/. The program is quite easy to use.
Log in as root then enter cat access.log | calamaris options >
reportfile. It is important when piping more than one log file that the log files are
chronologically ordered with older files first. These are some options of the program:
TIP: Shell and File Sequences
If you have multiple similar files like access.log.1, access.log.2 and
so on, the default shell bash would sort those files not in the number sequence
when listing access.log.*. To solve this issue, you may use the syntax
access.log.{1..42} which generates a list of files extended with numbers
from 1 to 42.
-a
output all available reports
-w
output as HTML report
-l
include a message or logo in report header
More information about the various options can be found in the program's manual page
with man calamaris.
A typical example is:
cat access.log.{10..1} access.log | calamaris -a -w \
> /usr/local/httpd/htdocs/Squid/squidreport.html
This puts the report in the directory of the Web server. Apache is required to view the
reports.
436
Administration Guide
Calamaris
Need help?
Do you have a question about the LINUX ENTERPRISE SERVER 11 - ADMINISTRATION and is the answer not in the manual?