Using strace to attach to a multi-threaded process (like a JVM/Java)…

When using strace to attach to a process that is running many threads, use the following format:

strace -f -c -p PID  -o /tmp/outfile.strace

This will capture system calls from all threads within the process.

Leave a Reply