Created
February 16, 2017 14:46
-
-
Save aalmodovar/059af9b2f9db75c4e5f3060d19c7ad55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Replace grep domain | |
additional_strace_args="$1" | |
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep domain | grep 'master process' | awk '{print $2}') | |
while read -r pid; | |
do | |
if [[ $pid != $MASTER_PID ]]; then | |
nohup strace -r -p "$pid" -s 2000 $additional_strace_args >"$pid.trc" 2>&1 & | |
fi | |
done < <(pgrep php-fpm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment