shutdown
PURPOSE
Ends system operation.
SYNOPSIS
shutdown [ -m ] [ -v ] [ seconds ]
shutdown [ -f ]
DESCRIPTION
The shutdown command brings the AIX Operating System from
distributed mode to multiuser mode, from multiuser mode
to maintenance mode, or halts the operating system com-
pletely by shutting down the virtual machine. You can
run shutdown only if you are a member of the system group
or if you have superuser authority.
During the default shutdown, users are notified (by a
wall command) of the impending system shutdown with the
message: "THE SYSTEM IS COMING DOWN NOW". However, the
shutdown is not complete until the user receives the
message: "...shutdown completed...". Do not attempt to
reboot the system (Ctrl-Alt-Pause) or turn off the system
before this message is displayed; otherwise, file system
damage may result.
During the shutdown, the hold command prevents any new
logins. After the specified number of seconds (60 by
default), the system stops the accounting and error-
logging processes. shutdown then runs the killall
command to end any remaining processes and runs the sync
command to flush all memory resident disk blocks.
Finally, it unmounts the file systems and sends the
appropriate signal to init. These signals are:
sigint Maintenance mode
sigterm Virtual machine halt.
Note: Users who have files open on the node that is
running shutdown, but who are not logged on that node are
not notified about the shutdown.
If there are no other users on the system and you want to
shutdown the system quickly, you may want to use shutdown
-f. This option bypasses messages to users and brings
the system down as quickly as possible.
If you request a complete halt to the operating system,
shutdown kills all processes, unmounts all file systems,
and sends init the sigterm signal.
Warning: If you are bringing the system down to mainte-
nance mode, you must run shutdown from the root directory
to ensure that it can cleanly unmount the file systems.
FLAGS
-d Brings the system down from a distributed mode to a
multiuser mode.
-f Does a fast shutdown, bypassing the messages to other
users and bringing the system down as quickly as pos-
sible. If you do not specify this flag, shutdown
sends a message to each logged-in user and waits a
certain amount of time before bringing the system
down, to allow each user to log off cleanly.
-m Brings the system down to maintenance mode. From
maintenance mode, you can return to multi-user mode.
-v Shuts down the virtual machine (halts the operating
system completely).
EXAMPLES
1. To tell the operating system you are about to turn
off the machine:
shutdown
This shuts down the system, waiting 60 seconds before
stopping the user processes and the init process.
2. To give users and the system more time to finish what
they are doing:
shutdown -m 120 *
This brings the system down from multiuser mode to
maintenance mode after waiting 120 seconds.
FILES
/etc/shutdown.sh
/etc/fshutdown.sh
RELATED INFORMATION
The following commands: "acct," "errstop," "init,"
"kill," and "killall,"
The dsstate and signal system calls in AIX Operating
System Technical Reference.