From owner-freebsd-arch@freebsd.org Wed Oct 19 11:10:47 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD295C18649 for ; Wed, 19 Oct 2016 11:10:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE80E01; Wed, 19 Oct 2016 11:10:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA29164; Wed, 19 Oct 2016 14:10:38 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1bwola-00027Z-OW; Wed, 19 Oct 2016 14:10:38 +0300 To: freebsd-arch@FreeBSD.org From: Andriy Gapon Subject: watchdog end-user interface Message-ID: Date: Wed, 19 Oct 2016 14:09:42 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 11:10:48 -0000 I know that there are people thinking about improving our watchdog infrastructure. Maybe it's time to discuss some ideas in public. I would like to start with discussing the end-user, or rather administrative, interface to the watchdog system. watchdogd always had -t timeout option. Not a too long time ago it has also grown a handful of new options: --softtimeout --softtimeout-action action --pretimeout timeout --pretimeout-action action I want to question if those options really belong to watchdogd. When a watchdog timer expires that results in a system-wide action (like a system reset). To me, that implies that there should be a single system-wide configuration point. And I am not sure that the daemon is the best choice for it. Personally I would prefer a sysctl interface for the following reasons: - easier to change the configuration - easier to query current values - easier to signal that a value getting set may be different from a requested value In my opinion, watchdogd should only be concerned with running a check action and patting the dog(s). And, by extension, WDIOCPATPAT should not re-configure the timeout, it should just reload the timers. -- Andriy Gapon