NDB Cluster Internals  / NDB Kernel Blocks  /  The THRMAN Block

4.20 The THRMAN Block

This is the thread management block, and executes in every NDB kernel thread. This block is also used measure thread CPU usage and to write this and other information into thethreadblocks andthreadstat tables in thendbinfo information database.

TheTHRMAN block is implemented as theThrman class, in the filestorage/ndb/src/kernel/blocks/thrman.hpp.thrman.cpp, found in the same directory, defines ameasure_cpu_usage() method of this class for measuring the CPU usage of a given thread. It also defines aexecDBINFO_SCANREQ() method, which writes this and other information about the thread such as its thread ID and block number to thethreadblocks andthreadstat tables.