JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Booting and Shutting Down Oracle Solaris on SPARC Platforms     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

1.  Booting and Shutting Down a SPARC Based System (Overview)

2.  Booting a SPARC Based System to a Specified State (Tasks)

3.  Shutting Down a System (Tasks)

Shutting Down a System (Task Map)

Overview of Shutting Down a System

Guidelines for Shutting Down a System

System Shutdown Commands

Shutting Down a System

How to Determine Who Is Logged in to the System

How to Shut Down a System by Using the shutdown Command

How to Shut Down a System by Using the init Command

Turning Off Power to System Devices

4.  Rebooting a SPARC Based System (Tasks)

5.  Booting a SPARC Based System From the Network (Tasks)

6.  Modifying Boot Parameters on a SPARC Based System (Tasks)

7.  Creating, Administering, and Booting From ZFS Boot Environments on SPARC Platforms (Tasks)

8.  Keeping a SPARC Based System Bootable (Tasks)

9.  Troubleshooting Booting a SPARC Based System (Tasks)

Index

Shutting Down a System

The following procedures and examples describe how to shut down a system by using the shutdown and init commands.

How to Determine Who Is Logged in to the System

For Oracle Solaris systems that are used as multiuser timesharing systems, you might need to determine if any users are logged into the system before shutting it down. Use the following procedure in these instances.

How to Shut Down a System by Using the shutdown Command

  1. Become the root role.
  2. For a multiuser server shutdown, find out if any users are logged in to the system.
    # who

    Note - This step is conditional and only required if the system is a multiuser timesharing system and not typically used when shutting down newer Oracle Solaris servers and processors.


  3. Shut down the system.
    # shutdown -iinit-state -ggrace-period -y
    -iinit-state

    Brings the system to an init state that is different from the default of S. The choices are 0, 1, 2, 5, and 6.

    Run levels 0 and 5 are states reserved for shutting the system down. Run level 6 reboots the system. Run level 2 is available as a multiuser operating state.

    -ggrace-period

    Indicates a time (in seconds) before the system is shut down. The default is 60 seconds.

    -y

    Continues to shut down the system without intervention. Otherwise, you are prompted to continue the shutdown process after 60 seconds.

    For more information, see the shutdown(1M) man page.

  4. If you are asked for confirmation, type y.
    Do you want to continue? (y or n): y

    If you used the shutdown -y command, you will not be prompted to continue.

  5. Type the root password, if prompted.
    Type Ctrl-d to proceed with normal startup,
    (or give root password for system maintenance): xxxxxx
  6. After you have finished performing any system administration tasks, press Control-D to return to the default system run level.
  7. Use the following table to verify that the system is at the run level that you specified in the shutdown command.
    Specified Run Level
    SPARC Based System Prompt
    S (single-user state)
    #
    0 (power-down state)
    ok or >
    Run level 3 (multiuser state with remote resources shared)
    hostname console login:

Example 3-1 Bringing a Multiuser Server to a Single-User State (Run Level S) by Using the shutdown Command

In the following example, the shutdown command is used to bring a SPARC based system to run level S (the single-user state) in three minutes.

# who
root   console      Jun 14 15:49    (:0)

# shutdown -g180 -y

Shutdown started.    Mon Jun 14 15:46:16...

Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16...
The system venus will be shut down in 3 minutes .
.
.
Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16...
The system venus will be shut down in 30 seconds .
.
.
INIT: New run level: S
The system is coming down for administration.  Please wait.
Unmounting remote filesystems: /vol nfs done.
.
.
.
Jun 14 15:49:00 venus syslogd: going down on signal 15
Killing user processes: done.

Requesting System Maintenance Mode
SINGLE USER MODE

Root password for system maintenance (control-d to bypass): xxxxxx
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode
.
.
.

Example 3-2 Bringing a System to a Shutdown State (Run Level 0) by Using the shutdown Command

In the following example, the shutdown command is used to bring a SPARC based system to run level 0 in five minutes without requiring additional confirmation.

# shutdown
Shutdown started.    Thu Jun 17 12:40:25...

Broadcast Message from root (console) on pretend Thu Jun 17 12:40:25...
The system pretend will be shut down in 5 minutes 
.
.
.
Changing to init state 0 - please wait
# 
INIT: New run level: 0
The system is coming down.  Please wait.
System services are now being stopped.
.
.
.
The system is down.
syncing file systems... done
Program terminated
Type  help  for more information
ok

See Also

Regardless of why you shut down a system, you will probably want to return to run level 3, where all file resources are available, and users can log in. For instructions on bringing a system back to a multiuser state, see Booting a SPARC Based System to a Multiuser State (Run Level 3).

How to Shut Down a System by Using the init Command

Use this procedure when you need to shut down a stand-alone system.

  1. Become the root role.
  2. Shut down the system.
    # init 5

    For more information, see the init(1M) man page.

Example 3-3 Bringing a System to a Shutdown State (Run Level 0) by Using the init Command

In this example, the init command is used to bring a system to the run level where it is safe to turn off power.

# init 0
#
INIT: New run level: 0
The system is coming down.  Please wait.
.
.
.
The system is down.
syncing file systems... [11] [10] [3] done
Press any key to reboot

See Also

Regardless of why you shut down the system, you will probably want to return to run level 3, where all file resources are available, and users can log in. For instructions on bringing a system back to a multiuser state, see Booting a SPARC Based System to a Multiuser State (Run Level 3).