Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 14 of 14
  1. #1
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    700

    Default WatchMySQL Users... New Version.

    I have released a new version of WatchMySQL. WatchMySQL is a script that runs in the background and watch's the amount of users logged into mysql. If a user exceeds their limit it will notify you and/or kill the user's connections if you tell it to.


    Additions/Fixs
    *fixed problem where script would die when mysql was restarted. watchmysql now checks the mysql connection on each pass and ensures it is connected.
    *removed the option to restart mysql
    *added the option to kill the abusing users


    Users can download the new version at the following locations.
    http://www.ndchost.com/solutions/lic...p/cpextras.php
    http://www.cplicensing.net/extras/scripts.php

    cPanel.net Support Ticket Number:

  2. #2
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default Re: WatchMySQL Users... New Version.

    Originally posted by shaun
    I have released a new version of WatchMySQL. WatchMySQL is a script that runs in the background and watch's the amount of users logged into mysql. If a user exceeds their limit it will notify you and/or kill the user's connections if you tell it to.


    Additions/Fixs
    *fixed problem where script would die when mysql was restarted. watchmysql now checks the mysql connection on each pass and ensures it is connected.
    *removed the option to restart mysql
    *added the option to kill the abusing users


    Users can download the new version at the following locations.
    http://www.ndchost.com/solutions/lic...p/cpextras.php
    http://www.cplicensing.net/extras/scripts.php

    cPanel.net Support Ticket Number:
    Okay, time for a stupid question. Can this be installed on top of the current install, or does something extra need to be done?

    cPanel.net Support Ticket Number:

  3. #3
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    700

    Default

    sure, just replace the old version, just make sure you edit/configure it again.

    cPanel.net Support Ticket Number:

  4. #4
    Member
    Join Date
    Aug 2001
    Posts
    31

    Default Dumb question

    Hi,

    Your script looks great. Have you posted somewhere installation instructions ?

    Thanks.

    Catalin

    cPanel.net Support Ticket Number:

  5. #5
    Member Doctor's Avatar
    Join Date
    Apr 2003
    Posts
    180

    Default How to run a background script?

    Shaun, it is very generous of you to share such great script. If you could pepper your generosity with a step-by-step instruction on how to run it in the background, it would help a lot of newbies like me.

    cPanel.net Support Ticket Number:

  6. #6
    Member Doctor's Avatar
    Join Date
    Apr 2003
    Posts
    180

    Default

    To make watchmysql runs in the background, should I first rename the file to watchmysql.pl? Then should I run it once only perl watchmysql.pl? Or should I set a cronjob to run it every 10 minutes?

    cPanel.net Support Ticket Number:

  7. #7
    Member
    Join Date
    Jun 2002
    Posts
    233

    Default

    Originally posted by Doctor
    To make watchmysql runs in the background, should I first rename the file to watchmysql.pl? Then should I run it once only perl watchmysql.pl? Or should I set a cronjob to run it every 10 minutes?

    cPanel.net Support Ticket Number:
    su - to root
    nohup ./watchmysql &
    or
    ./watchmysql &

    cPanel.net Support Ticket Number:

  8. #8
    Member Doctor's Avatar
    Join Date
    Apr 2003
    Posts
    180

    Default

    su - to root
    nohup ./watchmysql &
    or
    ./watchmysql &


    Thanks for the tip! If I logout from shell, will it still run in the background? What if I want to stop it from running in the background?

    cPanel.net Support Ticket Number:

  9. #9
    Member Doctor's Avatar
    Join Date
    Apr 2003
    Posts
    180

    Default

    Below is the screen output:

    $ nohup ./watchmysql &
    [1] 21776
    $ nohup: appending output to `nohup.out'
    [1]+ Exit 126 nohup ./watchmysql

    Does this mean watchmysql is now running or exited? I type $ jobs but nothing came up. How do I check if it is running? And how do I kill it? Should I type $ kill %1?

    cPanel.net Support Ticket Number:

  10. #10
    Member Doctor's Avatar
    Join Date
    Apr 2003
    Posts
    180

    Default

    I CHMOD the file to 755 and try run it again with "nohup ./watchmysql &" and this time it works. But as soon as I logout and re-login again, it doesn't display when I type "jobs". So how do I know if it actually is running and how do I kill it?

    If I reboot the server, will it still run in the background?

  11. #11
    Member
    Join Date
    Mar 2003
    Posts
    136

    Default

    Just type "ps" to see if it's running.

    To kill it type "kill pid" The pid is the first number given from ps on the watchmysql row.

    If your server reboots you have to start it again unless you set it to load on start up.. I think.

    Edit:
    Only just realised how old this thread was... oh well, its still reference.

  12. #12
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    700

    Default

    Sorry for not responding, the forum just told me about a reply.

    to see if it's running type ps aux|grep watchmysql

    or you can type ps auxf and just look for it.

  13. #13
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    779

    Default

    Old thread but I am finding the need to use watchmysql.pl

    Is placing a reference in /etc/rc.d/rc.local fine?

  14. #14
    Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    172

    Smile Re: WatchMySQL Users... New Version.

    i just installed it yesterday , but today found that script is not running , dont know why it stopped, any idea how can we add this script to be monitored ?

Similar Threads & Tags
Similar threads

  1. WatchMySQL is now a WHM plug-in
    By shaun in forum cPanel and WHM Discussions
    Replies: 24
    Last Post: 01-19-2012, 12:16 PM
  2. RoundCube Version 0.2-stable released (current used version vulnerable?)
    By Domenico in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-19-2009, 11:24 AM
  3. Users choose PHP version
    By CollateralFX in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-17-2006, 07:56 PM
  4. Apache Security/Version Table not showing PHP version
    By jonMEGA in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-10-2004, 10:59 PM
  5. Updated to latest version but I'm suddenly a few version back...
    By TheBorg in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-05-2004, 09:00 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube