Skip to main content

Setting up a daily auto reboot time

Comments

11 comments

  • durangod

    I wanted to check to see if the restart happened but i do not have this log file

    /usr/local/cpanel/logs/safeapacherestart_log   does not exist.  Is there a different log file?

     

    0
  • quietFinn

    How about this:
    last reboot

    0
  • durangod

    That works but my restart at 4am is not there.  I suspect by looking at the other logs that there is alot going on at 4am, alot of backup stuff and alot of cpanel update app stuff, so i guess it got cancelled out.    So maybe i will change the time to 7am

    Question:   why is this one from 2 hours ago still running, strange?

    reboot   system boot  4.18.0-553.51.1. Mon Jul 21 06:43   still running
    reboot   system boot  4.18.0-553.51.1. Sun Jul 20 13:12 - 06:42  (17:30)

     

    4.18.0-553.51.1.    what does this mean?

    0
  • cPRex Jurassic Moderator

    That's the kernel version.

    I've never seen a need for a daily reboot on a server - what specifically are you hoping to resolve by performing that reboot?

    0
  • durangod

    I seem to be getting the LFD mail every couple of days or every day that the MD5sum failed on certain files and im sure its via a valid update.  If i dont reboot then i will get a email that the system is using outdated or old files so rather than have to log into the server every time, i just wanted to do a reboot daily.  A server used to be "set it and forget it" kind of thing, but not anymore i guess.  :)  

     

    0
  • cPRex Jurassic Moderator

    Maybe this is something you should bring up with CSF/LFD instead of performing an unnecessary reboot on the system?

    0
  • durangod

    Ok thanks :)

    0
  • quietFinn

    I put:
    7 15 * * * /sbin/shutdown -r now

    in root crontab (i.e. couple of minutes later).

    I was watching in root SSH when the server rebooted , and when I logged in I checked in /var/log/cron and saw this:
    Jul 21 15:07:01 ns1 CROND[3096923]: (root) CMD (/sbin/shutdown -r now)

    Personally I don't want reboot servers unattended.

    But if you do it you should not do it while backups are being done, or when cPanel/WHM is being updated.

    In WHM -> Server Configuration -> Configure cPanel Cron Jobs you see what times upcp and backup are started.

     

     

     

    0
  • durangod

    Thanks quietFinn  i have not yet contacted CSF but will soon.  If they cant assist then ill refer back to your post, thanks so much for the info :)

    0
  • durangod

    Well seems posting to CSF forum is pretty much useless now days.  In the past they used to atleast answer within a few days but looking at the tons of unanswered posts, it seems that has changed. 

    Oh well,   since midnight to 6am seems to be really busy server time with other stuff i am going to try either 9am or 9am.   That CSF LFD email is sent at midnight so if i reboot at 9am i can reboot after all the busy times pretty much right after, or 9pm ill have to depend on the old files for CSF LFD scanning till 9PM at night which is before it would run.   

    0
  • durangod

    Well tested twice, even removed the #comment line to test that.  Still no reboot logged so i give up, i will remove the code and i will just continue to log in and reboot manually, oh well i tried :)

    Thanks for all the help everyone :)

    0

Please sign in to leave a comment.