SET ACTLOGRETENTION (Set the retention period or the size of the activity log)

Use this command to manage the activity log records by date or size. The activity log contains normal activity messages generated by the server. These messages include information about server and client operations, such as the start time of sessions or device I/O errors.

Activity log information includes messages, such as the following:
  • Client session starts and ends
  • Migration starts and ends
  • Diagnostic error messages
  • Scheduled administrative command output
At server installation, activity log management is retention-based, and the retention period is set to 30 days.

You can choose to adjust the length of time that the activity log retains messages to avoid insufficient or outdated data. The server automatically removes the messages from the activity log after the retention period passes.

Alternatively, you can choose to limit the total size of the activity log to control the amount of space occupied by the activity log. The server will periodically remove the oldest activity log records until the activity log size no longer exceeds the configured maximum size allowed.

You can issue the QUERY STATUS command to display the current number of records in the activity log and the size (in megabytes) that the activity log currently occupies.

Privilege class

To issue this command, you must have system privilege.

Syntax

Read syntax diagramSkip visual syntax diagramSet ACTlogretentionnumberMgmtstyle=DateMgmtstyle=DateSize

Parameters

number (Required)
Specifies the number of days to retain messages in the activity log when the log is managed by date, or specifies the maximum size of the activity log when it is managed by size. With retention-based management, a value of 1 specifies to retain the activity log records only for the current day. With size-based management, a value of 1 specifies a maximum size of 1 MB for the activity log. You can specify a number from 0 to 9999. A value of 0 disables activity log retention.
Mgmtstyle
Specifies whether activity log management is retention-based or size-based. This parameter is optional. The default is DATE. Possible values are:
Date
Specifies that activity log management is retention-based.
Size
Specifies that activity log management is size-based.

Example: Set the activity log retention period

Set the server to retain activity log records for 60 days. Issue the command:
set actlogretention 60

Example: Set the activity log size

Set the server to limit the size of the activity log to 300 MB. Issue the command:
set actlogretention 300 mgmtstyle=size

Related commands

Table 1. Command related to SET ACTLOGRETENTION
Command Description
QUERY ACTLOG Displays messages from the server activity log.
QUERY STATUS Displays the settings of server parameters, such as those selected by the SET commands.