Linux获取httpd线程的总内存
#/bin/bash echo ''>httpd.txt SECONDS=0 while [ $SECONDS -le 1800 ] do sleep 2 varmem=`ps aux | grep httpd | grep -v grep |awk '{sum+=$6} END {print sum}'` vardate=`date "+%H:%M:%S"` echo $varmem ',' $vardate >>httpd.txt done
#/bin/bash echo ''>httpd.txt SECONDS=0 while [ $SECONDS -le 1800 ] do sleep 2 varmem=`ps aux | grep httpd | grep -v grep |awk '{sum+=$6} END {print sum}'` vardate=`date "+%H:%M:%S"` echo $varmem ',' $vardate >>httpd.txt done