Errorlogretention

The errorlogretention option specifies how many days to maintain error log entries before pruning, and whether to save the pruned entries in other files.

The error log is pruned when the first error is written to the log after a client session is started. If the only session you run is the client scheduler, and you run it twenty-four hours a day, the error log might not be pruned according to your expectations. Stop the session and start it again to allow the scheduler to prune the error log.

If you change from log pruning (errorlogretention option) to log wrapping (errorlogmax option), all records in the existing log are copied to the dsmerlog.pru log file, the existing log is emptied, and logging begins using the new log wrapping criteria.

If you change from log wrapping (errorlogmax option) to log pruning (errorlogretention option), all existing log entries are retained and the log is pruned using the new errorlogretention criteria. Pruned log entries are saved in a file called dsmerlog.pru.

If neither errologmax nor errorlogretention is specified, the error log can grow without any limit on its size. You must manually manage the log contents to prevent the log from depleting disk resources. When the log has been created with neither option specified, if you later issue a command and specify the errorlogretention option, the log is pruned using the retention value specified. When the log has been created with neither option specified, if you later issue a command and specify the errorlogmax option, the existing log is treated as if it was a pruned log. That is, the content of the dsmerror.log file is copied to a file called dsmerlog.pru and new log entries are created in dsmerror.log and the log is wrapped when it reaches its maximum size.

Note: If you specify errorlogretention option to create pruned logs, you cannot specify the errorlogmax option. Logs can be pruned or wrapped, but not both.
AIX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systems

Supported Clients

This option is valid for all clients.

Options File

AIX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsPlace this option in the client system-options file (dsm.sys) within a server stanza.

Windows operating systemsPlace this option in the client options file (dsm.opt).

AIX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsWindows operating systemsYou can also set this option on the Client preferences tab in the GUI, by selecting Prune old entries and by specifying a value for Prune entries older than. Selecting the Save pruned entries option saves the pruned log entries in the dsmerlog.pru log file.

Syntax

Read syntax diagramSkip visual syntax diagram
                      .-N----.  .-D-.   
>>-ERRORLOGRetention--+------+--+---+--------------------------><
                      '-days-'  '-S-'   

Parameters

N or days
Specifies how long to wait before pruning the error log.
N
Do not prune the error log. This permits the error log to grow indefinitely. This is the default.
days
The number of days to keep log file entries before pruning the log. The range of values is zero through 9999.
D or S
Specifies whether to save the pruned entries. Enter a space or comma to separate this parameter from the previous one.
D
Discard the error log entries when you prune the log. This is the default.
S
Save the error log entries when you prune the log.

The pruned entries are copied from the error log to the dsmerlog.pru file located in the same directory as the dsmerror.log file.

Examples

Options file:

Prune log entries from the dsmerror.log file that are older than 365 days and save the pruned entries in dsmerlog.pru.

errorlogretention 365 S
Command line:
-errorlogr=365,S
Options file:

Prune log entries from the dsmerror.log file that are older than 365 days and do not save the pruned entries.

errorlogretention 365 D

This option is valid only on the initial command line. It is not valid in interactive mode.