Monday, June 14, 2010

Learn Urdu Washington

with SHELL Script

Have you ever trouble to monitor your MySQL process? So when your MySQL down any you do not immediately know. If you feel that your MySQL is very important to always be ups and road well, then you need to monitor your MySQL process, whether down or up.
For those of you who have certainly had a Linux Server shell script. In this paper why we use a shell script, because the shell script, it can run on any OS from any shell script. Here is a simple shell script to monitor your MySQL process is down or up.

#! / Usr / bin / sh #

http://oci-parse.blogspot.com # # script to monitor mysql #

while true do
check_mysql = `ps auxw sleep 5 done

First to know the MySQL process is running dalah to know the minimum number of processes that exist on your server.


In this script is considered the minimum prosese MySQL is 2, so that when checked with the command

auxw ps
echo "MySQL is down"
can be altered with the mail command. so that when MySQL is down, you can know quickly via email.




0 comments:

Post a Comment