mysql -uroot -p123456 -e "show slave status\G;" 2>/dev/null|grep -E 'Slave_IO_Running:|Slave_SQL_Running:' |grep -c Yes