The threadstat table provides a rough
snapshot of statistics for threads running in the
NDB kernel.
The threadstat table contains the following
columns:
node_idNode ID
thr_noThread ID
thr_nmThread name
c_loopNumber of loops in main loop
c_execNumber of signals executed
c_waitNumber of times waiting for additional input
c_l_sent_prioaNumber of priority A signals sent to own node
c_l_sent_priobNumber of priority B signals sent to own node
c_r_sent_prioaNumber of priority A signals sent to remote node
c_r_sent_priobNumber of priority B signals sent to remote node
os_tidOS thread ID
os_nowOS time (ms)
os_ru_utimeOS user CPU time (µs)
os_ru_stimeOS system CPU time (µs)
os_ru_minfltOS page reclaims (soft page faults)
os_ru_majfltOS page faults (hard page faults)
os_ru_nvcswOS voluntary context switches
os_ru_nivcswOS involuntary context switches
Notes
os_time uses the system
gettimeofday() call.
The values of the os_ru_utime,
os_ru_stime, os_ru_minflt,
os_ru_majflt, os_ru_nvcsw,
and os_ru_nivcsw columns are obtained using
the system getrusage() call, or the
equivalent.
Since this table contains counts taken at a given point in time, for best results it is necessary to query this table periodically and store the results in an intermediate table or tables. The MySQL Server's Event Scheduler can be employed to automate such monitoring. For more information, see Section 27.5, “Using the Event Scheduler”.