*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> shutdown (1m)              


 shutdown(1M)                                                   shutdown(1M)

 NAME    [Toc]    [Back]
      shutdown - terminate all processing

 SYNOPSIS    [Toc]    [Back]
      /sbin/shutdown [-h|-r] [-y] [-o] [grace]

      /sbin/shutdown -R [-H] [-y] [-o] [grace]

 DESCRIPTION    [Toc]    [Back]
      The shutdown command is part of the HP-UX system operation procedures.
      Its primary function is to terminate all currently running processes
      in an orderly and cautious manner.  shutdown can be used to put the
      system in single-user mode for administrative purposes such as backup
      or file system consistency checks (see fsck(1M)), to halt or reboot
      the system, or to make the partition ready for reconfiguration.  By
      default, shutdown is an interactive program.

    Options and Arguments    [Toc]    [Back]
      shutdown recognizes the following options and arguments.

           -h        Shut down the system and halt.

           -r        Shut down the system and reboot automatically.

           -R        Shut down the system to a ready-to-reconfigure state
                     and reboot if possible.  If the partition is unable to
                     reboot, it will stop at a ready-to-reconfigure state.
                     However, if the -H option is also specified, the system
                     will always stop at ready-to-reconfigure state.  This
                     option is available only on systems that support
                     hardware partitions.

           -H        Shut down the system to a ready-to-reconfigure state
                     and do not reboot.  This option can be used only in
                     combination with the -R option.  This option is
                     available only on systems that support hardware

           -y        Do not require any interactive responses from the user.
                     (Respond yes or no as appropriate to all questions,
                     such that the user does not interact with the shutdown

           -o        When executed on the cluster server in a diskless
                     cluster environment, shutdown the server only and do
                     not reboot clients.  If this argument is not entered
                     the default behavior is to reboot all clients when the
                     server is shutdown.

           grace     Either a decimal integer that specifies the duration in
                     seconds of a grace period for users to log off before

 Hewlett-Packard Company            - 1 -      HP-UX 11i Version 2: Sep 2004

 shutdown(1M)                                                   shutdown(1M)

                     the system shuts down, or the word now.  The default is
                     60.  If grace is either 0 or now, shutdown runs more
                     quickly, giving users very little time to log out.

      If -r (reboot) or -h (halt) or -R (reconfigure) are not specified,
      standalone and server systems are placed in single-user state.  Either
      -r (reboot) or -h (halt) must be specified for a client; shutdown to
      single-user state is not allowed for a client.  See init(1M).

    Shutdown Procedure    [Toc]    [Back]
      shutdown goes through the following steps:

           +  The PATH environment variable is reset to

           +  The IFS environment variable is reset to space, tab, newline.

           +  The user is checked for authorization to execute the shutdown
              command.  Only authorized users can execute the shutdown
              command.  See FILES for more information on the
              /etc/shutdown.allow authorization file.

           +  The current working directory is changed to the root directory

           +  All file systems' super blocks are updated; see sync(1M).
              This must be done before rebooting the system to ensure file
              system integrity.

           +  The real user ID is set to that of the superuser.

           +  A broadcast message is sent to all users currently logged in
              on the system telling them to log out.  The administrator can
              specify a message at this time; otherwise, a standard warning
              message is displayed.

           +  The next step depends on whether a system is standalone, a
              server, or a client.

              +  If the system is standalone, /sbin/rc is executed to shut
                 down subsystems, unmount file systems, and perform other
                 tasks to bring the system to run level 0.

              +  If the system is a server, the optional -o argument is used
                 to determine if all clients in the cluster should also be
                 rebooted.  The default behavior (command-line parameter -o
                 is not entered) is to reboot all clients using
                 /sbin/reboot; entering -o results in the server only being
                 rebooted and the clients being left alone.  Then /sbin/rc
                 is executed to shut down subsystems, unmount file systems,
                 and perform other tasks to bring the system to run level 0.

 Hewlett-Packard Company            - 2 -      HP-UX 11i Version 2: Sep 2004

 shutdown(1M)                                                   shutdown(1M)

              +  If the system is a client, /sbin/rc is executed to bring
                 the system down to run-level 2, and then /sbin/reboot is
                 executed.  Shutdown to the single-user state is not an
                 allowed option for clients.

           +  The system is rebooted, halted, or put in the ready-toreconfigure
 state by executing /sbin/reboot if the -h or -r or
              -R option was chosen.  If the system was not a cluster client
              and the system was being brought down to single-user state, a
              signal is sent to the init process to change states (see

 DIAGNOSTICS    [Toc]    [Back]
      device busy

           This is the most commonly encountered error diagnostic, and
           happens when a particular file system could not be unmounted; see

      user not allowed to shut down this system

           User is not authorized to shut down the system.  User and system
           must both be included in the authorization file

 EXAMPLES    [Toc]    [Back]
      Immediately reboot the system and run HP-UX again:

           shutdown -r 0

      Halt the system in 5 minutes (300 seconds) with no interactive
      questions and answers:

           shutdown -h -y 300

      Go to run-level s in 10 minutes:

           shutdown 600

      Immediately shut down a partition so that it can be deleted:

           shutdown -R -H 0

      Reboot a partition in 5 minutes so that new cells that have been
      assigned to the partition become active:

           shutdown -R 300

 WARNINGS    [Toc]    [Back]
      The user name compared with the entry in the shutdown.allow file is
      obtained using getpwuid() (see getpwent(3C)).

 Hewlett-Packard Company            - 3 -      HP-UX 11i Version 2: Sep 2004

 shutdown(1M)                                                   shutdown(1M)

      The hostname in /etc/shutdown.allow is compared with the hostname
      obtained using gethostbyname() (see gethostent(3N)).

      shutdown must be executed from a directory on the root volume, such as
      the / directory.

      The maximum broadcast message that can be sent is approximately 970

      When executing shutdown on an NFS diskless cluster server and the -o
      option is not entered, clients of the server will be rebooted.  No
      clients should be individually rebooted or shutdown while the cluster
      is being shutdown.

      If the -R option is used in a virtual partition environment on a
      partitionable system, then the requested reconfiguration will not take
      place until all the virtual partitions on that hard partition are shut
      down and the virtual partition monitor is rebooted.

 FILES    [Toc]    [Back]

                Authorization file.

                The file contains lines that consist of a system host name
                and the login name of a user who is authorized to reboot or
                halt the system.  A superuser's login name must be included
                in this file in order to execute shutdown.  However, if the
                file is missing or of zero length, the root user can run the
                shutdown program to bring the system down.

                This file does not affect authorization to bring the system
                down to single-user state for maintenance purposes; that
                operation is permitted only when invoked by a superuser.

                A comment character, #, at the beginning of a line causes
                the rest of the line to be ignored (comments cannot span
                multiple lines without additional comment characters).
                Blank lines are also ignored.

                The wildcard character + can be used in place of a host name
                or a user name to specify all hosts or all users,
                respectively (see hosts.equiv(4)).

                For example:

                     # user1 can shut down systemA and systemB
                     systemA user1
                     systemB user1
                     # root can shut down any system
                     + root

 Hewlett-Packard Company            - 4 -      HP-UX 11i Version 2: Sep 2004

 shutdown(1M)                                                   shutdown(1M)

                     # Any user can shut down systemC
                     systemC  +

 SEE ALSO    [Toc]    [Back]
      fsck(1M), init(1M), killall(1M), mount(1M), reboot(1M), sync(1M),
      gethostent(3N), getpwent(3C), hosts.equiv(4).

      For more information about shutdowns and reboots on Superdome systems,
      see the manual, Managing Superdome Complexes: A Guide for System
      Administrators, available on the web at http://docs.hp.com.

 Hewlett-Packard Company            - 5 -      HP-UX 11i Version 2: Sep 2004
[ Back ]
 Similar pages
Name OS Title
cpu OpenBSD Central Processing Unit
awk IRIX pattern scanning and processing language
ffassign IRIX Provides library interface to assign processing
oawk IRIX pattern scanning and processing language
loader.4th FreeBSD loader.conf processing tools
npx FreeBSD Numeric Processing Extension coprocessor
mailx HP-UX interactive message processing system
awk Tru64 Pattern scanning and processing language
assign IRIX Provides library interface to assign processing
awk HP-UX pattern-directed scanning and processing language
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service