Is there a way to relate the Python thread name and thread ID to the POSIX thread ID in Python 3.6? Any of the following would do:
- Get the POSIX thread ID from a
threading.Thread
object - Get the Python thread ID from a
psutil._common.pthread
object - Set the process command-line for the thread (as reported in
/proc/<id>/cmdline
) - Set some other thread property that shows up in
/proc
from Python - Something else
I'm on Linux 4.14 and an embedded platform that's stuck with Python 3.6, unfortunately. I know that Python 3.8 has threading.Thread.native_id
. I have control of the Python process source code and have SSH and root on the system - I can do this from either inside or outside the Python process.