Solved

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

Posted on 2012-03-23
3
463 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
  • 2
3 Comments
 
LVL 24

Expert Comment

by:johanntagle
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Article by: Swadhin
Introduction of Lists in Python: There are six built-in types of sequences. Lists and tuples are the most common one. In this article we will see how to use Lists in python and how we can utilize it while doing our own program. In general we can al…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now