Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
BTHREAD_LIST view displays the operational status of bthread coroutines in the current system. It lists all active bthreads, enabling troubleshooting of performance, blocking, and resource consumption issues.Field Name | Type | Description |
bthread_id | bigint unsigned | The unique identifier for a bthread. |
stop | smallint unsigned | Indicates whether the bthread is currently stopped (0 - running, 1 - stopped). |
interrupted | smallint unsigned | Indicates whether another thread has called bthread_interrupt to interrupt the current bthread (0 - not interrupted, 1 - interrupted). |
about_to_quit | smallint unsigned | Indicates whether the scheduling of the current bthread can be deferred (0 - cannot be deferred, 1 - can be deferred). |
yield_count | smallint unsigned | Represents the bthread (yield) counter, which is used to determine which queue a bthread should be placed in when it actively yields the CPU. |
fn | varchar(32) | The pointer to the entry function called by the bthread. |
arg | varchar(32) | The pointer to the parameters of the entry function called by the bthread. |
attr_stack_type | bigint unsigned | Stack type, with values 0-4, corresponding to the values of bthread_stacktype_t. |
attr_flags | bigint unsigned | Bit flags, corresponding to bthread_attrflags_t. |
attr_keytable_pool | varchar(32) | The pointer to the keytable. |
has_tls | smallint unsigned | Indicates whether the bthread has TLS (Thread Local Storage) (0 - none, 1 - present). |
uptime_ns | bigint | The total runtime of the bthread since its creation (in nanoseconds). |
cputime_ns | bigint | The actual CPU execution time occupied by the bthread (in nanoseconds). |
nswitch | bigint | Number of context switches. |
tdsql > SELECT * FROM information_schema.bthread_list limit 1 \\G*************************** 1. row ***************************bthread_id: 4294980352stop: 0interrupted: 0about_to_quit: 0yield_count: 0fn: 0x556eb9fd33a0arg: 0x7fbc1ab9cd40attr_stack_type: 3attr_flags: 0attr_keytable_pool: NULLhas_tls: 1uptime_ns: 71092709249214cputime_ns: 1273570nswitch: 31 row in set (0.00 sec)
피드백