mysql -urep -pimooc -h10.156.11.233 -e "show slave status\G"|grep "Slave_IO_Running"|awk '{if($2!="Yes"){print "Slave thread not running!";exit 1}}'
mysql -urep -pimooc -h10.156.11.233 -e "show slave status\G"|grep "Seconds_Behind_Master"
mysql -urep -pimooc -h10.156.11.233 -e "show slave status\G"|grep "Slave_IO_Running"|awk '{if($2!="Yes"){print "Slave thread not running!";exit 1}}'
mysql -urep -pimooc -h10.156.11.233 -e "show slave status\G"|grep "Seconds_Behind_Master"
相关阅读