Watchdog kernel parameters

6.14 LPAR mode z/VM guest KVM guest

If the watchdog device driver has been compiled into the kernel, you configure the device driver though kernel parameters.

watchdog kernel parameter syntax

Read syntax diagramSkip visual syntax diagramdiag288_wdt.cmd="SYSTEM RESTART"diag288_wdt.cmd= <command>diag288_wdt.conceal=1 diag288_wdt.nowayout= <nowayout_flag>1
Notes:
  • 1 diag288_wdt.cmd= and diag288_wdt.conceal= apply only to Linux® on z/VM® and are ignored for Linux in LPAR mode and Linux on KVM.
where:
<command>
configures the shutdown action to be taken if Linux on z/VM fails.

The default, SYSTEM RESTART, configures the shutdown action that is specified for the restart shutdown trigger.

Any other specification dissociates the timeout action from the restart shutdown trigger. Instead, the specification is issued by CP and must adhere to these rules:
  • It must be a single valid CP command
  • It must not exceed 230 characters
  • It must be enclosed by quotation marks if it contains any blanks or newline characters

The specification is converted from ASCII to uppercase EBCDIC.

For details about CP commands, see z/VM: CP Commands and Utilities Reference, SC24-6268.

On an running instance of Linux on z/VM, you can write to /sys/module/diag288_wdt/parameters/cmd to replace the command you specify when loading the module. Through this sysfs interface, you can also specify multiple commands to be issued, see the examples for more details.

The preferred method for configuring a timeout action other than a system restart is to configure a different shutdown action for the restart shutdown trigger.

diag288_wdt.conceal=1
enables the protected application environment where the guest is protected from unexpectedly entering CP READ. Do not enable the protected environment for guests with multiprocessor configurations. The protected application facility supports only virtual uniprocessor systems.

For details, see the SET CONCEAL section of z/VM: CP Commands and Utilities Reference, SC24-6268.

<nowayout_flag>
determines what happens when the watchdog device node is closed by the watchdog application.

If the flag is set to 1, the watchdog timer keeps running and triggers an action if no positive status report is received within the specified time interval. If the character "V" is written to the device and the flag is set to 0, the watchdog timer is stopped and the Linux instance continues without the watchdog support.

The default is determined by the common code kernel configuration option CONFIG_WATCHDOG_NOWAYOUT.

Example for Linux on z/VM

The following kernel parameters determine that, on failure, the Linux instance is to be IPLed from a device with devno 0xb1a0. The protected application environment is not enabled. The watchdog application can close the watchdog device node after writing "V" to it. As a result the watchdog timer becomes ineffective and does not IPL the guest.

diag288_wdt.cmd="ipl b1a0" diag288_wdt.nowayout=0
The following example shows how to specify multiple commands to be issued. This example applies to both the built-in and module version, after booting the kernel or loading the module.
# /bin/echo -en "MSG * WATCHDOG FIRED\nVMDUMP\nIPL" > /sys/module/diag288_wdt/parameters/cmd

Use the echo version at /bin/echo. The built-in echo command from bash might not process the newline characters as intended.

To verify that your commands have been accepted, issue:
# cat /sys/module/diag288_wdt/parameters/cmd
MSG * WATCHDOG FIRED
VMDUMP
IPL
Note: You cannot specify multiple commands as kernel parameters during boot time or module parameters while loading the module.