Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administration Tasks: HP 9000 > Chapter 2 Starting and Stopping HP-UX

Shutting Down the System

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

You must be the system administrator with superuser capabilities or a designated user with superuser capabilities to shut down the system. Typically, you shut down the system before:

  • putting it in single-user state so you can update the system, reconfigure the kernel, check the file systems, or back up the system

  • turning it off completely so you can perform a task such as installing a new disk or interface card

  • activating a new kernel

Using SAM

From SAM, open the "Routine Tasks" menu item and select "System Shutdown". From this System Shutdown window, you can then:

  • halt the system

  • reboot (restart) the system

  • go to single-user state

Also from this window, you can choose a grace period in the "Time Before Shutdown" control box. When SAM prompts you, type a message to your users indicating how much time they have to end their activities and when to log off. Then, SAM proceeds to shut down your system. You will have one more opportunity to discontinue the shutdown process.

Using HP-UX Commands

Changing to the Single-User State

  1. Change to the root directory:

    cd /
  2. Shut down the system. For example:

    shutdown

    This command shuts down to single-user state allowing the default 60 second grace period. If you use a network service, do not run /usr/sbin/shutdown from a remote system using rlogin. If you do, you will get logged out prematurely and control will be returned to the system console. Watch the messages during the process and note actions. For details, see shutdown(1M).

Broadcasting a Message to Users

Before changing to the single-user state, you are asked if you want to send a message to inform users how much time they have to end their activities and when to log off. If you elect to send a message:

  1. Respond with y.

  2. Type the message.

  3. When you finish entering the message, press Return (or Enter) and then CTRL-D.

Alternatively, you can use the /usr/sbin/wall command to send the message.

Rebooting the System

When you finish performing necessary system administration tasks, you can start up the system without turning off any equipment.

If /usr/sbin/shutdown has been run and the system is in single-user state (run level s), use the command

reboot

Otherwise, use

shutdown -r

Halting the System

  1. Follow the steps from the previous section "Changing to the Single-User State".

  2. Bring the system to a complete stop:

    reboot -h

Watch the messages during the process and note actions.

The system is shut down completely when the system displays halted and pressing a key has no effect.

Turning Off the System

When the system is halted, turn the system off as follows:

  1. If you have only a computer (no expander), turn the computer off. Then, turn the devices off as required.

  2. If you have a computer and an expander, turn the computer off, turn the expander off, and then turn the devices off as required.

To restart the system, reverse the order of these steps.

NOTE: From the multi-user state, you can also completely shut down the system by executing:
shutdown -h

Shutting Down the System to Activate a New Kernel

From the multi-user state, shut down the system for activating a new kernel by entering:

shutdown -r

The -r option causes the system to reboot immediately after the system gets into the single-user state.

Do not execute shutdown -r from single-user run-level. You must reboot using the /sbin/reboot command (see reboot(1M) for details).

Designating Shutdown Authorization

By default, only the superuser can run /usr/sbin/shutdown. You can designate other users to run shutdown by listing their usernames in the /etc/shutdown.allow file. However, if this file is empty, only the superuser will have shutdown authority. If this file is not empty and the superuser login (usually root) is not included in the file, the superuser will not be permitted to shut down the system.

In the shutdown.allow file, if + appears in the user name position, it means any user can shut down this sytem. If + appears in the system name position, it means any system can be shut down by the named user(s). For more information on shutdown.allow, see shutdown(1M). Here are some examples:

Title not available (Designating Shutdown Authorization )

systemC +

allows any user on system C to shut down systemC.

+ root

allows anyone with root permission to shut down the system.

systemA user1

allows user1 on system A to shut down systemA.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.