028-86922220

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

每隔30秒循环收集innodb状态信息的SHELL脚本(在脚本中自动输入密码)

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秒循环收集innodb状态信息的SHELL脚本(在脚本中自动输入密码)
文章转载:http://www.tsicrk.com/article/jeiopi.html

其他资讯

让你的专属顾问为你服务

1.7057s