Operating System - HP-UX
1834660 Members
2172 Online
110069 Solutions
New Discussion

best practices question - shutdown vs. reboot

 
SOLVED
Go to solution
Jeff Nyberg
Advisor

best practices question - shutdown vs. reboot

Hi-
I am forced by a software package's licensing structure to reboot my K-box once per week. I read that the shutdown command should be used over the reboot command because it is a smoother shutdown. If I use shutdown -r is that the same as the reboot command, or does it shut things down properly and then simply restart?

In a perfect world which would you use?
shutdown -hy 0
shutdown -ry 0
reboot -??

Thanks in advance for your advice!

Jeff
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: best practices question - shutdown vs. reboot

Shutdown -r -y 0 would be my preference because this causes an orderly shutdown going through all the rc kill scripts; however; my real preference would be to contact the software vendor and demand a fix. I never tolerate sloppy software. Weekly rebbot are not acceptable; you are fixing the symptoms not the problem.
If it ain't broke, I can fix that.
Kevin Wright
Honored Contributor

Re: best practices question - shutdown vs. reboot

reboot doesn't run through the rc scripts, it basically does a kill on all process. Shutdown calls init, which runs through all the rc scripts shutting down processes correctly. I have to wonder why you must reboot once a week though, very strange. but to answer your question..
shutdown -ry now should be perfomed.
Uday_S_Ankolekar
Honored Contributor

Re: best practices question - shutdown vs. reboot

Hello,

Shutdown -hy would halt the system. This is usefull during hardware maintainance

shutdown -ry will shoutdown the server and the restart it clean safe way.

I would go for shutdown -ry

-Goodluck,
-USA..
Good Luck..
Uday_S_Ankolekar
Honored Contributor

Re: best practices question - shutdown vs. reboot

Hi again,

BTW, Why this software need weekly reboot..?? You should not boot the server weekly to fix software vendor's bug!!
Good Luck..
Sandip Ghosh
Honored Contributor

Re: best practices question - shutdown vs. reboot

Hi Jeff,

shutdown -hy 0 will halt the system
shutdown -ry 0 will reboot the system in a proper way by executing the rc scripts
and
reboot will do the shutdown abruptly and reboot the server. There may be a chance of corruption in this case.

I think your application has some memory leakage for which your Software vendor has told you to reboot the server once in a week. By reboot they mean to say shutdown -ry 0.

Sandip
Good Luck!!!
Jeff Nyberg
Advisor

Re: best practices question - shutdown vs. reboot

shutdown -ry it is.......

thanks again
melvyn burnard
Honored Contributor

Re: best practices question - shutdown vs. reboot

NEVER use reboot to shut a system down unless you ar eabsolutley confident nothing of importance is running, or you are in single user mode.
It basically issues kill -9 to all processes remaining, which is very inelegant

As per the man page, the -r option to the shutdown command calls the reboot command once it has finished the systematic and orderly halt of most functions.

I also agree that the vendor should fix this software that requires you to restart the system weekly.

My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Bill McNAMARA_1
Honored Contributor

Re: best practices question - shutdown vs. reboot

I prefer reboot because it's quick!

I also don't have any users on most of my systems nor do I have any apps that require graceful shutdowns....

Later,
Bill
It works for me (tm)