Script to auto restart httpd and mysqld

I don't have any idea why it's not working.

If you can't get it to work, and really need it, then you might want to find someone to look at it for you. We can do that as a commercial service but for security and safety we do not log into servers except as a commercial service.

Jeff
 
Thank You Jeff for a great script :)
was a simple resolve, 1st, I put the cron in the crond folder and
2nd, I forgot to give the file execute permissions :rolleyes:
it now shows up in the cron log and does what I need until I can fix the real problem I am having being Word Press blogs, not the script itself but a plugin called autoblog, my guess is that from what I can see, it bottle necks the sever with requests as it is pulling rss feeds and then re posts them .
 
I'm not sure if you're referring to the script from my site or the script from rfx networks, but if mine, it was written by an RHCE (RedHat Certified Engineer) who no longer works for us; he was hired away by Red Hat.

Jeff
 
Of course Jeff, I was referring to yours, does what I need until I can get a handle on how to govern these WP sites and the autoblog plugin.
Thanks again, and thanks to your former RHCE guy :)
 
Hello all,

I need this script right now but i can't download it via the link that given in first page.
 
I changed the location about fifteen months ago but forgot to change the link. I've fixed it and it will work now.

Jeff
 
We've got such a script, but you'd be much better off adding more memory. That's what we did when we discovered the script was restarting http almost every time it ran (we ran it every five minutes).
Here's what we put into /etc/crontab:
Code:
*/05 * * * * root /path/to/loadmonitor
Don't forget to change the path to where you put it.

I've put the script here.

Jeff

Hey Jlasman thanx for you help

could u help me ? i have downloaded that httpd.load.sh

where should i upload to my server and where i should set cron job for it ?
 
where should i upload to my server
Wherver you want. We load it to a directory we create, /root/scripts, since it's a script that's going to run as root. Others may put it into a subdirectory of /opt if it exists on their server. Others may chose /usr/local/sbin (probably many would consider that the most logical place) if it exists.
and where i should set cron job for it ?
It needs to run as root, so you've got two options:

Either into the /var/spool/cron/root (read up on how to do this; don't just manually edit the file) or put it into /etc/crontab (with a text editor, but then you need to restart crond).

Personally, I use this line:
Code:
*/05 * * * * root /root/scripts/load.sh
in /etc/crontab (don't forget to restart the cron daemon).

Jeff
 
Back
Top