大海航行靠舵手
监控HTTPD
#!/bin/sh while [ "1" == "1" ]; do APACHE_LIST=`ps -ef | grep httpd | 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