首页 > 数据库 > 文库 > 正文

每隔30秒循环收集 innodb 情况信息的SHELL脚本

2022-07-30 23:12:38
字体:
来源:转载
供稿:网友
     x=0
     while  [  $x -lt  10 ]
     do
   expect <<eof
    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</eof

(编辑:错新网)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选