| Private Hosting Questions about VPS, dedicated servers and colocation. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
All Ur Base R Belong 2 Us
Excelling Contributor
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
|
Load Alerts
Well I decided to write myselfs some scripts to keep me informed of any issues with my servers. I figured I'd share them here.
The first is an Apache watchdog. It basically checks to see if Apache is running. If not, it attempts to restart it. It then sends a text message response regarding the success of the operation. I have tested everything but the restarting, so I won't post it yet. But I did also create a basic Load alert system. It gets the current load of the system, and checks it against a configured value and then sends a text message if the load is higher than the configured value. It optionally also sends the current load value. PHP Code:
The script's intended to be ran as a minute interval cron job Example Crontab Line: * * * * * php -q /path/to/load_checker.php Nothing complex, pretty simple script. If you decide to use it let me know, and let me know how things work out. And if you have any suggestions, let me hear 'em You can download a copy from the attached zip (The file header comments don't seem to show in the php code block
__________________
Nobody doing nothing |
|
|
|
|
|
#2 (permalink) |
|
I'm Dope as Crack
Resident.
Joined in Mar 2004
Lives in Asheboro, NC
Hosted on Pass 7
13,036 posts
Gave thanks: 7
Thanked 29 times
|
And this is why you are in fact, the man. I'll use this tonight when I get home from work.
__________________
Last edited by David; March 23rd, 2006 at 4:13 PM. |
|
|
|
|
|
#7 (permalink) |
|
Searcher
Surpass Staff
Joined in May 2003
Lives in Orlando
24,509 posts
Gave thanks: 936
Thanked 787 times
|
LOL
![]()
__________________
Follow Surpass on Twitter and Facebook
Check out interesting finds on the Surpass Blog .... it's coming. |
|
|
|