=== Strace ===
The following command straces all php-fpm processes and places the output in separate files for each process:
\\
Most appropriate command with good timestamps:
strace -ff -r -o /tmp/php.trace/trace -s1024 -p `pidof php-fpm | tr ' ' ','`
or
strace -ff -tt -o /tmp/php.trace/trace -s1024 -p `pidof php-fpm | tr ' ' ','`
\\
^ Flag ^ Definition ^
| -r | Print relative timestamp upon entry to each sys call. Records the difference between the beginning of successive system calls |
| -tt | Time printed will include microseconds |
| -o | Output file |
| -ff | If -o is specified, each process traced will have its own file name |
| -s | string size |
| -p | PID |
| tr | Translate, squeeze, or delete characters from stdin, writing to stdout |