Results 1 to 11 of 11
  1. #1

    Unix runaway-killer script is needed

    I need a script that does the following for linux:

    1. Checks for the existence of any process(es) that has run longer than XX seconds at greater than XX% CPU usage.
    2. If found process is not on the ignore list, then kill the process, write the event to a log file, and optionally send an email to specified address.

    The script should accept a config file input switch. For example:

    scriptname /path/to/file.cfg

    Config file should look like this:

    $seconds = xx;    #The number of seconds the process must have been running before action is taken 
    $cpu = xx;        #The % of CPU that the process must be using before action is taken 
    $send_email = x;  #If 0, do not send notification email; if 1, send email
    $email = [email protected]          #The email address to receive notification email
    $logfile = /path/to/log/file;
    $ignore_list = process1,process2,process3,etc; #List of processes to ignore
    The script should:

    - be executable via cron
    - be able to run every 1 or 2 minutes without killing the box
    - try to "nicely" kill the process first, then kill it the "hard" way if necessary.
    - be self-documenting (ie: please use comments)
    - have any other appropriate features you think would be nice

    Please contact me via Private Message with your price if you can do this.


  2. #2
    Join Date
    Feb 2002
    I read that subject line as 'Unix runaway-killer script is needed to take down server'...

  3. #3
    Join Date
    Sep 2002
    Top Secret
    Originally posted by psi
    I read that subject line as 'Unix runaway-killer script is needed to take down server'...
    all too easy
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Linux Problems? WHMCS Issues? +1-866-546-8914 (linux-14) or @whmcsguru on twitter!

  4. #4
    I have created this script. Will contact you.


  5. #5
    Join Date
    Aug 2002
    crouzer/chuck can you tell us the features of the script you made?

  6. #6
    For anyone interested feel free to contact me privately, I will be posting an ad on this software soon enough.


  7. #7
    Join Date
    Jun 2002
    Lansdale, PA
    We use this:

    It's free and works very well.
    Patrick Casady: Co-Owner
    RPG-Works.Net: Hosting For Creators
    [email protected] AIM: prcasady
    Please e-mail or IM for fastest response!

  8. #8
    I have coded a service that does all of this already (for personal use on my servers). It checks the memory and CPU usage percentages, the shared memory, the time the process is running and kills it off if it's too high. It will ignore users and processes you want to have higher limits (or no limits) on.

    Also it will automatically reboot the server if the load average gets too high. It also checks to make sure that all the services you want are still running -- in case it kills the parent process and brings down the service that was taking up too much resources. It will automatically restart any service that's down, it will run continuously and check every 15 seconds.

    This doesn't take up any resources at all. It will also log and email any reports/alerts of any process it kills, sees down, restarts and it's status, and any other such information. There is a lot more to this, and I was considering on just giving this away. Let me know if you're interested. I'll be on vacation for the next 4 days, but I'll respond when I return.
    Robert McGregor
    Email: robertm@(nospam)

  9. #9
    Join Date
    Feb 2001
    WOW WOW WOW That would be great@!!! so nice of you 2host
    I have servers at: NetDepot/GNAX (A), SoftLayer (A), LiquidWeb (B+), DedicatedNow (B+), Nectartech (B) and more!

  10. #10
    Join Date
    Feb 2001
    can you please make it available for download on a site and send me the URL?

    thanks thanks!

  11. #11
    My daemon is available for purchase at:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts