Skip to content

Instantly share code, notes, and snippets.

View Zanop's full-sized avatar

Vladimir Smolenski Zanop

  • OpenText
  • Amsterdam, NL
View GitHub Profile
@Zanop
Zanop / repl_behind_time.sh
Last active August 29, 2015 14:22
Mysql Replication time
#!/bin/bash
# Taken from:
# https://www.percona.com/blog/2012/08/29/heres-a-quick-way-to-foresee-if-replication-slave-is-ever-going-to-catch-up-and-when/
#
#s_behind – current Seconds_Behind_Master value
#d_behind – number of days behind based on current s_behind
#c_sec_s – how many seconds per second were caught up during last interval
#eta_d – this is ETA based on last interval
#O_c_sec_s – overall catch-up speed in seconds per second
#O_eta_d – ETA based on overall catch-up speed (in days)