Overview
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 parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Only the
systenant can modify this parameter. User tenants cannot modify it.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | CAP |
| Default Value | 0M indicates that disk space reclamation is disabled. |
| Value range | [0, +∞) |
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
The system log files stored by this parameter include all uncompressed and compressed log files in the
{install_path}/logdirectory.The
syslog_disk_sizeparameter is calculated based on thedu -sh (disk usage)principle, which only counts the total number of disk blocks occupied by all files in the log directory. This is different from thedf -h (disk free)method, which displays the usage of the entire disk partition (including metadata and cache) and counts files that have been deleted but are still being used by processes.The relationship between the
syslog_disk_sizeparameter and the max_syslog_file_count parameter:max_syslog_file_count=0,syslog_disk_size=0: No log recycling is performed until the disk is full.max_syslog_file_count=0,syslog_disk_size>0: When the total log size approachessyslog_disk_size, start deleting the oldest log files to reclaim space;max_syslog_file_count>0,syslog_disk_size=0: When the number of a certain type of log file exceedsmax_syslog_file_count, the oldest log files are deleted to reclaim space;max_syslog_file_count>0,syslog_disk_size>0: When the number of a certain type of log file exceedsmax_syslog_file_count, or when the total log size approachessyslog_disk_size, the oldest compressed files are deleted.
Configuration example
Set the disk space for system logs to 50 GB.
obclient> ALTER SYSTEM SET syslog_disk_size='50GB';
References
- Logs
- Log control methods