monitoring copy-performance

6 Mar
OLDDATE=$(date +%s)
OLDVAL=$(du -s . | sed 's,    .*,,')
while true ; do 
    CURDATE=$(date +%s) 
    CURVAL=$(du -s . | sed 's,     .*,,')
    echo $(( ( $CURVAL - $OLDVAL ) / ( $CURDATE - $OLDDATE  ) ))
    OLDVAL=$CURVAL ; OLDDATE=$CURDATE
    sleep 1
done

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: