Solaris Handbook for Sun Peripherals

The shutdown Command

Use the /usr/sbin/shutdown command to shut down servers when users must be notified of the impending shutdown.

To Shut Down a Multiuser System Using shutdown

This section describes how to shut down a multiuser system, such as a server.

  1. Become superuser.

  2. To find out if users are logged into the system, type:


    # who 
    

    A list of all logged-in users is displayed. You can send email or broadcast a message to let users know that the system is being shut down.

  3. Stop all applications and close any open files on the system.

  4. Ensure that the operating system checks for newly installed peripheral devices when you power on or reboot your system, type:


    # touch /reconfigure 
    

    The touch /reconfigure command performs the same function as the boot -r command. It allows the operating system to recognize the presence of all newly installed peripheral devices.

  5. Shut down the system, by typing:


    # /usr/sbin/shutdown -y -ggrace_period -irun_level
    

    In this command:

     shutdown

    Brings a system to run level s (single-user mode) by default. A message is broadcast to all users. After a 60-second wait (default), you are asked to confirm that you want to shut down the system.

     -y

    Continues to shut down the system without intervention; otherwise, you are prompted to continue the shutdown process. 

    -ggrace_period

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

    -irun_level

    Allows you to bring the system to an run level that is different from the default. (Refer to Table 1-3 for run level information.) Specify a number for run_level.

    In the following example, the system will be brought to run level 0 in 3 minutes without requiring additional confirmation.


    # /usr/sbin/shutdown -y -g180 -i0
    Shutdown started.    Fri Nov 4 11:07:33 MST 1994
    Broadcast Message from root (console) on pluto Fri Nov 4 11:07:34
    The system will be shut down in 3 minutes
                        .
                        .
                        .
    INIT: New run level: 0
    The system is coming down. Please wait.
                        .
                        .
                        .
    The system is down.
    syncing file systems... [11] [9] [5] done
    Program terminated
    Type help for more information
    ok 

  6. If you are asked for confirmation, type y.


    ok Do you want to continue? (y or n): y 
    

  7. If you are installing a new SCSI device continue with Step 8.

    If you are installing a new card continue with instructions in Chapter 5, Setting Up an Option Card."

  8. Reset the SCSI bus by typing:


    ok reset 
    Immediately press Stop-A once you see the banner on your
    screen.
    

    The reset command (reset-all on some systems) resets the SCSI bus and memory to ensure a effective probe-scsi search. The Stop-A key sequence interrupts the reboot process that normally results form the reset command. This way you remain at run level 0 to perform the probe-scsi command.


    Note -

    Be sure to turn on all SCSI devices, such as disk and tape drives, before you attempt to use the probe-scsi or probe-scsi-all commands. The probe-scsi command can detect connected SCSI devices only if they are turned on.


  9. List the SCSI target IDs that are currently used on the SCSI bus by typing:


    ok probe-scsi 
    

    If you have more than one SCSI bus on your system, use the probe-scsi-all command. This command probes for all SCSI devices on every SCSI bus.

  10. Choose an unused SCSI target ID for your device.

    Note the target IDs that are already assigned and choose an unused target for your new device. For more information on selecting a target ID see Appendix A, SCSI Addressing".

  11. After the ok prompt is displayed, turn off the power to the system and then to all external peripheral devices.

You are now ready to install the peripheral device. Refer to the documentation that accompanies your hardware, and the appropriate section in this manual: