If one of our linux system is overloaded, then I would like to take a snapshot of what is going on.
99% of our code is Python, that's why I would like to get a stacktrace of all running python interpreters.
I have no clue how to get the stacktrace of python processes.
This question is only about how to get the stacktrace. The condition which checks if I want it to happen is a different question (which is already solved).
I know that it is possible to get the stacktrace by using a signal handler (See here), but I would like to avoid this. The python source code should not get modified to solve this.