Operating System - Linux
1830241 Members
1602 Online
109999 Solutions
New Discussion

Re: Linux Machine restarting

 
Pankaj_22
Advisor

Linux Machine restarting

I have 2 Linux WS Enterprise machines. They automatically restart at 4.21 & 4.22 AM. on every sunday.

I have seen the log and shutdown is proper without any prob. Also it is not through any user account. I reset the password of Root also but still no use.

please guide me
17 REPLIES 17
Ivan Ferreira
Honored Contributor

Re: Linux Machine restarting

We had authomatic ordered shutdown because a hardware problem. In our case, was a memory fan that stopped working, and when the temperature reached some level, the system shutdowns automatically.

Verify for hardware/temperature problems.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivajlo Yanakiev
Respected Contributor

Re: Linux Machine restarting

check you CRONTAB config !

Ivan Ferreira
Honored Contributor

Re: Linux Machine restarting

Agree with the above post. You can use grep shutdown /var/spool/cron/*, grep reboot /var/spool/cron/*, and also verify the /etc/crontab file, and the /etc/cron.d directory.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Pankaj_22
Advisor

Re: Linux Machine restarting

I have checked Temperature prob. I have checked all the

\cron.d ; \crontab; \cron\*

But I dont found anything
Muthukumar_5
Honored Contributor

Re: Linux Machine restarting

May be user defined script which is running in background and executing reboot.

Check with shutdown log file to find which user is executing script?

hth.
Easy to suggest when don't know about the problem!
Pankaj_22
Advisor

Re: Linux Machine restarting

Sorry guys but nothing in Log.
Pankaj_22
Advisor

Re: Linux Machine restarting

Machine is rebooting with proper shutdow. Machine is restarting at exact 4.02 AM nobody is there in office that time. Also we change the root password so that noone can shutdown the machine but still its happening.
Matti_Kurkela
Honored Contributor

Re: Linux Machine restarting

4.22 AM on Sunday? That is exactly the default time when RedHat runs all things found in directory /etc/cron.weekly. Check all the files in that directory.

If you have already checked that, remember that the shutdown command might not be "shutdown" or "reboot". It might be "init 6" or "telinit 6": they all produce the same result.

(The time is set at /etc/crontab, which calls the "run-parts" script to run all files marked as executable in a given directory. This is primarily so that individual packages can add things to /etc/cron.[hourly|daily|weekly|monthly] directories as appropriate.)
MK
Pankaj_22
Advisor

Re: Linux Machine restarting

I have tried with all the things but copuld not get anything. I have attached crontab file, please suggest if you can do something. Thank you
Jess Long
Frequent Advisor

Re: Linux Machine restarting

Look at the /var/log/cron logfile. If 'cron' is executing a script at or about the time the system is rebooting, then checkout that script. If only the cron.daily or cron.weekly scripts are run at that time, then, I would suspect one of the scripts in the appropriate directory.

I would also check /etc/anacrontab.
Ivan Ferreira
Honored Contributor

Re: Linux Machine restarting

It should be a script in /etc/cron.weekly. What is the contents of that directory?

The files in that directory runs every sunday at 4.22 AM.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Pankaj_22
Advisor

Re: Linux Machine restarting

Sorry guys I have checked out the Cron Weekly also but there is no thread of init6,telinit6 or shutdown,reboot.

So please suggest now.
Ivan Ferreira
Honored Contributor

Re: Linux Machine restarting

Maybe there is not an explicit shutdown, what is the contents of the directory, it may be another services that at end reboots the computer.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Pankaj_22
Advisor

Re: Linux Machine restarting

I have checked the contenet of etc/cron.weekly and that have only one file.Attached with this reply.

Please suggest now.
Eric Leung_2
Advisor

Re: Linux Machine restarting

I have the similiar problem. One of my 2 Red Hat Linux ES server will automatically reboot itself irregularly. I must stress that the server was shutdown gracefully.

I have checked all my cron setup and nothing wrong or related could be identified.

As the server is located in a secured computer suite, the possibility of unauthorised access is low.

Any idea?
Ivan Ferreira
Honored Contributor

Re: Linux Machine restarting

Try moving that file out that directory. The problem is that it's executed exactly at the time of the reboots, that's why we need to be really sure that this is not the issue.

To verify that the makewhatis command wasn't replaced by a trojan (that instead ejecuting the makewhatis is rebooting the system), use the following command:

rpm -V man

You should have no output if all it's fine.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Pankaj_22
Advisor

Re: Linux Machine restarting

Ivan I have checked your option and their is no reply for that command.

Tell me what to do next.