User Tools

Site Tools


strace_php-fpm

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
strace_php-fpm.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki