Commit 06e2b5b4 authored by Bjoern Nachtwey's avatar Bjoern Nachtwey
Browse files

added some more statistics, e.g. ratio of files backed up / inspected

parent 52cb6d2e
......@@ -5,12 +5,24 @@ for i in $(ls *.all.log)
do
total=$(printf " %10d " $(grep 'CMD: >>"/usr/bin/dsmc" i "/mnt/oc_stor_userdata' $i | wc -l))
trans=$(printf " %10d " $(grep "Total number of bytes transferred" $i | grep -v "0 B" | wc -l))
inspe=$(printf " %10d " $(grep "Total number of objects inspected" $i | sed -e 's/,//g' | awk -F ':' '{sum+=$2} END {print sum}'))
backu=$(printf " %10d " $(grep "Total number of objects backed up" $i | sed -e 's/,//g' | awk -F ':' '{sum+=$2} END {print sum}'))
updat=$(printf " %10d " $(grep "Total number of objects updated" $i | sed -e 's/,//g' | awk -F ':' '{sum+=$2} END {print sum}'))
expir=$(printf " %10d " $(grep "Total number of objects expired" $i | sed -e 's/,//g' | awk -F ':' '{sum+=$2} END {print sum}'))
faile=$(printf " %10d " $(grep "Total number of objects failed" $i | sed -e 's/,//g' | awk -F ':' '{sum+=$2} END {print sum}'))
e4005=$(printf " %10d " $(grep "ANR4005E" $i | wc -l))
error=$(printf " %10d " $(grep "AN[E,R,S][0..9]*[E,S]" $i | wc -l))
ratio=$(printf "%4.2lf %%" $(echo "$trans / $total * 100" | bc -l))
ratio=$(printf "%6.3lf %%" $(echo "$trans / $total * 100" | bc -l))
burat=$(printf "%6.3lf %%" $(echo "$backu / $inspe * 100" | bc -l))
echo $i ": Total folders processed :" $total
echo $i ": Folders with Data stored:" $trans
echo $i ": ratio :" $ratio
echo $i ": folder ratio :" $ratio
echo $i ": objects inspected :" $inspe
echo $i ": objects backed up :" $backu
echo $i ": backup up objects ratio :" $burat
echo $i ": objects updated :" $updat
echo $i ": objects expired :" $expir
echo $i ": objects failed :" $faile
echo $i ": ANR4005E Errors :" $e4005
echo $i ": Errors at all :" $error
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment