traffic_logstats

Synopsis

traffic_logstats [options]

Description

traffic_logstats is a log parsing utility, that is intended to produce metrics for total and per origin requests. Currently, this utility only supports parsing and processing the Squid binary log format, or a custom format that is compatible with the initial log fields of the Squid format.

Output can either be a human readable text file, or a JSON format. Parsing can be done incrementally, and traffic_logstats supports restarting where it left off previously (state is stored in an external file). This is useful when collecting metrics periodically into a stats processing system, and also supports the case where a log file is rotated.

The per-URL metrics (-u) requires that you specify a size of the LRU used for keeping the counters. This is to assure that traffic_logstats does not consume an exorbitant amount of memory.

Options

-f FILE, --log_file FILE
-o LIST, --origin_list LIST
-O FILE, --origin_file FILE
-M COUNT, --max_origins COUNT
-u COUNT, --urls COUNT
-U COUNT, --show_urls COUNT
-A, --as_object
-C, --concise
-i, --incremental
-S FILE, --statetag FILE
-t, --tail
-s, --summary
-j, --json
-c, --cgi
-m, --min_hits
-a, --max_age
-l COUNT, --line_len COUNT
-T TAGS, --debug_tags TAGS
-h, --help

Print usage information and exit.

-V, --version

Print version information and exit.