#/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
标签:div date color inux post end awk cond 获取
#/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
标签:div date color inux post end awk cond 获取
原文地址:http://www.cnblogs.com/wuzhiyi/p/8064016.html