Note
For V4.2.3, this parameter is available starting with V4.2.3.
Description
syslog_disk_size specifies the maximum disk space for system logs. When the total size of system logs approaches this limit, the oldest log files, including compressed ones, are deleted.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query the value of this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | CAP |
| Default value | 0M, which indicates that disk space recycling is disabled. |
| Value range | [0, +∞) |
| 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 system log files stored by this parameter include all compressed and non-compressed log files in the
{install_path}/logdirectory.The
syslog_disk_sizeparameter is based on thedu -sh (disk usage)principle, which calculates the total disk space occupied by all files in the log directory. This is different from thedf -h (disk free)principle, which displays the usage of the entire disk partition, including metadata and cache, and also counts deleted files that are still being used by processes.The relationship between the
syslog_disk_sizeparameter and the max_syslog_file_count parameter:max_syslog_file_count=0andsyslog_disk_size=0: No log recycling is performed until the disk is full.max_syslog_file_count=0andsyslog_disk_size>0: When the total size of logs approachessyslog_disk_size, the oldest log files are deleted to recycle space.max_syslog_file_count>0andsyslog_disk_size=0: When the number of log files of a certain type exceedsmax_syslog_file_count, the oldest log files are deleted to recycle space.max_syslog_file_count>0andsyslog_disk_size>0: When the number of log files of a certain type exceedsmax_syslog_file_countor when the total size of logs approachessyslog_disk_size, the oldest compressed log files are deleted to recycle space.
Examples
Set the maximum disk space for system logs to 50 GB.
obclient> ALTER SYSTEM SET syslog_disk_size='50GB';