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