command to monitor copy (cp command) progress
while true; do sourcesize=1020 destdir=/OraStage/PROD_HOT_BACKUP_STBY copyprogress="$(export | du -sh $destdir | awk '{print $1}' | sed 's/[^0-9.]*//g')"; echo "scale=3; $copyprogress / $sourcesize*100" | bc | xargs echo -n ; echo % completed; sleep 20;done
Sample output:
80.000% completed
80.200% completed
80.400% completed
80.700% completed
81.000% completed
81.200% completed
81.500% completed
81.800% completed
82.000% completed
82.300% completed
82.600% completed
82.800% completed
83.100% completed
83.300% completed
83.600% completed
83.800% completed
84.000% completed
84.200% completed
86.200% completed
while true; do sourcesize=1020 destdir=/OraStage/PROD_HOT_BACKUP_STBY copyprogress="$(export | du -sh $destdir | awk '{print $1}' | sed 's/[^0-9.]*//g')"; echo "scale=3; $copyprogress / $sourcesize*100" | bc | xargs echo -n ; echo % completed; sleep 20;done
Sample output:
80.000% completed
80.200% completed
80.400% completed
80.700% completed
81.000% completed
81.200% completed
81.500% completed
81.800% completed
82.000% completed
82.300% completed
82.600% completed
82.800% completed
83.100% completed
83.300% completed
83.600% completed
83.800% completed
84.000% completed
84.200% completed
85.500% completed
85.900% completed86.200% completed
No comments:
Post a Comment