La commande 'shutdown' permet d'arrêter ou de relancer un serveur AIX.

Plus souple et plus propre que la commande 'reboot', cette commande va lancer les procédures d'arrêt prévues, à commencer par le script '/etc/rc.shutdown'.

La syntaxe de base pour l'arrêt complet sans attendre une minute est 'shutdown -F'.

La syntaxe de base pour l'arrêt propre et la relance( Sans relecture du profil de la LPAR!) est 'shutdown -Fr'.

Si vous devez prendre les nouveaux paramêtres d'un profil de LPAR, il d'abord arrêter le système par 'shutdown -F', puis le relancer depuis la HMC.

Ci-dessous la syntaxe officielle de la commande AIX.

 

shutdown Command

Purpose

       Ends system operation.

Syntax

       shutdown [ -d ] [ -F ] [ -h ] [ -i ] [ -k ] [ -l ] [ -m ] [ -p ] [ -r ] [ -t mmddHHMM [ yy ] ] [ -u ] [ -v ] [
       +Time [ Message ] ]

Description

       The shutdown command halts the operating system. Only a user with root user authority can run this command.
       During the default shutdown, users are notified (by a wall command) of the impending system shutdown with a
       message. However, shutdown is not complete until the user receives a shutdown completion message. Do not
       attempt to restart the system or turn off the system before the shutdown completion message is displayed;
       otherwise, file system damage can result.

            Note: The halt completed message is not displayed on the tty from which shutdown is invoked if it is
            connected to the system through a multiport adapter.

       As shutdown time approaches, warning messages are displayed on the terminals of all users on the system.

       After the specified number of seconds (60 by default), the system stops the accounting and error logging
       processes and writes an entry to the error log. The shutdown command 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 calls the halt command.

            Note: Users who have files open on the node that is running the shutdown command, but who are not logged
            in to that node, are not notified about the shutdown.

       If you request a complete halt to the operating system, the shutdown command stops all processes, unmounts all
       file systems, and calls the halt command.

       The system administrator can place local customized shutdown procedures in a shell script named
       /etc/rc.shutdown. This script runs at the beginning of the shutdown if it exists. If the script runs but fails
       with a non-zero return code, the shutdown stops.

            Attention: If you are bringing the system down to maintenance mode, you must run the shutdown command
            from the / (root) directory to ensure that it can cleanly unmount the file systems.

            Note: By default, if issued on models having a power supply capable of software control, the shutdown
            command powers down the system.

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
            possible. The +Time [ Message ] options are ignored if the -F flag is specified.
       -h
            Halts the operating system completely; same as the -v flag.

       -i
            Specifies interactive mode. Displays interactive messages to guide the user through the shutdown.
       -k
            Allows the administrator to broadcast the shutdown warning messages without causing the system to shut
            down. When the -k flag is used, no other shutdown activity occurs except for sending messages. For
            example, no processes are killed, no activity is logged in /etc/shutdown.log if the -l flag is specified,
            and if an /etc/rc.shutdown script exists it does not run.
       -l
            Creates/appends the /etc/shutdown.log file that contains information about the filesystems, daemons, user
            login, licensing services, network interfaces being brought down. The file may be used for diagnostic and
            debugging purposes in the event of shutdown failures.

            Note: Ensure that there is enough disk space for the shutdown command to log the entries while using this
            flag.

       -m
            Brings the system down to maintenance (single user) mode.
       -p
            Halts the system without a power down. This is used by uninterruptible power supply (UPS). This flag only
            applies to AIX(R) 4.2 or later.

            Note: The -p flag will have no effect if used in combination with flags not requiring a permanent halt.
            Power will still be turned off if other operands request a delayed power-on and reboot

       -r
            Restarts the system after being shutdown with the reboot command.
       -t mmddHHMM [ yy ]
            Shuts down the system immediately and then restarts the system on the date specified by mmddHHMM [ yy ]
            where
              mm
                   Specifies the month.
              dd
                   Specifies the day.
              HH
                   Specifies the hour.
              MM
                   Specifies the minute.
              yy
                   Specifies the year.
            The shutdown -t flag cannot be used with the -v or -h option.

            Note: This option is only supported on systems that have a power supply which automatically turns power
            off at shutdown and an alarm to allow reboot at a later time. Systems without this capability may hang or
            may reboot immediately after shutdown.

       -u
            This flag is used by diagnostics to update the flash-memory and reboot.
       -v
            Halts the operating system completely.

Parameters

       +Time
            Specifies the time at which the shutdown command stops the system. An immediate shutdown is indicated by
            the word now displayed on the screen. A future time can be specified in one of two formats: +number or
            hour:minute. The first form brings the system down in the specified number of minutes and the second
            brings the system down at the time of day indicated (as a 24-hour clock). If the Message parameter is
            specified, the Time parameter must also be specified.

       Message
            Specifies the message

Security

       Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged
       users can run privileged operations. For more information about authorizations and privileges, see Privileged
       Command Database in Security. For a list of privileges and the authorizations associated with this command,
       see the lssecattr command or the getcmdattr subcommand.

Examples
       1    To turn off the machine, enter:

            shutdown

            This shuts down the system, waiting 1 minute before stopping the user processes and the init process.
       2    To give users more time to finish what they are doing and bring the system to maintenance mode, enter:
            shutdown -m +2

            This brings the system down from multiuser mode to maintenance mode after waiting 2 minutes.

Files

       /usr/sbin/shutdown
            Contains the shutdown command.

Related Information

       The errpt command, init or telinit command, kill command, killall command, halt command, reboot command, and
       sync command.

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone