From owner-freebsd-arch@freebsd.org Wed Oct 19 21:32:30 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 55FA3C196DB for ; Wed, 19 Oct 2016 21:32:30 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 498B71E1; Wed, 19 Oct 2016 21:32:30 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from AlfredMacbookAir.local (104-244-24-105.PUBLIC.monkeybrains.net [104.244.24.105]) by elvis.mu.org (Postfix) with ESMTPSA id 0B738346DE24; Wed, 19 Oct 2016 14:32:30 -0700 (PDT) Subject: Re: watchdog end-user interface To: Andriy Gapon , freebsd-arch@FreeBSD.org References: From: Alfred Perlstein Organization: FreeBSD Message-ID: <7a74df08-b5d9-5629-b71e-b577d8876e5d@freebsd.org> Date: Wed, 19 Oct 2016 14:32:29 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed 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 21:32:30 -0000 On 10/19/16 4:09 AM, Andriy Gapon wrote: > 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. > Please look at the Linux interface for watchdogs, it is pretty good and could/should be ported to us. -Alfred