This file contains 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 | |
additional_strace_args="$1" | |
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep 'master process' | cut -d ' ' -f 6) | |
while read -r pid; | |
do | |
if [[ $pid != $MASTER_PID ]]; then | |
nohup strace -r -p "$pid" $additional_strace_args >"$pid.trc" 2>&1 & |
This file contains 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
ps auwx | grep -E '\[.*\]' | grep -v grep | awk '{print $NF}' | awk -F/ '{print $1}' | sed 's/\[//g' | sed s'/\]//g' | sort | uniq | sort |
This file contains 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
file = ARGV[0] | |
File.readlines(file).each do |line| | |
if /^#(\d+)/.match(line) | |
ts = Regexp.last_match(1) | |
print Time.at(ts.to_i).to_s + " " | |
else | |
puts line | |
end | |
end |
This file contains 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 | |
additional_strace_args="$1" | |
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep 'master process' | cut -d ' ' -f 6) | |
while read -r pid; | |
do | |
if [[ $pid != $MASTER_PID ]]; then | |
nohup strace -r -p "$pid" $additional_strace_args >"$pid.trc" 2>&1 & |
This file contains 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 | |
additional_strace_args="$1" | |
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep 'master process' | cut -d ' ' -f 6) | |
while read -r pid; | |
do | |
if [[ $pid != $MASTER_PID ]]; then | |
nohup strace -r -p "$pid" $additional_strace_args >"$pid.trc" 2>&1 & |