Note
- For V4.3.x, this parameter is available starting with V4.3.1.
- For V4.2.x, 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, will be deleted.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query 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, indicating 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 uncompressed log files in the
{install_path}/logdirectory.The
syslog_disk_sizeparameter is based on thedu -sh (disk usage)statistics method, which calculates the total disk block size occupied by all files in the log directory. This is different from thedf -h (disk free)statistics method, which displays the usage of the entire disk partition (including metadata and cache), and also 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=0andsyslog_disk_size=0: No log recycling occurs until the disk is full.max_syslog_file_count=0andsyslog_disk_size>0: When the total log size approachessyslog_disk_size, the oldest log files are deleted to recycle space.max_syslog_file_count>0andsyslog_disk_size=0: When the number of a certain type of log file 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 a certain type of log file exceedsmax_syslog_file_countor when the total log size approachessyslog_disk_size, the oldest compressed files are deleted.
Examples
Set the maximum disk space for system logs to 50 GB.
obclient> ALTER SYSTEM SET syslog_disk_size='50GB';