System Administration
Showing results for 
Search instead for 
Did you mean: 

reboot and shutdown the servers

Go to solution
Super Advisor

reboot and shutdown the servers

Dear Sirs,

Which are tghe best commands to "reboot" and "shutdown" the hpux servers ? Can we do it as a powerbroker user or will need to login as a root on the console ?

Do we need to take backup of any config files in case servers fails to come up successfully ?

Honored Contributor

Re: reboot and shutdown the servers

shutdown is the preferred command to use since it runs through the init.d scripts to bring things down gracefully.

Any user defined in /etc/shutdown.allow can use the shutdown command. No need to be logged on the console either, though that is typically preferred so you can watch the enter boot process for problems.
Jeff Traigle
Steven E. Protter
Exalted Contributor

Re: reboot and shutdown the servers

Shalom Shiv,

reboot is quick and does not run the shutdown scripts. It can and has corrupted data and databases in the past.

it is much faster.

shutdown is the right way to go especially for critical systems with critical data on them.

shutdown runs the shutdown scripts as planned in the init/shutdown setup.

Steven E Protter
Owner of ISN Corporation
James R. Ferguson
Acclaimed Contributor

Re: reboot and shutdown the servers

Hi Shiv:

'reboot' is really the last step of 'shutdown'. 'shutdown' causes your '/sbin/init.d/*' "stop" sequences to run while 'reboot' does not. Therefore, it is appropriate and wise to do 'shutdown' whenever possible.


James R. Ferguson
Acclaimed Contributor

Re: reboot and shutdown the servers

Hi SHiv:

I should add that you can enable a non-root user to run the 'shutdown' command by adding the user to the '/etc/shutdown.allow' file.

See the manpages for 'shutdown(1M)' for more information.


Deoncia Grayson_1
Honored Contributor

Re: reboot and shutdown the servers

the reboot command kills all processes instead of gracefully terminating them, it speeds the boot process up but it may cause data lost/corruption

you should use the shutdown -r to reboot your server gracefully...

you can add users to the shutdown.allow file which is located in /etc which give user rights to run the shutdown command.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Raj D.
Honored Contributor

Re: reboot and shutdown the servers

Hi Shiv,

Here is something:

1. If you have not rebooted/shutdowned the server long time, it is a good practice to keep all the configuration data backed up, incase of any problem. [ Nickel and cfg2html is good. ]

2. You can issue # shutdown -r -y 0
To reboot the server.

And # shutdown -h -y 0
To Halt.

3. You can login to console , to use the reboot to check for any error messages in console . You can use sudo or powerbroker , but rebooting/shutdown from console gives you much flexibility.

" If u think u can , If u think u cannot , - You are always Right . "
Hoang Chi Cong_1
Honored Contributor

Re: reboot and shutdown the servers

Hi Shivkumar
As I think there isn't "best command to reboot and shutdown" a HP-UX server :)
As HP engineer recommendation: should'n give "root" permission to any other user for security reason!

The most importance things in your question is: Was reboot or shutdown process effected to your applications?
The answer is: It depend on your applications!
In my system, before reboot or shutdown the server, I always shutdown all my application for example: Oracle, DB2, etc...

Of course, you need to backup all your application for saving data and application configuration including backup importance volume group (vg00 like an example).

Hope this helps
Hoang Chi Cong
Looking for a special chance.......
Valued Contributor

Re: reboot and shutdown the servers


The Best command to Shutdown and Reboot a hp unix Server is ..

To shutdown..
#shutdown -yh 0

To Reboot..

#shutdown -yr 0

To execute this command either u should have root access or u should have sudo permission.

Never Ever Give Up
Joseph Loo
Honored Contributor

Re: reboot and shutdown the servers


it depends on needs, a good doc on whether u like to reboot or shutdown:

as to whether backup is essential, it depends as well. if u have not shutdown for a very, very long time, and intent to leave the system down for a day or 2, it will be good to backup and also make_tape_recovery, cause u never know if the disks will fail.

what you do not see does not mean you should not believe