记录strace的结果,每隔60秒

#!/bin/sh
 
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

你可能感兴趣的:(记录strace的结果,每隔60秒)