archive-logs.pl - Log Rotation / Archiving Utility

archive-logs.pl [-f] [logsToArchive]

Archives log files that reside in LAWDIR/system. The script that performs log rotation is located in GENDIR/bin. All LSF services must have been stopped before this utility is run. If archive-logs.pl is run without any arguments, the system will use the available values from LAWDIR\system\univ.cfg.

Option Description
[-f] Force the archiving of a file even if it's smaller than MINLOGSIZE (optional)
[logsToArchive] Base names of logs to archive (optional)

Configuration parameters that control the operation of the log rotation utility are located in LAWDIR/system/univ.cfg. The delivered values are the default values. If a parameter in univ.cfg is missing, the default value, which is hardcoded in the script will be used. The user can change the values, and the changes will take effect when LSF is restarted.

Configuration parameter Description
ARCHIVELOGS Turns the log file archive rotation on or off. The default value is FALSE.
  • ON: ARCHIVELOGS TRUE
  • OFF: ARCHIVELOGS FALSE
LOGSTOARCHIVE

Determines the base names of logs to be archived. To set this feature, the values must be comma separated without spaces or extension. If this feature has been turned on (ARCHIVELOGS TRUE), before any of the components such as LATM, LAJS, or LADB are started, the sizes of specified log files in LAWDIR/system are checked against MINLOGSIZE and archived if they exceed that size criterion.

The default action is to archive the LATM, LAJS, and LADB log files with this value: latm,lajs,ladb

MINLOGSIZE Determines the minimum size (in MB) of a log file for it to be archived. The default value is 10.

If the log file size exceeded the minimum log archive size, the log file is moved to logArchives, and a new log file is created when the component starts.

ARCHIVEDIR The directory path in which the log files will be archived.

The default directory path is LAWDIR/system/logArchives

MAXARCHIVES Determines the maximum number of logs of each kind that will be archived. The default value is 5.