获取CACTI RRD文件每天峰值的SHELL
url="/var/www/html/rra/150/9517.rrd/var/www/html/rra/256/11345.rrd
/var/www/html/rra/150/9518.rrd"
fff=`echo $url | awk '{print NF}'`
for((i=1;i /tmp/test${x}
done
ff=`cat /tmp/test1 | wc -l`
for((n=1;n /tmp/fud
done
aa=`cat /tmp/fud | awk '{sum+=$0}END{print sum}'`
re=`echo "$aa" | awk '{sum=$0*8/1000000}END{printf "%.2f",sum}'`
echo $re >> /tmp/testz
rm -rf /tmp/fud
done
td=`cat /tmp/testz | sort -nr |sed -n 1p`
if [ `echo "$td > 1000"|bc` -eq 1 ];then
tpt=`echo "scale=3;$td / 1000" | bc | awk '{printf "%.2f",$0}'`
echo $tpt"G" $dt
echo "$tpt"G" $dt" >> /root/qz.txt
else
echo $td"M" $dt
echo "$td"M" $dt" >> /root/qz.txt
fi
for((b=1;b
页:
[1]