?
Solved

script to monitor and email us when  Mysql Semaphore and dead lock occurance happen.

Posted on 2012-03-23
3
Medium Priority
?
489 Views
Last Modified: 2012-04-09
Hi,
from command line Show Engine Innodb status

will show you if there is any Semaphore occurance or if there is any dead lock occurance in the server..
but i m trying to find out a script or trying to build a script which will monitor mysql .. and let us know if there is any occurance of semaphore or dead lock..

it can by by bash or python..

but dont know where to start or how to start of if there is any free script is out out there

if any one useing this kind of script , can you please help me with this
thanks
0
Comment
Question by:fosiul01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 24

Expert Comment

by:johanntagle
ID: 37756832
Maybe you can build a script that further processes the output of innotop.  I haven't tried its non-interactive option but the documentation says its output can be further processed by other scripts.  You can check out the documentation at http://innotop.googlecode.com/svn/html/index.html
0
 
LVL 29

Author Comment

by:fosiul01
ID: 37757161
no the problem is different..

Semaphore and dead lock will only aprear on the output if it happend

just normal output capture will not work
0
 
LVL 24

Accepted Solution

by:
johanntagle earned 1500 total points
ID: 37764101
Yes that means you need to run innotop over and over again in a loop.  If you build your own script you will need to call show engine innodb status over and over again too, so it's practically the same thing though with less overhead since you'll be querying mysql directly.

Or maybe you can browse the code of innotop and see how it parses for locks and semaphore occurances.  Think I'll have time to look at it later (you got me curious)
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question