# period
sakums=`date -d -1day +%s`
# 1GB
ttrafic=$((1024*1024*1024))
pushd /var/www/mrtg
for fails in `find *log -mtime -1`
do tail -n +4 $fails |
awk -vsakums=$sakums -vfails=$fails -vttrafic=$ttrafic '{ if ($1 > sakums)
{intr += ($2*300); outtr += ($3*300) }}
END { if (outtr > 10000000000)
printf("%s\t%10.2f\t%10.2f\n",fails,intr/ttrafic,outtr/ttrafic) }'
done