Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
count download link and run update query 9 70
PHP - AJAX and MySQL it works only if the value is a number 12 55
How to use pyenv 4 36
Debugging a shell script 3 25
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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…

813 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

10 Experts available now in Live!

Get 1:1 Help Now