标签:sql The col class led slist code $1 color
#!/bin/sh date=`date +%Y%m%d\[%H:%M:%S]` n=`mysqladmin -uroot -p** processlist | grep -i sleep | wc -l` echo "sleep count:$n" if [ "$n" -gt 10 ]; then for i in `mysqladmin -uroot -p** processlist | grep -i sleep | awk ‘$12>4000 {print $2}‘` do mysqladmin -uroot -p** kill $i done echo "sleep is too many i killed it(time>4000)." >> /tmp/sleep.log echo "$date : $n" >> /tmp/sleep.log fi
标签:sql The col class led slist code $1 color
原文地址:https://www.cnblogs.com/yshyee/p/11646192.html