SHUTDOWN(1M)
NAME
shutdown − terminate all processing
SYNOPSIS
/etc/shutdown [ −h | −r ] [ −d device ] [ −f lif_file ] [ grace ]
DESCRIPTION
Shutdown 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)), and to halt or reboot the system. The procedure is designed to interact with the operator; that is, the person who invoked shutdown. Shutdown may instruct the operator to perform specific tasks or supply certain responses before execution can resume.
Shutdown goes through the following steps:
All file systems’ super blocks are updated; see sync(1M). This must be done before rebooting the system to ensure file system integrity.
All users logged in on the system are notified to log out by a broadcast message. The operator can display his/her own message at this time. Otherwise, a standard warning message is displayed.
All currently executing processes are terminated except those essential to the system or associated with the shutdown procedure.
All file systems are unmounted.
The next step depends on which of the following options are selected:
−h Shutdown the system and halt.
−r Shutdown the system and reboot automatically.
−d device Reboot from the specified device. The device must be a lif volume. The −d option can only be used with the −r option.
−f lif_file Reboot from the specified file. If the filename is the NULL string, the power-up search sequence is made for a system. Otherwise, the filename has to follow the lif filename convention. The −f option can only be used with the −r option.
grace Grace specifies, in seconds, a grace period for users to log off before the system shuts down. The default is 60 seconds. If grace is zero, shutdown runs more quickly, giving users very little time to log out.
If neither −r or −h is specified, the system is placed in run-level s; see init(1M).
In the HP Clustered environment, executing shutdown on the cluster server of a cluster causes all cluster nodes to also shut down. Each cluster node is shut down by a shutdown command executing locally. The arguments for these local shutdown commands are copied from the cluster server’s shutdown command, with the exception of the −d and −f options.
If neither −h nor −r is specified from the cluster server, the local shutdown commands use −r when executing. Note that prior to executing shutdown on each cluster node, the cluster server’s shutdown command disables the remote boot daemon. Thus, non-cluster-server cluster nodes cannot actually reboot until the remote boot daemon is enabled on the cluster server.
Executing shutdown on a client node only affects that node.
Only the super-user can execute the shutdown command.
RETURN VALUE
The most commonly encountered error diagnostic is device busy. This happens when a particular file system could not be unmounted; see mount(1M).
EXAMPLES
To immediately reboot the system and run
HP-UX again: shutdown −r 0
To halt the system in 5 minutes:
shutdown −h 300
To go to init
run−level s in 10 minutes: shutdown 600
DEPENDENCIES
Series 800
The −d and −f options are not supported.
SEE ALSO
init(1M), killall(1M), mount(1M), rbootd(1M), reboot(1M), sync(1M).
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989