chshut - Control the system shutdown actions

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest KVM guest

Use the chshut command to change the shutdown actions for specific shutdown triggers.

The shutdown triggers are:
  • halt
  • poff
  • reboot

The shutdown triggers restart and panic are handled by the dumpconf service script, see Using the Dump Tools on Red Hat® Enterprise Linux® 9.2, SC34-7751 for details.

Linux on IBM® Z performs shutdown actions according to sysfs attribute settings within the /sys/firmware directory structure. The chshut command sets a shutdown action for a shutdown trigger by changing the corresponding sysfs attribute setting.

chshut syntax


1  chshut
1  halt
1  poff
1  reboot
1  ipl
1  reipl
1  stop
1 +  vmcmd "<cp_command>"
Where:
halt
sets an action for the halt shutdown trigger.

Red Hat Enterprise Linux by default maps halt to poff. You can undo this mapping by editing the file /etc/sysconfig/shutdown and replacing HALT="auto" with HALT="halt".

Draft comment: MariaEisenhaendler
/etc/sysconfig/shutdown does not exist on my test system? Should we say to create this file if it isn't there?
poff
sets an action for the poff shutdown trigger.
reboot
sets an action for the reboot shutdown trigger.
ipl
sets IPL as the action to be taken.
reipl
sets re-IPL as the action to be taken.
stop
sets stop as the action to be taken.
vmcmd "<cp_command>"
sets the action to be taken to issuing a z/VM® CP command. The command must be specified in uppercase characters and enclosed in quotation marks. To issue multiple commands, repeat the vmcmd attribute with each command.
-h or --help
displays help information for the command. To view the man page, enter man chshut.
-v or --version
displays version information.

Examples

These examples illustrate common uses for chshut.

  • To make the system start again after a power off:
    # chshut poff ipl
  • To log off the z/VM guest virtual machine if the Linux poweroff command was run successfully:
    # chshut poff vmcmd LOGOFF
  • To send a message to z/VM user ID OPERATOR and automatically log off the z/VM guest virtual machine if the Linux poweroff command is run:
    # chshut poff vmcmd "MSG OPERATOR Going down" vmcmd "LOGOFF"