Skip to main content

Check what code is currently running on a server

ClickHouse has a built-in debugger and introspection capabilities. For example, you can get the stack traces of every server’s thread at runtime by querying the system.stack_trace table:
The query result will show the locations in the ClickHouse source code where the threads are running or waiting. (You will need to set allow_introspection_functions to 1 to enable the introspection functions.) The response looks like:
If you installed ClickHouse from a .deb/.rpm/.tgz you can also install the package with the debug info to see the line numbers from the source code:
If you’ve installed ClickHouse as a single-binary, it already contains the debug info.
For more high-level information, check out some of these other system tables:And there is handy info in the other system tables also.
Last modified on July 2, 2026