Created
January 23, 2012 08:55
-
-
Save numbata/1661879 to your computer and use it in GitHub Desktop.
MySQL replcation waiting estimated time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Грубые наброски | |
| # 1327306923 | |
| # 217341 | |
| watch -n 2 'E=`mysql -u root -A -e "show slave status \G" | grep "Seconds_Behind_Master" | grep -o -E "[0-9]+"`;T=`date +%s`;TT=`expr 217341 - $E`;EE=`expr $T - 1327306923`;S=`echo "scale=2; $TT/$EE"|bc`;ES=`echo "scale=2; $E/$S/60"|bc`;echo "Estimates minutes: $ES . Speed: $S"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment