Python thread dump
Question:
Is there a way to get a thread dump from a running Python process?
Similar to kill -3 on a Java process.
Answers:
I havent seen anything built-in, but I have seen a solution here which can be exposed via http console. The solution iterates over all threads and outputs the stack.
As this is an old question, but it is number one in Google, so let me answer.
Python has had a faulthandler module for some time now (a decade or so). This is a built-in way to give you a thread dump of any running Python process.
Is there a way to get a thread dump from a running Python process?
Similar to kill -3 on a Java process.
I havent seen anything built-in, but I have seen a solution here which can be exposed via http console. The solution iterates over all threads and outputs the stack.
As this is an old question, but it is number one in Google, so let me answer.
Python has had a faulthandler module for some time now (a decade or so). This is a built-in way to give you a thread dump of any running Python process.