Results 1 to 10 of 11
-
21st Jan 2011, 06:48 PM #1OPMemberWebsite's:
Elite.SO Defendos.com Motionite.com[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...
}
?>
"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
-
21st Jan 2011, 06:53 PM #2MemberWebsite's:
csoffensive.com fagbag.megood for hosts out there
-
21st Jan 2011, 06:53 PM #3Member
nice work thanks
-
21st Jan 2011, 06:56 PM #4BannedWebsite's:
FusionWarez.info SmokeHost.net Leechers.coNice work mate
-
21st Jan 2011, 07:37 PM #5MemberWebsite's:
litewarez.net litewarez.com triniwarez.comWhy 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
-
21st Jan 2011, 07:55 PM #6OPMemberWebsite's:
Elite.SO Defendos.com Motionite.comWhy 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.
-
21st Jan 2011, 10:09 PM #7Respected Member
Nice but better to add a shell cmd and get the tasks running and usage to send in the email also.
-
21st Jan 2011, 11:19 PM #8MemberWebsite's:
tehMoviez.com 0Senes.com GeekFaceGames.comNice but better to add a shell cmd and get the tasks running and usage to send in the email also.JokerHacker Blog
JokerHacker PHP coding Service // back again!
CurlAxel PHP Download Accelerator
hardly remembering the milk :p
-
22nd Jan 2011, 08:10 AM #9OPMemberWebsite's:
Elite.SO Defendos.com Motionite.comI'm busy now, but feel free to work on it.
-
22nd Jan 2011, 11:03 AM #10Respected MemberWebsite's:
DL4Everything.com Soft2050.inonly for cpanel?
nothing for kloxo?
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to decrease Server load on VPS
By Spartan in forum Server ManagementReplies: 21Last Post: 19th Jul 2012, 09:59 PM -
I need help with server, high load
By First-Dragon in forum Server ManagementReplies: 4Last Post: 22nd Jun 2012, 09:37 PM -
Server CPU load
By tractor3231 in forum Server ManagementReplies: 6Last Post: 10th Jul 2011, 04:52 AM -
Server Load
By Last Word in forum vBulletinReplies: 0Last Post: 3rd Apr 2010, 10:45 AM -
Server Load - [Help]
By G56Ace in forum Webmaster DiscussionReplies: 8Last Post: 10th Jun 2009, 06:52 PM
themaPoster - post to forums and...
Version 5.35 released. Open older version (or...