From owner-freebsd-hackers@freebsd.org Wed Sep 23 09:05:36 2015 Return-Path: Delivered-To: freebsd-hackers@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 CF9DDA05ACC for ; Wed, 23 Sep 2015 09:05:36 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id BC66F1A98 for ; Wed, 23 Sep 2015 09:05:36 +0000 (UTC) (envelope-from phk@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B934EA05ACB; Wed, 23 Sep 2015 09:05:36 +0000 (UTC) Delivered-To: hackers@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 B8C97A05AC9 for ; Wed, 23 Sep 2015 09:05:36 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 855E01A97 for ; Wed, 23 Sep 2015 09:05:36 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id E4E774F86D for ; Wed, 23 Sep 2015 09:05:28 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTP id t8N95RHq039338 for ; Wed, 23 Sep 2015 09:05:28 GMT (envelope-from phk@freebsd.org) To: hackers@freebsd.org Subject: What IS the right NTP behaviour ? From: Poul-Henning Kamp MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <39336.1442999127.1@critter.freebsd.dk> Date: Wed, 23 Sep 2015 09:05:27 +0000 Message-ID: <39337.1442999127@critter.freebsd.dk> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 09:05:36 -0000 As you probably know I'm working on a new NTP client called Ntimed. It is no surprise that people have different expectations of how timekeeping should behave, and I'm trying to figure out what Do What I Want is. I think I have identified three variations of "DWIW", which I have named "eCommerce", "SCADA" and "Workstation" Please let me know (private email to keep list noise down) if your needs would not be served by any of these three variations or for that matter any other comment or input on this topic. Thanks Poul-Henning eCommerce --------- Correct system time is mandatory. Bootup fails if correct time cannot established. What do we mean by "fails" ? Does it hang until success ? Does it fail into single-user ? Does it raise a big red flag ? Stepping time after bootup is *never* allowed. If time drifts out of tolerance: Raise Alarm How ? Signal init(8) into single-user mode ? Slew clock, no matter how far. Syslog periodically how wrong system time is SCADA ----- We don't need the system clock to be on time, as long as we know exactly how wrong it is. Startup should be as quick and reliable as possible. Configurable timer for how long we hold up startup. Startup step only allowed during this time interval. Stepping time after bootup is never allowed. If time drifts out of tolerance: Slew clock, no matter how far. Syslog periodically how wrong system time is Raise Alarm (optional) How ? Workstation ----------- Startup should be fast-ish Steps are allowed any time necessary suspend/resume change in network topology clock drift -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.