Example output on this page is from Asterisk 11.
core show locks
This command is not available until you compile with DEBUG_THREADS and it is generally preferred that you also compile with BETTER_BACKTRACES to get the most useful output.
If compiled with at least DEBUG_THREADS enabled and if you have glibc, then issuing the "core show locks" CLI command will give lock information output as well as a backtrace of the stack which led to the lock calls.
See the Getting a Backtrace (Asterisk versions < 13.14.0 and 14.3.0) page for an example on why you might use this command.
Examples: (both a lock during a feature code attended transfer)
core show taskprocessors
List instantiated task processors and statistics
core show threads
Shows running threads! Doesn't require any compilation flags to be set.
core show fd
This command is not available until you compile Asterisk with DEBUG_FD_LEAKS (found under compiler flags in menuselect).
Shows file descriptors open by Asterisk.