This neat one line command can be of interest when you are rebuilding a MySQL slave and replication is currently catching up.
$ watch --interval=1 --differences 'mysql -uuser -ppassword -e "show slave status\G"'
You will see the standard SHOW SLAVE STATUS output, but the watch command presents an updated view every second, and highlights differences. This can be useful in a background window to keep an eye on those ‘Seconds Behind Master’.
*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 10.10.10.10 Master_User: slave Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.000626 Read_Master_Log_Pos: 88159239 Relay_Log_File: slave-relay.000005 Relay_Log_Pos: 426677632 Relay_Master_Log_File: mysql-bin.000621 …[Read more]