当前位置:首页 > 服务器技术 > apache

Statistics access traffic of apache logs

#! /bin/bash
sum=0
exec <$1
while read line ;do
size=echo $line | awk ‘{print $10}‘
expr $size + 1 &>/dev/null
if [ $? -ne 0 ];then
continue
fi
((sum=sum+size))
done
echo "The total byes=echo $((${sum}/1024))"

Statistics access traffic of apache logs

标签:apach   /dev/null   tis   echo   apache   sum   ota   ati   awk   

本文系统来源:http://blog.51cto.com/546136/2064541


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!