From patchwork Thu Apr 11 18:20:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leigh Brown X-Patchwork-Id: 13626513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86D2EC4345F for ; Thu, 11 Apr 2024 18:20:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.704121.1100301 (Exim 4.92) (envelope-from ) id 1ruz2O-0005DF-0L; Thu, 11 Apr 2024 18:20:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 704121.1100301; Thu, 11 Apr 2024 18:20:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2N-0005D5-Sq; Thu, 11 Apr 2024 18:20:39 +0000 Received: by outflank-mailman (input) for mailman id 704121; Thu, 11 Apr 2024 18:20:38 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2M-0004xS-6g for xen-devel@lists.xenproject.org; Thu, 11 Apr 2024 18:20:38 +0000 Received: from doppler.solinno.uk (doppler.solinno.uk [81.2.106.178]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 30d7a3fa-f830-11ee-94a3-07e782e9044d; Thu, 11 Apr 2024 20:20:35 +0200 (CEST) Received: from folly.solinno.co.uk (folly.dyn.solinno.co.uk [192.168.2.135]) by doppler.solinno.uk (Postfix) with ESMTPSA id 8985380069; Thu, 11 Apr 2024 19:20:35 +0100 (BST) Received: by folly.solinno.co.uk (Postfix, from userid 1000) id 628442017C; Thu, 11 Apr 2024 19:20:35 +0100 (BST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 30d7a3fa-f830-11ee-94a3-07e782e9044d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=solinno.co.uk; s=mail; t=1712859635; bh=IQc0cKekmnq3tFF/KmZyaqRrn+6b97CWdWbbmSJl6c4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=coDTFJrr80EHmyAa5R1oP5glhlZM4LPiCCgBkNUO5llAcIiSgzlW25CIMCfJ4yZHa B2Gzp8aoq6J9LV8GI7d1ctoIeULHmDAfXqxOZ30OAba/+A//YJyfpMroNvVZpLm0mv t9Fc6nWOjejmKefaC78fjOGNwC2d7sRRqo0hoMw0= From: leigh@solinno.co.uk To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, anthony.perard@citrix.com, slack@rabbit.lu, Leigh Brown Subject: [PATCH v3 1/4] tools/misc: xenwatchdogd: add parse_secs() Date: Thu, 11 Apr 2024 19:20:20 +0100 Message-Id: <20240411182023.56309-2-leigh@solinno.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240411182023.56309-1-leigh@solinno.co.uk> References: <20240411182023.56309-1-leigh@solinno.co.uk> MIME-Version: 1.0 From: Leigh Brown Create a new parse_secs() function to parse the timeout and sleep parameters. This ensures that non-numeric parameters are not accidentally treated as numbers. Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD --- tools/misc/xenwatchdogd.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c index 112b706357..9fa772e49f 100644 --- a/tools/misc/xenwatchdogd.c +++ b/tools/misc/xenwatchdogd.c @@ -49,6 +49,18 @@ static void catch_usr1(int sig) done = true; } +static int parse_secs(const char *arg, const char *what) +{ + char *endptr; + unsigned long val; + + val = strtoul(arg, &endptr, 0); + if (val > INT_MAX || *endptr) + errx(EXIT_FAILURE, "invalid %s: '%s'", what, arg); + + return val; +} + int main(int argc, char **argv) { int id; @@ -64,16 +76,11 @@ int main(int argc, char **argv) if (h == NULL) err(EXIT_FAILURE, "xc_interface_open"); - t = strtoul(argv[1], NULL, 0); - if (t == ULONG_MAX) - err(EXIT_FAILURE, "strtoul"); + t = parse_secs(argv[1], "timeout"); s = t / 2; - if (argc == 3) { - s = strtoul(argv[2], NULL, 0); - if (s == ULONG_MAX) - err(EXIT_FAILURE, "strtoul"); - } + if (argc == 3) + s = parse_secs(argv[2], "sleep"); if (signal(SIGHUP, &catch_exit) == SIG_ERR) err(EXIT_FAILURE, "signal"); From patchwork Thu Apr 11 18:20:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leigh Brown X-Patchwork-Id: 13626514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A819AC04FF6 for ; Thu, 11 Apr 2024 18:20:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.704122.1100305 (Exim 4.92) (envelope-from ) id 1ruz2O-0005FC-8W; Thu, 11 Apr 2024 18:20:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 704122.1100305; Thu, 11 Apr 2024 18:20:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2O-0005EP-3g; Thu, 11 Apr 2024 18:20:40 +0000 Received: by outflank-mailman (input) for mailman id 704122; Thu, 11 Apr 2024 18:20:38 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2M-0004xS-T3 for xen-devel@lists.xenproject.org; Thu, 11 Apr 2024 18:20:38 +0000 Received: from doppler.solinno.uk (doppler.solinno.uk [81.2.106.178]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3125b4a6-f830-11ee-94a3-07e782e9044d; Thu, 11 Apr 2024 20:20:36 +0200 (CEST) Received: from folly.solinno.co.uk (folly.dyn.solinno.co.uk [192.168.2.135]) by doppler.solinno.uk (Postfix) with ESMTPSA id 0F4148009E; Thu, 11 Apr 2024 19:20:36 +0100 (BST) Received: by folly.solinno.co.uk (Postfix, from userid 1000) id E0E532017C; Thu, 11 Apr 2024 19:20:35 +0100 (BST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3125b4a6-f830-11ee-94a3-07e782e9044d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=solinno.co.uk; s=mail; t=1712859636; bh=8p8Mh+h+4ZcsbqVep9j9UGhI85GMf2VA/SFHLl4d/EU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v20Ag00Yj6c+gU5eTxB+dTs/8WOYx0XvULdeB8G4ueMIDqFjLrNFaOzN6lL0eqjdV KNwyyoPKAYvz71Uzg/AMMqEwE2vrrru5KeO3t/LC+ypUeY7Wp6l//3p7yo8Hlpb6Zm i8Dkak9LKW0AE4sT9PjcdoX6PCOfyq3l0zI4CPDk= From: leigh@solinno.co.uk To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, anthony.perard@citrix.com, slack@rabbit.lu, Leigh Brown Subject: [PATCH v3 2/4] tools/misc: xenwatchdogd enhancements Date: Thu, 11 Apr 2024 19:20:21 +0100 Message-Id: <20240411182023.56309-3-leigh@solinno.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240411182023.56309-1-leigh@solinno.co.uk> References: <20240411182023.56309-1-leigh@solinno.co.uk> MIME-Version: 1.0 From: Leigh Brown Add usage() function, the ability to run in the foreground, and the ability to disarm the watchdog timer when exiting. Add enhanced parameter parsing and validation, making use of getopt_long(). Check the number of parameters are correct, the timeout is at least two seconds (to allow a minimum sleep time of one second), and that the sleep time is at least one and less than the watchdog timeout. With these changes, the daemon will no longer instantly reboot the domain if you enter a zero timeout (or non-numeric parameter), and prevent the daemon consuming 100% of a CPU due to zero sleep time. Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD --- tools/misc/xenwatchdogd.c | 94 ++++++++++++++++++++++++++++++++++----- 1 file changed, 84 insertions(+), 10 deletions(-) diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c index 9fa772e49f..a16d1efc13 100644 --- a/tools/misc/xenwatchdogd.c +++ b/tools/misc/xenwatchdogd.c @@ -10,6 +10,11 @@ #include #include #include +#include + +#define WDOG_MIN_TIMEOUT 2 +#define WDOG_MIN_SLEEP 1 +#define WDOG_EXIT_TIMEOUT 300 static xc_interface *h; static volatile bool safeexit = false; @@ -49,6 +54,26 @@ static void catch_usr1(int sig) done = true; } +static void __attribute__((noreturn)) usage(int exit_code) +{ + FILE *out = exit_code ? stderr : stdout; + + fprintf(out, + "Usage: xenwatchdog [OPTION]... []\n" + " -h, --help\t\tDisplay this help text and exit.\n" + " -F, --foreground\tRun in foreground.\n" + " -x, --safe-exit\tDisable watchdog on orderly exit.\n" + "\t\t\tNote: default is to set a %d second timeout on exit.\n\n" + " timeout\t\tInteger seconds to arm the watchdog each time.\n" + "\t\t\tNote: minimum timeout is %d seconds.\n\n" + " sleep\t\t\tInteger seconds to sleep between arming the watchdog.\n" + "\t\t\tNote: sleep must be at least %d and less than timeout.\n" + "\t\t\tIf not specified then set to half the timeout.\n", + WDOG_EXIT_TIMEOUT, WDOG_MIN_TIMEOUT, WDOG_MIN_SLEEP + ); + exit(exit_code); +} + static int parse_secs(const char *arg, const char *what) { char *endptr; @@ -66,22 +91,71 @@ int main(int argc, char **argv) int id; int t, s; int ret; + bool daemon = true; + + for ( ;; ) + { + int option_index = 0, c; + static const struct option long_options[] = + { + { "help", no_argument, NULL, 'h' }, + { "foreground", no_argument, NULL, 'F' }, + { "safe-exit", no_argument, NULL, 'x' }, + { NULL, 0, NULL, 0 }, + }; + + c = getopt_long(argc, argv, "hFxD", long_options, &option_index); + if (c == -1) + break; + + switch (c) + { + case 'h': + usage(EXIT_SUCCESS); + + case 'F': + daemon = false; + break; + + case 'x': + safeexit = true; + break; + + default: + usage(EXIT_FAILURE); + } + } - if (argc < 2) - errx(EXIT_FAILURE, "usage: %s ", argv[0]); + if (argc - optind < 1) + errx(EXIT_FAILURE, "timeout must be specified"); + + if (argc - optind > 2) + errx(EXIT_FAILURE, "too many arguments"); + + t = parse_secs(argv[optind], "timeout"); + if (t < WDOG_MIN_TIMEOUT) + errx(EXIT_FAILURE, "Error: timeout must be at least %d seconds", + WDOG_MIN_TIMEOUT); + + ++optind; + if (optind < argc) { + s = parse_secs(argv[optind], "sleep"); + if (s < WDOG_MIN_SLEEP) + errx(EXIT_FAILURE, "Error: sleep must be no less than %d", + WDOG_MIN_SLEEP); + if (s >= t) + errx(EXIT_FAILURE, "Error: sleep must be less than timeout"); + } + else + s = t / 2; - daemonize(); + if (daemon) + daemonize(); h = xc_interface_open(NULL, NULL, 0); if (h == NULL) err(EXIT_FAILURE, "xc_interface_open"); - t = parse_secs(argv[1], "timeout"); - - s = t / 2; - if (argc == 3) - s = parse_secs(argv[2], "sleep"); - if (signal(SIGHUP, &catch_exit) == SIG_ERR) err(EXIT_FAILURE, "signal"); if (signal(SIGINT, &catch_exit) == SIG_ERR) @@ -105,6 +179,6 @@ int main(int argc, char **argv) } // Zero seconds timeout will disarm the watchdog timer - xc_watchdog(h, id, safeexit ? 0 : 300); + xc_watchdog(h, id, safeexit ? 0 : WDOG_EXIT_TIMEOUT); return 0; } From patchwork Thu Apr 11 18:20:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leigh Brown X-Patchwork-Id: 13626512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22AA3C04FF0 for ; Thu, 11 Apr 2024 18:20:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.704120.1100291 (Exim 4.92) (envelope-from ) id 1ruz2M-0004xn-PP; Thu, 11 Apr 2024 18:20:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 704120.1100291; Thu, 11 Apr 2024 18:20:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2M-0004xe-Mf; Thu, 11 Apr 2024 18:20:38 +0000 Received: by outflank-mailman (input) for mailman id 704120; Thu, 11 Apr 2024 18:20:37 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2L-0004iO-D4 for xen-devel@lists.xenproject.org; Thu, 11 Apr 2024 18:20:37 +0000 Received: from doppler.solinno.uk (doppler.solinno.uk [81.2.106.178]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 317080e7-f830-11ee-b908-491648fe20b8; Thu, 11 Apr 2024 20:20:36 +0200 (CEST) Received: from folly.solinno.co.uk (folly.dyn.solinno.co.uk [192.168.2.135]) by doppler.solinno.uk (Postfix) with ESMTPSA id 84A458009F; Thu, 11 Apr 2024 19:20:36 +0100 (BST) Received: by folly.solinno.co.uk (Postfix, from userid 1000) id 61B7D2017C; Thu, 11 Apr 2024 19:20:36 +0100 (BST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 317080e7-f830-11ee-b908-491648fe20b8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=solinno.co.uk; s=mail; t=1712859636; bh=TQCyOQsmoNABjx0+Ku+ZmhWfhTJA+iLoY6x/lfQL2DM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0g0vFXlmNGfjpysAChqtnhKbK6v/fMMQC64t35xhu/FaB+6pCro2HsRiMW2NQv7S9 5UyABXkSej5HZ5EOpzW7PBqZb0MhTXv5wOwuYc9WMyb20Epl87/WToJsyD/RP1jQWO I1S+Ld8JPFut0C5z1fCpzbHLQA3scMSIq2ozpuOU= From: leigh@solinno.co.uk To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, anthony.perard@citrix.com, slack@rabbit.lu, Leigh Brown Subject: [PATCH v3 3/4] tools/misc: Add xenwatchdogd.c copyright notice Date: Thu, 11 Apr 2024 19:20:22 +0100 Message-Id: <20240411182023.56309-4-leigh@solinno.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240411182023.56309-1-leigh@solinno.co.uk> References: <20240411182023.56309-1-leigh@solinno.co.uk> MIME-Version: 1.0 From: Leigh Brown Add copyright notice and description of the program. Signed-off-by: Leigh Brown Acked-by: Anthony PERARD --- tools/misc/xenwatchdogd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c index a16d1efc13..2884ca6ca9 100644 --- a/tools/misc/xenwatchdogd.c +++ b/tools/misc/xenwatchdogd.c @@ -1,3 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * xenwatchdogd.c + * + * Watchdog based on Xen hypercall watchdog interface. + * + * Copyright 2010 Citrix Ltd + * Copyright 2024 Leigh Brown + * + */ #include #include From patchwork Thu Apr 11 18:20:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leigh Brown X-Patchwork-Id: 13626515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3168C001CC for ; Thu, 11 Apr 2024 18:20:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.704123.1100313 (Exim 4.92) (envelope-from ) id 1ruz2O-0005NE-Pc; Thu, 11 Apr 2024 18:20:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 704123.1100313; Thu, 11 Apr 2024 18:20:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2O-0005Lr-GI; Thu, 11 Apr 2024 18:20:40 +0000 Received: by outflank-mailman (input) for mailman id 704123; Thu, 11 Apr 2024 18:20:40 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ruz2N-0004xS-TJ for xen-devel@lists.xenproject.org; Thu, 11 Apr 2024 18:20:39 +0000 Received: from doppler.solinno.uk (doppler.solinno.uk [81.2.106.178]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 31d25aa9-f830-11ee-94a3-07e782e9044d; Thu, 11 Apr 2024 20:20:37 +0200 (CEST) Received: from folly.solinno.co.uk (folly.dyn.solinno.co.uk [192.168.2.135]) by doppler.solinno.uk (Postfix) with ESMTPSA id 32CC6800AC; Thu, 11 Apr 2024 19:20:37 +0100 (BST) Received: by folly.solinno.co.uk (Postfix, from userid 1000) id 0CE7B2017C; Thu, 11 Apr 2024 19:20:37 +0100 (BST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 31d25aa9-f830-11ee-94a3-07e782e9044d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=solinno.co.uk; s=mail; t=1712859637; bh=YwGv2PhPp4Evj73ZY3lHmUchew8hvcOMY1tjrOsWuo8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jyK+6dO6x07zzohtd7D+p7nxPLtdOzqIerpifvQGmAwcDx40I3xLG/VGQD9reAVH+ zoKDfCFwo/Ddp+WuY1g5MOYRqcP5rxC9a6HeLv+9V53Bqc0zpNzFYWu3hLyO95jkRM FBeYwGmSn49U4U3w9RWJhI5MT0pRty+vq0aBtZy0= From: leigh@solinno.co.uk To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, anthony.perard@citrix.com, slack@rabbit.lu, Leigh Brown Subject: [PATCH v3 4/4] docs/man: Add xenwatchdog manual page Date: Thu, 11 Apr 2024 19:20:23 +0100 Message-Id: <20240411182023.56309-5-leigh@solinno.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240411182023.56309-1-leigh@solinno.co.uk> References: <20240411182023.56309-1-leigh@solinno.co.uk> MIME-Version: 1.0 From: Leigh Brown Add a manual page for xenwatchdogd. Signed-off-by: Leigh Brown Reviewed-by: Anthony PERARD --- docs/man/xenwatchdogd.8.pod | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/man/xenwatchdogd.8.pod diff --git a/docs/man/xenwatchdogd.8.pod b/docs/man/xenwatchdogd.8.pod new file mode 100644 index 0000000000..b03ed53ee6 --- /dev/null +++ b/docs/man/xenwatchdogd.8.pod @@ -0,0 +1,55 @@ +=head1 NAME + +xenwatchdogd - Xen hypercall based watchdog daemon + +=head1 SYNOPSIS + +B [ I ] > [ > ] + +=head1 DESCRIPTION + +B arms the Xen watchdog timer to I every I +seconds. If the xenwatchdogd process dies or is delayed for more than +I seconds, then Xen will take the B action +specified in the domain configuration (see xl.cfg(5)). If B +is running in dom0, the whole system will reboot. + +=head1 OPTIONS + +=over 4 + +=item B<-h>, B<--help> + +Display a help message. + +=item B<-F>, B<--foreground> + +Run in the foreground. The default behaviour is to daemonize. + +=item B<-x>, B<--safe-exit> + +Disable watchdog on orderly exit. The default behaviour is to arm the +watchdog to 300 seconds to allow time for the domain to shutdown. See +also the B section. + +=item B + +The number of seconds to arm the Xen watchdog timer. This must be set to +a minimum of two. + +=item B + +The number of seconds to sleep in between calls to arm the Xen watchdog +timer. This must be at least one second, and less than the I +value. If not specified, it defaults to half the I value. + +=back + +=head1 SIGNALS + +B Will cause the program to disarm the watchdog timer and exit, +regardless of whether the B<--safe-exit> option was passed. + +=head1 AUTHOR + +Citrix Ltd and other contributors.