From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6c37aa960563b3fd6c70cfa2788d1339@plan9.bell-labs.com> From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] cron and timesync In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-kdnvmfbxzlkfnsmenadmoqdsmq" Date: Thu, 17 Jul 2003 16:57:39 -0400 Topicbox-Message-UUID: faaa6404-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-kdnvmfbxzlkfnsmenadmoqdsmq Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I changed timesync to not background until it's tried at least once to sync up. That means you'll be within 10 seconds of real time when it returns if it managed to find a time source; timesync just sets the time if off by more than 10 seconds and tries to sneak up on the correct time otherwise. I could wait for time to get within the accuracy limit, but that could take a while. 10 seconds should be good enough for the reported problem. --upas-kdnvmfbxzlkfnsmenadmoqdsmq Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Thu Jul 17 16:22:27 EDT 2003 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Thu Jul 17 16:22:25 EDT 2003 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id BDBFD19B9E; Thu, 17 Jul 2003 16:22:16 -0400 (EDT) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id D553319B13; Thu, 17 Jul 2003 16:22:12 -0400 (EDT) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 02C0319B12; Thu, 17 Jul 2003 16:21:40 -0400 (EDT) Received: from collyer.net (collyer.net [63.192.14.226]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id F201E19AD2 for <9fans@cse.psu.edu>; Thu, 17 Jul 2003 16:21:37 -0400 (EDT) Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] cron and timesync From: Geoff Collyer In-Reply-To: <200307171947.h6HJll719842@augusta.math.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 17 Jul 2003 13:21:34 -0700 X-Spam-Status: No, hits=-0.5 required=5.0 tests=IN_REP_TO version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) I invoke this function early in cpurc: fn timesync { aux/timesync -nl -d /sys/log/timesync.d -a 100000 $* # the alpha port currently has no #r if (test -e '#r/rtc') @ { sleep 600 # let ntp do its thing awk '{print $1}' /dev/time >'#r/rtc' # fix the hardware clock } & } I don't start cron until I've started venti and fossil, and that takes long enough that timesync should have reset /dev/time by then. --upas-kdnvmfbxzlkfnsmenadmoqdsmq--