Description
You can query logs containing the dump tenant disk usage.*disk_usage keyword from the observer.log file.
Statement
Query INFO logs containing the dump tenant disk usage.*disk_usage={tenant_id: keyword from the observer.log file in the observer log directory, which is /home/admin/oceanbase/log by default.
Here is a sample command, where ob_tenant_id must be replaced with the actual tenant ID:
grep 'dump tenant disk usage.*disk_usage={tenant_id:${ob_tenant_id}' ${observer.log.path}/observer.log
Note
This type of logs is generated every 10 seconds based on the disk usage of the tenant.The query result is as follows:
[2023-05-15 17:30:59.055858] INFO [STORAGE] ob_tenant_disk_usage_mgr.cpp:69 [87424][0][Y0-0000000000000000-0-0] [lt=11] [dc=0] dump tenant disk usage update info(disk_usage={tenant_id:1, max_disk_size:0, used_data_size:935329792, used_meta_size:56623104})
The fields are described as follows:
tenant_id: the ID of the tenant.max_disk_size: the maximum disk usage allowed for the tenant. It is not limited in OceanBase Database of versions earlier than V4.x.used_data_size: the size of disk space occupied by user data in the tenant.used_meta_size: the size of disk space occupied by management data in the tenant.