.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TRAFFIC_LOGSTATS" "8" "Jan 06, 2024" "9.2" "Apache Traffic Server" .SH NAME traffic_logstats \- Traffic Server analyzer .SH SYNOPSIS .sp \fBtraffic_logstats\fP [options] .SH DESCRIPTION .sp \fBtraffic_logstats\fP 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. .sp Output can either be a human readable text file, or a JSON format. Parsing can be done incrementally, and \fBtraffic_logstats\fP 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. .sp The per\-URL metrics (\fI\-u\fP) requires that you specify a size of the LRU used for keeping the counters. This is to assure that \fBtraffic_logstats\fP does not consume an exorbitant amount of memory. .SH OPTIONS .INDENT 0.0 .TP .B \-f FILE, \-\-log_file FILE Specific logfile to parse .UNINDENT .INDENT 0.0 .TP .B \-o LIST, \-\-origin_list LIST Only show stats for listed Origins .UNINDENT .INDENT 0.0 .TP .B \-O FILE, \-\-origin_file FILE File listing Origins to show .UNINDENT .INDENT 0.0 .TP .B \-M COUNT, \-\-max_origins COUNT Max number of Origins to show .UNINDENT .INDENT 0.0 .TP .B \-u COUNT, \-\-urls COUNT Produce JSON stats for URLs, argument is LRU size .UNINDENT .INDENT 0.0 .TP .B \-U COUNT, \-\-show_urls COUNT Only show max this number of URLs .UNINDENT .INDENT 0.0 .TP .B \-A, \-\-as_object Produce URL stats as a JSON object instead of array .UNINDENT .INDENT 0.0 .TP .B \-C, \-\-concise Eliminate metrics that can be inferred from other values .UNINDENT .INDENT 0.0 .TP .B \-i, \-\-incremental Incremental log parsing .UNINDENT .INDENT 0.0 .TP .B \-S FILE, \-\-statetag FILE Name of the state file to use .UNINDENT .INDENT 0.0 .TP .B \-t, \-\-tail Parse the last seconds of log .UNINDENT .INDENT 0.0 .TP .B \-s, \-\-summary Only produce the summary .UNINDENT .INDENT 0.0 .TP .B \-j, \-\-json Produce JSON formatted output .UNINDENT .INDENT 0.0 .TP .B \-c, \-\-cgi Produce HTTP headers suitable as a CGI .UNINDENT .INDENT 0.0 .TP .B \-m, \-\-min_hits Minimum total hits for an Origin .UNINDENT .INDENT 0.0 .TP .B \-a, \-\-max_age Max age for log entries to be considered .UNINDENT .INDENT 0.0 .TP .B \-l COUNT, \-\-line_len COUNT Output line length .UNINDENT .INDENT 0.0 .TP .B \-T TAGS, \-\-debug_tags TAGS Colon\-Separated Debug Tags .UNINDENT .INDENT 0.0 .TP .B \-r, \-\-report_per_user Report stats per username of the authenticated client \fBcaun\fP instead of host, see \fI\%squid log format\fP .UNINDENT .INDENT 0.0 .TP .B \-n, \-\-no_format_check Don\(aqt validate the log format field names according to the \fI\%squid log format\fP\&. This would allow squid format fields to be replaced, i.e. the username of the authenticated client \fBcaun\fP with a random header value by using \fBcqh\fP, or to remove the client\(aqs host IP address from the log for privacy reasons. .UNINDENT .INDENT 0.0 .TP .B \-h, \-\-help Print usage information and exit. .UNINDENT .INDENT 0.0 .TP .B \-V, \-\-version Print version information and exit. .UNINDENT .SH COPYRIGHT 2024, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .