Skip Navigation Links | |
Exit Print View | |
Booting and Shutting Down Oracle Solaris on SPARC Platforms Oracle Solaris 11 Information Library |
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
How to Determine Who Is Logged in to the System
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)
The following procedures and examples describe how to shut down a system by using the shutdown and init commands.
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.
$ who holly console May 7 07:30 kryten pts/0 May 7 07:35 (starlite) lister pts/1 May 7 07:40 (bluemidget)
Data in the first column identifies the user name of the logged-in user.
Data in the second column identifies the terminal line of the logged-in user.
Data in the third column identifies the date and time that the user logged in.
Data in the fourth column, if present, identifies the host name if the user is logged in from a remote 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.
# shutdown -iinit-state -ggrace-period -y
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.
Indicates a time (in seconds) before the system is shut down. The default is 60 seconds.
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.
Do you want to continue? (y or n): y
If you used the shutdown -y command, you will not be prompted to continue.
Type Ctrl-d to proceed with normal startup, (or give root password for system maintenance): xxxxxx
|
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).
Use this procedure when you need to shut down a stand-alone 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).