I'm helping a friend with a server and it appears the server reboots every week on Sunday night. How can I figure out what is causing is the server to reboot? Aside from rebooting, the server appears to also be running maintenance scripts for their custom application. I am guessing there is something running both the maintenance and the reboot in one go.

  • What have you tried to do? Does it reboot at the same time always? Did you check crontab for shutdown? did you analyze the maintenance scripts to see what is indeed doing? What do you see in the servers logs before boot up? – BitsOfNix Aug 12 '13 at 7:02
  • It appears to always happen at the same time, but I am not exactly sure the most efficient way to search the server logs(or which logs) or crontab. – Damainman Aug 12 '13 at 8:07

This sounds like a crontab entry. I'd look through the /etc/cron.weekly directory and also through root's crontab entries crontab -l.

Additionally look through your /var/log/cron log file (on Fedora/CentOS/RHEL) or /var/log/syslog (on Debian/Ubuntu). There will be lines that look like this:

Aug 12 08:17:01 manny CRON[15582]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)

or this:

Aug 11 04:50:01 grinchy CROND[30262]: (root) CMD (/usr/lib64/sa/sa1 -S DISK 1 1)

Find the lines that correspond to when your server is rebooting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.