Commit c5458507 authored by Bjoern Nachtwey's avatar Bjoern Nachtwey
Browse files

changed name of daily output file and email command

parent f38be784
......@@ -36,10 +36,10 @@ cd $wpath/$today
ssr=$(ls -d $bpath/.snapshot/snap_daily.$today*)
if [[ ! $ssr ]]
then
echo "no actual daily snapshot" | tee -a ../$today.daily.stats
echo "no actual daily snapshot" | tee -a ../$today.daily-stats.txt
exit 2
else
echo "latest snapshot: $ssr" | tee -a ../$today.daily.stats
echo "latest snapshot: $ssr" | tee -a ../$today.daily-stats.txt
fi
# get latest filelist
......@@ -47,10 +47,10 @@ filelist=$(ls -dt $bpath/tsm/GWDG_owncloud_incremental_filelist_$today* | head -
if [[ ! $filelist ]]
then
echo "no actual filelist" | tee -a ../$today.daily.stats
echo "no actual filelist" | tee -a ../$today.daily-stats.txt
exit 3
else
echo "latest filelist: $filelist" | tee -a ../$today.daily.stats
echo "latest filelist: $filelist" | tee -a ../$today.daily-stats.txt
fi
##
......@@ -77,12 +77,12 @@ do
grep "AN[E,R,S][0..9]*S" $i | sed -e 's/,//g' >> out.ts;
done
echo Total number of objects inspected : $(awk -F ':' '{sum+=$2} END {print sum}' < out.ti) >> ../$today.daily.stats
echo Total number of objects backed up : $(awk -F ':' '{sum+=$2} END {print sum}' < out.tb) >> ../$today.daily.stats
echo Total number of objects updated . : $(awk -F ':' '{sum+=$2} END {print sum}' < out.tu) >> ../$today.daily.stats
echo Total number of objects failed .. : $(awk -F ':' '{sum+=$2} END {print sum}' < out.tf) >> ../$today.daily.stats
echo ANS4005 errors .................. : $(wc -l out.4005E | cut -f1 -d' ') >> ../$today.daily.stats
echo severe errors ................... : $(wc -l out.ts) | cut -f1 -d' ' >> ../$today.daily.stats
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 failed .. : $(awk -F ':' '{sum+=$2} END {print sum}' < out.tf) >> ../$today.daily-stats.txt
echo ANS4005 errors .................. : $(wc -l out.4005E | cut -f1 -d' ') >> ../$today.daily-stats.txt
echo severe errors ................... : $(wc -l out.ts) | cut -f1 -d' ' >> ../$today.daily-stats.txt
##
## clean up
......
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