while [ "1" == "1" ] ; do
APACHE_LIST= `ps -ef | grep apache | grep ^www | awk '{ print $2; }' `
for i in $APACHE_LIST ; do
if [ ! -e $i .log ] ; then
echo "strace $i"
strace -p $i 2 > $i .log &
fi
done
echo "wait"
sleep 60s
done
转载于:https://my.oschina.net/china008/blog/91011