When using strace to attach to a process that is running many threads, use the following format for a system call summary:
strace -f -c -p PID -o /tmp/outfile.strace
To run a trace without a summary, which will result in voluminous amounts of space, omit the ‘-c’:
strace -f -p PID -o /tmp/outfile.strace
This will capture system calls from all threads within the process.