This is a discussion on Bash script for checking mysql processlist within the Shell scripting forums, part of the Development/Scripting category; Hi, I need a script to check mysql processlist, if it is not populated the script will email a notification ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hi,
I need a script to check mysql processlist, if it is not populated the script will email a notification to the admins. maybe we can modify this script to the one i need? --- #!/bin/bash while [ 1 ] do mysql -N -u root -ppassword -e 'show processlist' | egrep -v 'Sleep|show processlist' sleep 2 done --- or do you have a better one? |
| Sponsored Links | ||
|
|
|
||||
|
Can you tell me what is the purpose of such a script? Do you wanna monitor mysql? If it is not working send an email to admin?
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
| Tags |
| bash , mysql , processlist , show processlist |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Checking files exist | seeker082 | Shell scripting | 6 | 02-22-2008 01:39 AM |
| checking windows file from linux | jhn_daz@yahoo.com | Getting started tutorials | 1 | 10-31-2007 08:40 PM |
| bash script to collect info | adahan | Shell scripting | 7 | 10-31-2007 07:06 PM |
| MySql FTP server backup script | zafar466 | Shell scripting | 3 | 09-25-2007 06:43 PM |
| MySQL Backup Script | krisa | Shell scripting | 1 | 02-03-2007 12:57 AM |