Fév 192012
 

Kill tous les sleeps de plus de 10s :

for requete in $(mysql INFORMATION_SCHEMA -B -e'select id from PROCESSLIST where Command like "Sleep" and TIME >= "10"'| grep -v id); do /usr/bin/mysqladmin kill $requete ; done

Kill tous les selects de plus de 10s :

for requete in $(mysql INFORMATION_SCHEMA -B -e'select id from PROCESSLIST where INFO like "select%" and TIME >= "10"'| grep -v id); do /usr/bin/mysqladmin kill $requete ; done

Voir les requêtes en cours :

mysqladmin pro

ou

 mysql -e"show processlist"

Voir les requêtes en cours en entier :

 mysql -e"show full processlist"

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">

(required)

(required)

Spam protection by WP Captcha-Free