You can search logs by using the keywords "dump tenant info" to view tenant information, such as resource specifications, threads, queues, and request statistics.
Note
Logs are printed for each tenant every 30 seconds.
grep 'dump tenant info.tenant={id:1002' log/observer.log | sed 's/,/,\n/g'
[2022-07-20 14:55:40.774143] INFO [SERVER.OMT] run1 (ob_multi_tenant.cpp:1993) [80700][MultiTenant][T0][Y0-0000000000000000-0-0] [lt=621]
dump tenant info(tenant={id:1002, // The ID of the tenant.
tenant_meta:{unit:{tenant_id:1002, // The tenant metadata, including the unit configuration, superblock, and creation status of the tenant.
unit_id:1001, // The ID of the unit.
has_memstore:true, // Indicates whether a MemTable is contained.
unit_status:"NORMAL", // The status of the unit. Valid values: NORMAL, MIGRATE_IN, MIGRATE_OUT, MARK_DELETING, WAIT_GC_IN_OBSERVER, DELETING_IN_OBSERVER, and ERROR_STAT.
config:{unit_config_id:1003, // The ID of the unit configuration.
name:"2c2g", // The name of the unit configuration.
resource:{min_cpu:2, // The minimum number of CPU cores of the unit configuration.
max_cpu:2, // The maximum number of CPU cores of the unit configuration.
memory_size:"1.5GB", // The memory size of the unit configuration.
log_disk_size:"5.4GB", // The log disk size of the unit configuration.
min_iops:20000, // The minimum disk IOPS of the unit configuration.
max_iops:20000, // The maximum disk IOPS of the unit configuration.
iops_weight:2}}, // The IOPS weight of the unit configuration.
mode:1, // The compatibility mode of the tenant.
create_timestamp:1658298418435426, // The time when the unit was created.
is_removed:false}, // Indicates whether the unit is marked as deleted.
super_block:{tenant_id:1002, // The superblock of the tenant.
replay_start_point:ObLogCursor{file_id=1, // The slog replay point of the tenant.
log_id=440,
offset=343322},
ls_meta_entry:[140](ver=0, // The entry point of the linked table that stores slog checkpoints of the log stream metadata of the tenant.
mode=0,
seq=139),
tablet_meta_entry:[141](ver=0, // The slog checkpoint entry of the tablet metadata of the tenant.
mode=0,
seq=140)},
create_status:1}, // The creation status of the tenant. Valid values: 0: CREATING; 1: CREATE_COMMIT; 2: CREATE_ABORT; 3: DELETING; 4: DELETE_COMMIT.
unit_min_cpu:"2.000000000000000000e+00", // The minimum number of CPU cores guaranteed.
unit_max_cpu:"2.000000000000000000e+00", // The maximum number of CPU cores available.
slice:"0.000000000000000000e+00",
slice_remain:"0.000000000000000000e+00",
token_cnt:8, // The number of tokens allocated by the scheduler. Each token is converted into a worker thread.
sug_token_cnt:8,
ass_token_cnt:8, // The number of tokens confirmed by the tenant. You can determine the number of tokens based on the token_cnt field. Typically, the values of the two fields are the same.
lq_tokens:2, // The number of large query tokens. The value of this field is equal to the value of the token_cnt field multiplied by the proportion of large queries.
used_lq_tokens:0, // The number of worker threads that hold large query tokens.
stopped:false, // Indicates whether resource units of the tenant are being deleted.
idle_us:6076629, // The total idle time of the worker threads in one round (10s). The idle time counts only the time spent waiting in queues.
recv_hp_rpc_cnt:1, // The cumulative number of RPC requests received by the tenant at different levels, including hp (High), np (Normal), and lp (Low).
recv_np_rpc_cnt:5,
recv_lp_rpc_cnt:0,
recv_mysql_cnt:24, // The cumulative number of MySQL requests received by the tenant.
recv_task_cnt:1, // The cumulative number of internal tasks received by the tenant.
recv_large_req_cnt:0, // The cumulative number of large requests predicted by the tenant. This value only increases and is never cleared. It is incremented on retries.
tt_large_quries:0, // The cumulative number of large requests processed by the tenant. This value only increases and is never cleared. It is incremented when a check is performed.
pop_normal_cnt:1024555,
actives:8, // The number of active worker threads. This value is generally equal to the value of the workers field. The difference between them includes the tenant worker thread cache and the large request cache with worker threads.
workers:8, // The number of worker threads held by the tenant, which is actually the size of the workers_ list.
nesting_workers:7, // The number of dedicated threads held by the tenant for nested requests. A total of seven threads correspond to seven nesting levels.
lq waiting workers:0, // The number of worker threads that are determined to be processing large queries and are suspended waiting for scheduling.
req_queue:total_size=0 queue[0]=0 queue[1]=0 queue[2]=0 queue[3]=0 queue[4]=0 queue[5]=0 , // The worker queues with different priorities. A smaller value indicates a higher priority.
largequeued:0, // The number of large requests currently predicted.
multi_level_queue:total_size=0 queue[0]=0 queue[1]=0 queue[2]=0 queue[3]=0 queue[4]=0 queue[5]=0 queue[6]=0 queue[7]=0, queue[8]=0, queue[9]=0, // The worker queues that accommodate nested requests. The values 1 to 7 correspond to the seven nesting levels. Queue 5 also accommodates inner SQL requests.
recv_level_rpc_cnt:cnt[0]=0 cnt[1]=0 cnt[2]=0 cnt[3]=0 cnt[4]=0 cnt[5]=0 cnt[6]=0 cnt[7]=0 cnt[8]=0 cnt[9]=0, // The cumulative number of requests received at each nesting level.
group_map:group_id = 1, // The threads of the group that corresponds to each group_id in the group_map and their queuing status.
queue_size = 0, // The queuing status of the group queue.
recv_req_cnt = 13526, // The cumulative number of requests in the group that are pushed to the queue.
pop_req_cnt = 13526, // The cumulative number of requests popped out by threads in the group.
token_cnt = 2, // The number of tokens allocated to the group. Each token is converted into a worker thread.
min_token_cnt = 2,
max_token_cnt = 2,
ass_token_cnt = 2 , // The number of confirmed tokens for the group. You can determine the number of tokens based on the token_cnt field. Typically, the values of the two fields are the same.
rpc_stat_info: pcode=0x150a:cnt=1489 pcode=0x150b:cnt=1091}) // The RPC pcodes that have been received most frequently by the tenant in a period. The statistical period is 10 seconds, and the top five RPC pcodes are printed.