I need a bash cron job script that is quering MySQL every minute and searching for processes that are taking longer then 300 sec to complete. Script needs to kill that process and e-mail me a details of that process.
My server is chocking up on some MySQL query and I am trying to figure out what it is.