This topic describes the monitoring metric MemStore usage within an OceanBase Database tenant. You can specify a statistical period to query the MemStore usage in a single zone or on a single OBServer of an OceanBase Database tenant.
MemStore usage
Definition
The usage of MemStore within a tenant in the specified statistical period.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| - | memstore_percent | Percent |
Calculation expression
100 * sum(ob_sysstat{stat_id="130000",@LABELS}) by (@GBLABELS) / sum(ob_sysstat{stat_id="130002",@LABELS}) by (@GBLABELS)
SQL statements for metric collection
If you use OceanBase Database of a version earlier than V4.0, execute the following statement:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130001, 130004) and (con_id > 1000 or con_id = 1) and class < 1000If you use OceanBase Database V4.0 or later, execute the following statement:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130001, 130004) and (con_id > 1000 or con_id = 1) and class < 1000