Commit 48d33bda authored by Bjoern Nachtwey's avatar Bjoern Nachtwey
Browse files

added some more lines for stats

parent 38df1a4e
......@@ -71,8 +71,12 @@ do
grep "Total number of objects inspected" $i | sed -e 's/,//g' >> out.ti;
grep "Total number of objects backed up" $i | sed -e 's/,//g' >> out.tb;
grep "Total number of objects updated" $i | sed -e 's/,//g' >> out.tu;
grep "Total number of objects expired" $i | sed -e 's/,//g' >> out.te;
grep "Total number of objects failed" $i | sed -e 's/,//g' >> out.tf;
grep "ANS4005E" $i >> out.nf;
grep "ANS0362E" $i >> out.e0362;
grep "ANS1228E" $i >> out.e1228;
grep "ANS1351E" $i >> out.e1351;
grep "ANS4005E" $i >> out.e4005;
grep "AN[E,R,S][0-9]*S" $i | grep -v ANS1802E >> out.ts;
grep "AN[E,R,S][0-9]*[E,S]" $i | grep -v ANS1802E >> ../$today.daily-error.txt
done
......@@ -80,8 +84,12 @@ done
echo "Total number of objects inspected :" $(awk -F ':' '{sum+=$2} END {print sum}' < out.ti) >> ../$today.daily-stats.txt
echo "Total number of objects backed up :" $(awk -F ':' '{sum+=$2} END {print sum}' < out.tb) >> ../$today.daily-stats.txt
echo "Total number of objects updated . :" $(awk -F ':' '{sum+=$2} END {print sum}' < out.tu) >> ../$today.daily-stats.txt
echo "Total number of objects expired . :" $(awk -F ':' '{sum+=$2} END {print sum}' < out.te) >> ../$today.daily-stats.txt
echo "Total number of objects failed .. :" $(awk -F ':' '{sum+=$2} END {print sum}' < out.tf) >> ../$today.daily-stats.txt
echo "ANS4005 errors (file not found) . :" $(wc -l out.nf | cut -f1 -d' ') >> ../$today.daily-stats.txt
echo "ANS0362E Errors (nummp exceeded). :" $(wc -l out.e0362 | cut -f1 -d' ') >> ../$today.daily-stats.txt
echo "ANS1228E Errors (sending failed). :" $(wc -l out.e1228 | cut -f1 -d' ') >> ../$today.daily-stats.txt
echo "ANS1351E Errors (#sess exceeded). :" $(wc -l out.e1351 | cut -f1 -d' ') >> ../$today.daily-stats.txt
echo "ANS4005 errors (file not found) . :" $(wc -l out.e4005 | cut -f1 -d' ') >> ../$today.daily-stats.txt
echo "severe errors ................... :" $(wc -l out.ts | cut -f1 -d' ') >> ../$today.daily-stats.txt
##
......
......@@ -11,22 +11,25 @@ do
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))
e0362=$(printf " %10d " $(grep "ANS0362E" $i | wc -l))
e1228=$(printf " %10d " $(grep "ANS1228E" $i | wc -l))
e1351=$(printf " %10d " $(grep "ANS1351E" $i | wc -l))
e4005=$(printf " %10d " $(grep "ANS4005E" $i | wc -l))
error=$(printf " %10d " $(grep "AN[E,R,S][0-9]*[E,S]" $i | wc -l))
# 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 " Total number of objects inspected : %10.d\n" $inspe
printf " Total number of objects backed up : %10.d ==> %7.3f %%\n" $backu $(echo "$backu / $inspe * 100" | bc -l)
printf " Total number of objects updated : %10.d ==> %7.3f %%\n" $updat $(echo "$updat / $inspe * 100" | bc -l)
printf " Total number of objects expired : %10.d ==> %7.3f %%\n" $expir $(echo "$expir / $inspe * 100" | bc -l)
printf " Total number of objects failed : %10.d ==> %7.3f %%\n" $faile $(echo "$faile / $inspe * 100" | bc -l)
printf " ANS0362E Errors (nummp exceeded) : %10d\n" $e0362
printf " ANS1228E Errors (sending failed) : %10d\n" $e1228
printf " ANR4005E Errors (file not found) : %10d\n" $e4005
printf " ANS0362E Errors (nummp exceeded) : %10d\n" $e1228
printf " ANS1351E Errors (#sess exceeded) : %10d\n" $e1351
printf " ANS4005E Errors (file not found) : %10d\n" $e4005
printf " total number of Errormessages : %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