New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
cron.
@peppr syntax/code?
@hidayat Check this guide:
http://linux.101hacks.com/sysadmin-tasks/crontab-basic-guide/
run "/sbin/shutdown -r now" in your cron
Should perform a restart, just use cron with it (Pretty easy, a bit of google-fu should get you an answer.)
@matthewvz said:
Is it right?
`#/bin/bash
I found this handy crontab creator: http://www.htmlbasix.com/crontab.shtml
Might be helpful.
Thank you very much, folks
why would you do this? You can just restart the service that is possibly going wrong (eg apache) but to restart the whole server?
@vampireJ
"vps not working in maximum as humans, humans ned rest, so also vps"
https://freevps.us/post-99872.html
JK ;-)
my xen vps have 512M of ram with directadmin as control panel. httpd using 320M of ram. as newbie on linux, only this way can help me.
I can't understand is why
You really shouldn't run a control panel on a 512MB RAM VPS. I'd suggest you to drop the CP. You'll find plenty of tutorials online on how to setup and maintain a LAMP server, do virtual hosts setups, etc. If you're using DirectAdmin for hosting your email, I'd suggest you rather go with Zoho or mxroute. Here's a few tutorials to get you started :
https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu
http://docs.phpmyadmin.net/en/latest/setup.html#linux-distributions
https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts
Or you can use LowEndScript, I personally prefer this one :
https://github.com/sk33lz/lowendscript
Use 'sync; echo 3 > /proc/sys/vm/drop_caches' instread reboot your server.
Drop_caches will clear up your cached and buffers memory. Run 'free -m' before and after drop_caches to know how much different memory usage.
Then fix the problem causing httpd to use excessive memory. If you don't know how, ask for help.
Restarting daily because of memory issues is just the wrong approach.
WHY do this? Memory used by cache will be freed if needed by apps. Using memory as cache is a GOOD thing.
This is Linux, not Windows 95. Let the system manage the memory.