Accelerator automatically rotates session logs using default settings. The session log naming conventions and rotation behaviors are as follows:
stdout or stderr logs go to
consoleN.log(where N is the agent number).
Normal session trace messages go to
ecagentN.log(where N is the agent number).
Only session trace logs will be rotated.
The default size limit for log files before being rotated is 1 GB.
The default number of rotated files to keep is 20. When that limit is reached, the oldest log files will begin to be deleted to make space for newer logs.
The most recent log messages are in
ecagentN.log. When the log file reaches its size limit, that file is renamed to
ecagentN.log.1already exists, then it is renamed to
ecagentN.logis renamed to
ecagentN.log.2exists, it is first renamed to
ecagentN.log.3and so on. This rotation continues until the retain count is met, at which point file deletion begins.
To configure agent log rotation, you edit the
Navigate to the
runagent.localfile. If this file does not already exist, you must create it. This file uses Tcl script syntax.
Add the desired options using this format:
session logger <option>
session logger retaincount 10
Available log rotation options:
Get or set the maximum file size for log files before they are rotated. The default is 1 GB.
Get or set the file name to log to. The default for UNIX is
Get or set the number of rotated log files to retain before starting to delete them. The default is 20. To turn off log rotation, set to 0.
Clear the contents of the ecagent N .log file. This is useful when log rotation is turned off.