Note
This parameter was introduced in OceanBase Database V1.4.
Description
max_syslog_file_count specifies the maximum number of log files that can be retained.
Note
- This parameter controls only the number of uncompressed log files.
- Each log file can occupy at most 256 MB of disk space.
Limitations
Query the parameter
In the
systenant or a user tenant, you can execute theSHOW PARAMETERSstatement to query the parameter or query theGV$OB_PARAMETERSview for the parameter.Modify the parameter
You can modify the parameter only in the
systenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Integer |
| Default value | 0, which indicates that no log files will be deleted. |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
The relationship between the max_syslog_file_count parameter and the syslog_disk_size parameter is as follows:
max_syslog_file_count=0andsyslog_disk_size=0: Log files are not deleted until the disk is full.max_syslog_file_count=0andsyslog_disk_size>0: When the total size of log files is close to the value specified bysyslog_disk_size, the earliest log file is deleted to recycle disk space.max_syslog_file_count>0andsyslog_disk_size=0: When the number of specific log files exceeds the value specified bymax_syslog_file_count, the earliest log file is deleted to recycle disk space.max_syslog_file_count>0andsyslog_disk_size>0: When the number of specific log files exceeds the value specified bymax_syslog_file_countor the total size of log files is close to the value specified bysyslog_disk_size, the earliest compressed log file is deleted.
Examples
Set the maximum number of system log files that can be retained to 20.
obclient> ALTER SYSTEM SET max_syslog_file_count=20;