100
Chapter 12
Working with Log Files
•
If the autodelete option (discussed in
Rolling event log files‚ on page 109
) is enabled, Traffic Server
identifies previously rolled log files (log files with a
.old
extension) and starts deleting files one by one—
beginning with the oldest file—until it emerges from the low state. Traffic Server logs a record of all files
it deletes in the system error log.
•
If the autodelete option is disabled, or there are not enough old log files to delete for the system to emerge
from its low space state, Traffic Server issues a warning and continues logging until space is exhausted, at
which point it stops event logging. Traffic Server resumes event logging when enough space becomes
available for it to exit its low space state. You can make space available either by removing files from the
logging directory manually or by explicitly increasing the logging space limit.
You can run a
cron
script in conjunction with Traffic Server to automatically remove old log files from the
logging directory (before Traffic Server enters the low space state) and relocate them to a temporary partition.
Once the files are relocated, you can run a variety of log analysis scripts on them, after which you can compress
the logs and move them to an archive location or simply delete them.
Setting log file management options
You can set log management options by using Traffic Manager or by editing a configuration file manually.
Both procedures are provided below.
To set log management options from Traffic Manager:
1. Access Traffic Manager from your browser (refer to
Accessing Traffic Manager‚ on page 8
).
2. On the Configure tab, click the Logging button.
3. Scroll to the Log Management section of the Logging page (shown below).
4. In the Log directory field, enter the name and path of the directory in which you want to store event log
files. The default directory is
logs
located in Traffic Server’s installation directory.
5. In the Log space limit field, enter the maximum amount of space you want to allocate to the logging
directory.
6. In the Log space headroom field, enter the tolerance for the log space limit. If the Autodelete rolled log
files when space is low option is enabled in the Log File Rolling section of the Logging page, auto
deletion is triggered when the amount of free space available in the logging directory is less than the
headroom.
7. Click the Make These Changes button.
To set log management options manually:
1. Telnet into the HP web cache appliance and select Shell Access as described in
Overview of Access
Methods‚ on page 7
.
2. Open the
records.config
file located in the Traffic Server’s
config
directory with Vi.