Time for action – generating stats in plain text format

Let's say we want to parse our current log file; we can use Calamaris as follows:

$ cd /opt/squid/var/logs/
$ cat access.log  | calamaris -a

By default, Calamaris generates stats in plain text format and prints them on a standard output. To output the stats to a text file, we can use Calamaris as follows:

$ cat access.log  | calamaris -a --output-file access_stats.txt

The content of access_stats.txt should look similar to the following:

# Summary
Calamaris statistics
------------------------------------------ ----------- --------
lines parsed:                                    lines 50405872
invalid lines:                                   lines        1
parse time:                                        sec     2456
parse speed:                                 lines/sec    20524
------------------------------------------ ----------- -------- ...

Get Squid Proxy Server 3.1 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.