x=0
while [ $x -lt 10 ]
do
expect <
spawn MySQL -u root -p -e "SHOW ENGINE INNODB STATUS\\\G"
expect "*password:"
send "123456\r"
expect eof
EOF
x=`expr $x + 1`
echo '#########################################################################' >> innodb_status.txt
sleep 60
done
文章名稱:每隔30秒循環(huán)收集innodb狀態(tài)信息的SHELL腳本(在腳本中自動(dòng)輸入密碼)
當(dāng)前地址:
http://weahome.cn/article/jeiopi.html