Activity Stream
48,167 MEMBERS
62164 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1.     
    #1
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com

    Default [PHP] SLN - Server Load Notifier v1.0 - Opensource

    Hello, I've coded this small script to keep and eye out of my server

    SLN - Server Load Notifier v1.0 - Coded by l0calh0st!
    This script will notify your whenever your server load gets higher then $overmax value. Please ensure you have the following cronjob running:
    "php /home/YOUR_USER_NAME/public_html/sln.php> /dev/null"
    Without the quotes "", also don't forget to change YOUR_USER_NAME to the (cpanel) account username. 5 minutes interval should be fine.

    PHP Code: 
    <?php
    /*
    SLN - Server Load Notifier v1.0 - Coded by l0calh0st!
    This script will notify your whenever your server load gets higher then $overmax value. Please ensure you have the following cronjob running:
    "php /home/YOUR_USER_NAME/public_html/sln.php> /dev/null"
    Without the quotes "", also don't forget to change YOUR_USER_NAME to the (cpanel) account username.
    */

    // Edit the configurations below:
    $overmax "5"// Maximum server load to notify. If the server load gets higher then this value, you will get mail :P
    $email "your@email.com"// Server admin email, this script will email to the following email.

    // DO NOT EDIT BELOW - Get current server load without exec. Most webhosts have this option disable for security reasons.
    $load=file_get_contents("/proc/loadavg");
    $load=explode(' ',$load);
    $loadnow=$load[0];

    // Detect if the server load get higher then your value.
    if ($loadnow >= $overmax ) {
    // Ooh noes! server load got higher! Start spammin'
    $sub "SLN Overload Detected!";
    $mess "Hello,\n\nOverload has been detected by SLN scripts.\n\nThe load was: $loadnow";
    mail($email$sub$mess);
    }
    else
    {
    // die...
    }

    ?>
    Again don't forget the cronjob!
    "php /home/YOUR_USER_NAME/public_html/sln.php> /dev/null" without quotes. Doesn't matter which interval, 5minutes is okay.
    l0calh0st Reviewed by l0calh0st on . [PHP] SLN - Server Load Notifier v1.0 - Opensource Hello, I've coded this small script to keep and eye out of my server :) SLN - Server Load Notifier v1.0 - Coded by l0calh0st! This script will notify your whenever your server load gets higher then $overmax value. Please ensure you have the following cronjob running: "php /home/YOUR_USER_NAME/public_html/sln.php> /dev/null" Without the quotes "", also don't forget to change YOUR_USER_NAME to the (cpanel) account username. 5 minutes interval should be fine. <?php /* Rating: 5

    Defendos BETA3 Released! Thread - Official Website

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    csoffensive.com fagbag.me
    good for hosts out there

  4.     
    #3
    Member
    nice work thanks

  5.     
    #4
    Banned
    Website's:
    FusionWarez.info SmokeHost.net Leechers.co
    Nice work mate

  6.     
    #5
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    Why email, why not just write to log file, and people should also note that is only for Unix servers.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  7.     
    #6
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Why not? It's a notifier not a logger. And yes most hosting providers here are based on Unix. Maybe I will add a windows feature.

    Defendos BETA3 Released! Thread - Official Website

  8.     
    #7
    Respected Member
    Nice but better to add a shell cmd and get the tasks running and usage to send in the email also.

  9.     
    #8
    Member
    Website's:
    tehMoviez.com 0Senes.com GeekFaceGames.com
    Nice but better to add a shell cmd and get the tasks running and usage to send in the email also.
    yep, and maybe highlight the problematic process. I'll work on it if localhost allows me

  10.     
    #9
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    I'm busy now, but feel free to work on it.

    Defendos BETA3 Released! Thread - Official Website

  11.     
    #10
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    only for cpanel?
    nothing for kloxo?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to decrease Server load on VPS
    By Spartan in forum Server Management
    Replies: 21
    Last Post: 19th Jul 2012, 09:59 PM
  2. I need help with server, high load
    By First-Dragon in forum Server Management
    Replies: 4
    Last Post: 22nd Jun 2012, 09:37 PM
  3. Server CPU load
    By tractor3231 in forum Server Management
    Replies: 6
    Last Post: 10th Jul 2011, 04:52 AM
  4. Server Load
    By Last Word in forum vBulletin
    Replies: 0
    Last Post: 3rd Apr 2010, 10:45 AM
  5. Server Load - [Help]
    By G56Ace in forum Webmaster Discussion
    Replies: 8
    Last Post: 10th Jun 2009, 06:52 PM

Tags for this Thread

BE SOCIAL