I've been having some troubles with my host consistently suffering from excessively high server loads. They don't seem to be very aggressive at coming to terms with a long term fix, so I am wanting to be a bit more proactive in this matter. I have been unsuccessfully looking for a script that I can run as a cron job to send me notifications when the server load reaches a certain point. If anyone could point me in the right direction, it would be much appreciated.
Here the basics. If you think a vmstat and top would be helpful for some reason, I can certainly provide that as well:
Operating system Linux
Kernel version 2.4.29-ow1
Machine Type i686
Apache version 1.3.33 (Unix)
PERL version 5.8.4
PHP version 4.3.11
MySQL version 4.0.22-standard
cPanel Build 10.2.0-RELEASE 82
I've looked at Nagios and I guess I didn't mention that this is under a shared server environment, so this wouldn't be a terribly useful tool for me. (Perhaps for the hosting company?!) And I just briefly looked at MRTG, and while it might be useful to compile information after the fact, I am really needing something to alert me of the problem at the time. A basic script that I could run, say hourly that says:
SCRIPT: Hey server, whats your current server load?
SCRIPT: If the load is 4 or less, okay if it is 5 or more, I'll send an email notification. I see that it is 5, so I am sending the email.