At 06:40 AM 12/11/2007, you wrote:
Hi.

I've been finding some queries by using 'mytop' which takes +200
seconds to be executed. It wastes tons of CPU resources on my server
and would like to detect them automatically and kill them.

Does anybody have experience with this issue? Thank you very much,
--Thomas

Thomas,
I would write a program (choose your language) that would execute a "Show ProcessList" every 10 seconds or so. I would then examine the results and look for ones that run more than 200 seconds and then issue a Kill command on them. You could allow certain user like "root" to run commands to run longer than 200 seconds. Maybe you want to kill long running commands for only certain users and you can do that too.

Mike
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to