Strace for php-fpm processes

live stream syscalls output:
strace -s 1024 -f $(pidof php-fpm | sed ‘s/([0-9]*)/-p 1/g’)

report syscalls count output:
strace -s 1024 -f $(pidof php-fpm | sed ‘s/([0-9]*)/-p 1/g’) -c

Another more beatifull way to strace:
ps auxw | grep php | awk '{print"-p " $2}' | xargs strace


I have the a very useful alias in my .bashrc file:
straceall () {
ps -ef | grep $1 | awk '{ print "-p " $2}' | xargs strace -v -s 100
}

use:
$ straceall php-fpm