Shell之监控磁盘io
温馨提示:这篇文章已超过818天没有更新,请注意相关的内容是否还可用!
#!/bin/bash while :do n=`iostat -x 1 5 |tail -n3|head -n1 |awk '{print $NF}'|cut -d. -f1` if [ $n -gt 70 ] then echo "`date` util% is $n%" >>/tmp/mysql_processlist.log mysql -uroot -pxxxxxx -e "show full processlist" >> /tmp/mysql_processlist.log fi sleep 5 done
文章版权声明:除非注明,否则均为阿豪运维笔记原创文章,转载或复制请以超链接形式并注明出处。