Scroll to navigation

TRAFFIC_LOGSTATS(8) Apache Traffic Server TRAFFIC_LOGSTATS(8)

NAME

traffic_logstats - Traffic Server analyzer

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

Specific logfile to parse

Only show stats for listed Origins

File listing Origins to show

Max number of Origins to show

Produce JSON stats for URLs, argument is LRU size

Only show max this number of URLs

Produce URL stats as a JSON object instead of array

Eliminate metrics that can be inferred from other values

Incremental log parsing

Name of the state file to use

Parse the last <sec> seconds of log

Only produce the summary

Produce JSON formatted output

Produce HTTP headers suitable as a CGI

Minimum total hits for an Origin

Max age for log entries to be considered

Output line length

Colon-Separated Debug Tags

Report stats per username of the authenticated client caun instead of host, see squid log format

Don't validate the log format field names according to the squid log format. This would allow squid format fields to be replaced, i.e. the username of the authenticated client caun with a random header value by using cqh, or to remove the client's host IP address from the log for privacy reasons.

Print usage information and exit.

Print version information and exit.

COPYRIGHT

2024, dev@trafficserver.apache.org

January 6, 2024 9.2