Hi, Because my server has often a high load of 80+, i want to see what query's are running out all the resources. I was writing a bash file to see when the load is higher then 10 mail me the actually mysql processes but it doesn't work, can someone help me please? I have a problem with mysqlproc (if i tree in the commandline : alias mysqlproc='. /usr/local/directadmin/conf/mysql.conf; mysqladmin -u $user --password=$passwd processlist' and then set mysqlproc , i get want I want) #!/bin/bash mysqlproc='. /usr/local/directadmin/conf/mysql.conf; mysqladmin -u $user --password=$passwd processlist' trigger=10.00 load=`cat /proc/loadavg | awk '{print $1}'` response=`echo | awk -v T=$trigger -v L=$load 'BEGIN{if ( L > T){ print "greater"}}'` if [[ $response = "greater" ]] then sar -q | mail -s"High load on server - [ $load ] [ $mysqlproc]" markverduffelt[aaat]and....com fi echo $load echo $mysqlproc
Hi, that will be probably can help u : http://www.christophe-casalegno.com...ke-an-action-if-the-load-average-is-too-high/