
99
Chapter 12
Working with Log Files
Traffic Server supports several standard log file formats, such as Squid and Netscape, and user-defined custom
formats. You can analyze the standard format log files with off-the-shelf analysis packages. To help with log
file analysis, you can separate log files so that they contain information specific to protocol or hosts. You can
also configure Traffic Server to roll log files automatically at specific intervals during the day.
The following sections describes the Traffic Server logging system features and discusses how to:
•
Manage your event log files
You can choose a central location for storing log files, set how much disk space to use for log files, and set
how and when to roll log files. See
Managing event log files‚ on page 99
.
•
Choose different event log file formats
You can choose which standard or custom log file formats you want to use for traffic analysis. See
Choosing event log file formats‚ on page 101
.
•
Rotate event log files automatically
You can configure Traffic Server to rotate event log files at specific intervals during the day so that you
can identify and manipulate log files that are no longer active. See
Rolling event log files‚ on page 109
.
•
Separate log files according to protocols and hosts
You can configure Traffic Server to create separate log files for NNTP, ICP, and HTTP/FTP transactions.
You can also configure Traffic Server to generate separate log files for different protocols based on the
host. See
Splitting event log files‚ on page 112
.
•
Collate log files from different Traffic Server nodes
You can designate one or more nodes on the network to serve as log collation servers. These servers, which
may either be stand-alone or part of Traffic Server, enable you to keep all logged information in well-
defined locations. See
Collating event log files‚ on page 115
.
•
View statistics about the logging system
Traffic Server provides statistics about the logging system. You can access the statistics through Traffic
Manager or through Traffic Line. See
Viewing logging statistics‚ on page 119
.
Managing event log files
You can manage your event log files and control where they are located, how much space they can consume,
and how low disk space in the logging directory is handled.
Choosing the logging directory
By default, Traffic Server writes all event log files in the
logs
directory, which is located in the
/home/TS4/
<version>
directory where you installed Traffic Server. To use a different directory, see
Setting log file
management options‚ on page 100
below.
Controlling logging space
Traffic Server allows you to control the amount of disk space that the logging directory can consume. This
allows the system to operate smoothly within a specified space window for a long period of time.
After you establish a space limit, Traffic Server continues to monitor the space in the logging directory. When
the free space dwindles to the headroom limit (see
Setting log file management options‚ on page 100
), it enters
a low space state and takes the following actions: