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
Solved

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

Posted on 2012-03-23
3
479 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
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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Strings in Python are the set of characters that, once defined, cannot be changed by any other method like replace. Even if we use the replace method it still does not modify the original string that we use, but just copies the string and then modif…
Flask is a microframework for Python based on Werkzeug and Jinja 2. This requires you to have a good understanding of Python 2.7. Lets install Flask! To install Flask you can use a python repository for libraries tool called pip. Download this f…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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…

789 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