Commit 885bf271 authored by Bjoern Nachtwey's avatar Bjoern Nachtwey
Browse files

added some % values

parent 06e2b5b4
......@@ -3,6 +3,7 @@
for i in $(ls *.all.log)
do
# collecting data
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}'))
......@@ -12,17 +13,17 @@ do
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 "%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 ": 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
# printing stats
printf "\n"
printf " Total folders processed : %10.d\n" $total
printf " Folders with Data stored: %10.d ==> %7.3f %%\n" $trans $(echo "$trans / $total * 100" | bc -l)
printf "\n"
printf " Objects inspected : %10.d\n" $inspe
printf " Objects backed up : %10.d ==> %7.3f %%\n" $backu $(echo "$backu / $inspe * 100" | bc -l)
printf " Objects updated : %10.d ==> %7.3f %%\n" $updat $(echo "$updat / $inspe * 100" | bc -l)
printf " objects expired : %10.d ==> %7.3f %%\n" $expir $(echo "$expir / $inspe * 100" | bc -l)
printf " objects failed : %10.d ==> %7.3f %%\n" $faile $(echo "$faile / $inspe * 100" | bc -l)
printf " ANR4005E Errors : %10d\n" $e4005
printf " Errors at all : %10d\n" $error
printf "\n"
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