shutdown(8) System Manager's Manual shutdown(8)
shutdown - Shuts down a single system or an entire cluster
/usr/sbin/shutdown [-bfhknrs] time [warning-message ...]
/usr/sbin/shutdown -c [-hs] time [warning-message ...]
Defines the time at which the shutdown command will shut down the system (or cluster when the -c option is specified). There are several
ways to express this time: Use the word now to cause an immediate shutdown. Specify a future time using the format: +number. This format
starts a shutdown in number minutes. Specify a future time using the format: hhmm. This format starts a shutdown at the indicated time.
You can separate the hours (hh) and minutes (mm) with a colon (:). Anything following the time parameter on the command line is considered
to be a message, which is broadcast to users currently logged into the system or cluster. Prior to shutdown, the message is displayed on
all user terminals. The message is sent more frequently as the shutdown time approaches.
Sends a shutdown message to the rwalld daemon on all remote client hosts that have NFS file systems mounted from this system. This option
is incompatible with the -c option. Shuts down and halts all members of a cluster in an orderly fashion. The -h and -s options are invoked
by default when the -c option is specified. That is, there is no difference between specifying the -c option alone and specifying -csh. If
any options other than -h and -s are specified with the -c option, the shutdown command displays a usage message and exits. Performs a
fast shutdown (in the manner of the fastboot and the fasthalt programs), bypassing the messages to other users and bringing the system down
as quickly as possible. The system halts or reboots without checking the file systems. For example, the shutdown -f time command brings
the system to single user and creates the /fastboot file; when the system reboots to multiuser, it does not invoke fsck. The shutdown -f -r
time command shuts the system down, creates the /fastboot file, then immediately reboots. The shutdown -f -h time command creates the
/fastboot file and halts the system.
The -f option is incompatible with the -c option. Causes the system or cluster to shut down and halt.
When shutting down a single system, the shutdown command sends a SIGTERM signal to the init process, which brings it to single-user
mode, and then issues a halt command. However, if the -s option is specified with the -h option, the shutdown command executes the
run-level transition scripts (and does not send the SIGTERM signal) before halting the system.
Because halt is the only option when shutting down an entire cluster, the -h option is invoked by default when the -c option is
specified. Additionally, executing the run-level scripts is mandatory in a clusterwide shutdown, thus the -s option is invoked by
default, too. Sends shutdown messages to users, warning them of an impending shutdown. However, the system does not actually shut
down. The /etc/nologin_hostname file is not created.
This option is incompatible with the -c option. Bypasses the normal synchronization (syncing) of disks before stopping the system.
The -n option is incompatible with the -f and -c options. Causes the system to shut down and reboot.
The shutdown command accomplishes this by sending a SIGTERM signal to the init process, which brings it to single-user mode, and
then issues the reboot command. However, if the -s option is specified with the -h option, the shutdown command executes the run-
level transition scripts (and does not send the SIGTERM signal) before rebooting the system.
This option is incompatible with the -c option. Executes the stop entry point of the run-level transition scripts in
/sbin/rc0.d/[Knn_name], /sbin/rc2.d/[Knn_name], and /sbin/rc3.d/[Knn_name] (for example, the stop entry point of /sbin/rc0.d/K45sys-
The run level at which the shutdown command is invoked determines which scripts are executed. If the current run level is level 3 or
higher, the Knn_name scripts from all three directories are run. If the run level is 2, then only scripts from /sbin/rc0.d and
/sbin/rc2.d are run. If the run level is 1, only scripts from /sbin/rc0.d are run.
This option is optional for single-system shutdowns but is invoked by default for clusterwide shutdowns. It can be used only with
the -r, -c, or -h options.
The shutdown command provides an automated shutdown procedure. You must be root to use this command.
When shutting down a single system, use the shutdown command shown in the first format line in the SYNOPSIS section. If the -s option is
not specified, the shutdown command sends a SIGTERM signal to the init process, which shuts the system down to single-user mode. It then
halts the system, reboots it, or does nothing, depending upon whether the -h, -r, or neither option is specified: If the -h option is spec-
ified, the system is shut down to single-user mode and then halted. If the -r option is specified, the system is shut down to single-user
mode and rebooted. If neither the -h or -r options is specified, the system is shut down to and remains in single-user mode.
If you specify the -s option with the -h or -r option, the shutdown command does not send the SIGTERM signal prior to halting or rebooting
the system. Rather, it executes the stop entry point of the run level transition scripts in /sbin/rc0.d/[Knn_name], /sbin/rc2.d/[Knn_name],
and /sbin/rc3.d/[Knn_name]. The run level at which the shutdown command is invoked determines which scripts are executed.
When shutting down an entire cluster, use the shutdown command shown in the second format line in the SYNOPSIS section: /usr/sbin/shutdown
-c [-hs] time [warning-message ...]
You must shut an entire cluster down to a halt. (Automatic reboots and shutting down to single user mode are not supported.) If you specify
the -c option, the -h and -s options are invoked by default.
The shutdown process is similar for single-system and cluster shutdowns. Five minutes before shutdown (or immediately, if shutdown is in
less than five minutes) the shutdown command creates the /etc/nologin_hostname file (or /etc/nologin in the case of a clusterwide shutdown)
and copies the warning-message and time of the shutdown to it.
If a user subsequently attempts to log in, the login program checks for the existence of /etc/nologin_hostname or /etc/nologin as appropri-
ate, prints the contents, and exits. The shutdown command removes the /etc/nologin_hostname or /etc/nologin file just before it exits.
Similarly, when the shutdown command is invoked with the -c option to shut down an entire cluster, the shutdown command creates the /clus-
ter/admin/.clu_shutdown_file file and copies the command parameters to it. The existence of this file prevents new members from joining a
cluster while a clusterwide shutdown is in progress. It also prevents multiple clusterwide shutdowns from occurring simultaneously.
The time parameter establishes a "grace period" during which you can cancel a shutdown. You must not abort a shutdown process once the
grace period ends and the shutdown actually begins.
To cancel a system or cluster shutdown during the grace period, use the following procedure: From the system on which you executed the
shutdown command, identify the shutdown processes. There is a single shutdown process for /usr/sbin/shutdown; in a cluster, there may also
be a /usr/sbin/clu_shutdown process. For example: # ps ax | grep -v grep | grep shutdown 14680 ttyp5 I < 0:00.01 /usr/sbin/shutdown
+20 going down 14687 ttyp5 I < 0:00.01 /usr/sbin/clu_shutdown Terminate all of them by specifying their PIDs in a kill command. For
example: # kill 14680 14687 If you kill the shutdown processes during the grace period, the shutdown is canceled and the /etc/nologin_host-
name file is removed. In a clusterwide shutdown, the /etc/nologin and /cluster/admin/.clu_shutdown_file files are removed.
If a clusterwide shutdown does not run to completion, the remaining members might be left in a state with quorum checking turned off.
Logins, member boots, and additional clusterwide shutdowns might all be disabled. To clear this state, you must manually shut down the
remaining members one at a time (for example, by using the shutdown -h command) before resuming cluster operation. Failure to do so can
lead to unpredictable cluster operation and possible data corruption.
In the rare event that a member does not respond to the shutdown -h command, use the /usr/sbin/halt command to halt it. (If you must halt
multiple members in this manner, halt them one at a time.) As a final resort, press the member's halt button to halt it and then crash the
system at the console prompt to create a crash dump.
At shutdown time, the shutdown command writes a message to the system log. This message states the time of the shutdown, who ran the shut-
down command, and the reason.
Specifies the command path.
Location of the nologin file for a clusterwide shutdown.
Location of the nologin file for a nonclustered system. For example, /etc/nologin_sys5.zk3.dec.com.
Contains parameters associated with a clusterwide shutdown. This file is locked during a clusterwide shutdown to prevent multiple simulta-
neous clusterwide shutdowns and to keep new members from joining the cluster during the shutdown.
A record of all clusterwide shutdowns for the cluster is written to this file.
Clusterwide shutdown script called by the shutdown command.
Commands: fastboot(8), fasthalt(8), halt(8), login(1), reboot(8), wall(1)