|
||||||||||||||||||||||||||||
1. Solaris Management Tools (Road Map) 2. Working With the Solaris Management Console (Tasks) 3. Working With the Sun Java Web Console (Tasks) 4. Managing User Accounts and Groups (Overview) 5. Managing User Accounts and Groups (Tasks) 6. Managing Client-Server Support (Overview) 7. Managing Diskless Clients (Tasks) 8. Introduction to Shutting Down and Booting a System 9. Shutting Down and Booting a System (Overview) 10. Shutting Down a System (Tasks) Shutting Down the System (Task Map) Turning Off Power to All Devices 11. Modifying Solaris Boot Behavior (Tasks) 12. Booting a Solaris System (Tasks) 13. Troubleshooting Booting a Solaris System (Tasks) 14. Managing the Solaris Boot Archives (Tasks) 15. x86: GRUB Based Booting (Reference) 16. Managing Services (Overview) 18. Managing Software (Overview) 19. Managing Software With Solaris System Administration Tools (Tasks) 20. Managing Software by Using Package Commands (Tasks) 21. Managing Solaris Patches by Using the patchadd Command (Tasks) |
Shutting Down the SystemSolaris software is designed to run continuously so that the electronic mail and network software can work correctly. However, some system administration tasks and emergency situations require that the system is shut down to a level where it is safe to remove power. In some cases, the system needs to be brought to an intermediate level, where not all system services are available. Such cases include the following:
For a complete list of system administration tasks that require a system shutdown, see Chapter 9, Shutting Down and Booting a System (Overview). For information on using your system's power management features, see the pmconfig(1M) man page. System Shutdown CommandsThe use of the init and shutdown commands are the primary ways to shut down a system. Both commands perform a clean shutdown of the system. As such, all file system changes are written to the disk, and all system services, processes, and the operating system are terminated normally. The use of a system's Stop key sequence or turning a system off and then on are not clean shutdowns because system services are terminated abruptly. However, sometimes these actions are needed in emergency situations. For instructions on system recovery techniques, see Chapter 12, Booting a Solaris System (Tasks) andChapter 14, Managing the Solaris Boot Archives (Tasks). Note - On x86 systems that are running at least the Solaris 10 6/06 release, pressing and releasing the power button initiates a clean system shutdown. This method is equivalent to using the init 5 command. The following table describes the various shutdown commands and provides recommendations for using them. Table 10-1 Shutdown CommandsUser Notification of System Down TimeWhen the shutdown command is initiated, a warning followed by a final shutdown message is broadcast to all users who are currently logged in to the system and all systems that are mounting resources from the affected system. For this reason, the shutdown command is preferred instead of the init command when you need to shut down a server. When you use either command, you might want to give users more notice by sending them a mail message about any scheduled system shutdown. Use the who command to determine which users on the system need to be notified. This command is also useful for determining a system's current run level. For more information, see Determining a System's Run Level and the who(1) man page. How to Determine Who Is Logged in to a SystemExample 10-1 Determining Who Is Logged in to a SystemThe following example shows how to display who is logged in to the system. $ who holly console May 7 07:30 kryten pts/0 May 7 07:35 (starlite) lister pts/1 May 7 07:40 (bluemidget)
How to Shut Down a Server
Example 10-2 SPARC: Bringing a Server to Run Level SIn the following example, the shutdown command is used to bring a SPARC based system to run level S (single-user level) in three minutes. # who root console Jun 14 15:49 (:0) # shutdown -g180 -y Shutdown started. Mon Jun 14 15:46:16 MDT 2004 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. Shutting down Solaris Management Console server on port 898. Print services stopped. 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 10-3 SPARC: Bringing a Server to Run Level 0In the following example, the shutdown command is used to bring a SPARC based system to run level 0 in 5 minutes without requiring additional confirmation. # who root console Jun 17 12:39 userabc pts/4 Jun 17 12:39 (:0.0) # shutdown -i0 -g300 -y Shutdown started. Thu Jun 17 12:40:25 MST 2004 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 If you are bringing the system to run level 0 to turn off power to all devices, see How to Turn Off Power to All Devices. Example 10-4 SPARC: Rebooting a Server to Run Level 3In the following example, the shutdown command is used to reboot a SPARC based system to run level 3 in two minutes. No additional confirmation is required. # who root console Jun 14 15:49 (:0) userabc pts/4 Jun 14 15:46 (:0.0) # shutdown -i6 -g120 -y Shutdown started. Mon Jun 14 15:46:16 MDT 2004 Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16... The system venus will be shut down in 2 minutes Changing to init state 6 - please wait # INIT: New run level: 6 The system is coming down. Please wait. . . . The system is down. syncing file systems... done rebooting... . . . venus console login: See AlsoRegardless of why you shut down a system, you'll 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 level, see Chapter 12, Booting a Solaris System (Tasks). How to Shut Down a Stand-Alone SystemUse this procedure when you need to shut down a stand-alone system.
Example 10-5 Using the uadmin command to Shut Down a System# uadmin 2 0 syncing file systems... done Program terminated Example 10-6 Bringing a Stand-Alone System to Run Level 0In this example, the init command is used to bring an x86 based stand-alone system to the 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 If you are bringing the system to run level 0 to turn off power to all devices, see How to Turn Off Power to All Devices. Example 10-7 SPARC: Bringing a Stand-Alone System to Run Level SIn this example, the init command is used to bring a SPARC based stand-alone system to run level S (single-user level). # init s # INIT: New run level: S The system is coming down for administration. Please wait. Unmounting remote filesystems: /vol nfs done. Print services stopped. syslogd: going down on signal 15 Killing user processes: done. SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx single-user privilege assigned to /dev/console. Entering System Maintenance Mode # See AlsoRegardless of why you shut down the system, you'll 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 level, see Chapter 12, Booting a Solaris System (Tasks). |
|||||||||||||||||||||||||||
|