From owner-freebsd-questions@FreeBSD.ORG Sat Nov 8 22:55:55 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6294A0E for ; Sat, 8 Nov 2014 22:55:55 +0000 (UTC) Received: from www81.your-server.de (www81.your-server.de [213.133.104.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 957298F6 for ; Sat, 8 Nov 2014 22:55:54 +0000 (UTC) Received: from [77.23.74.131] (helo=michael-think.fritz.box) by www81.your-server.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1XnEvA-0005Tm-VW for freebsd-questions@freebsd.org; Sat, 08 Nov 2014 23:55:53 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: freebsd-questions@freebsd.org Subject: Re: Cron executing jobs at innacurate times (observing "jitter" of up to 1 hour) References: <545E98B1.7080004@bluerosetech.com> Date: Sat, 08 Nov 2014 23:55:44 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Michael Ross" Message-ID: In-Reply-To: <545E98B1.7080004@bluerosetech.com> User-Agent: Opera Mail/1.0 (Win32) X-Authenticated-Sender: gmx@ross.cx X-Virus-Scanned: Clear (ClamAV 0.98.4/19601/Sat Nov 8 18:39:13 2014) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2014 22:55:56 -0000 On Sat, 08 Nov 2014 23:26:57 +0100, Darren Pilgrim wrote: > I recently upgraded a pair of servers from 9.3 to 10.0 via > freebsd-update. After the upgrade, I noticed my logs were not rotating > on the hour, but at some random time within the hour following the > scheduled time (the logs in question were set * for size and $D0 or @T00 > for when in newsyslog.conf). > I remembered reading this bug, which is close to what you describe: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194236 In short: 10.0-RELEASE on i386 runs cron jobs at wrong time. Reported solved in 10.1, so maybe try this. Michael > Some testing revealed that cron is no longer executing tasks in > /etc/crontab on the specified time. For example, a job scheduled to run > hourly at the zeroth minute would actually execute sometime within an > hour, not on the hour as it used to. > > I created a simple test to see this behaviour. I have six servers: > > - catnip (amd64 9.3-p3, freebsd-update only) > - chombo (amd64 9.1-P6, source updates only) > - pug (amd64 10.0-p10, freebsd-update only) > - poodle (amd64 10.0-p10, freebsd-update only) > - luigi (i386 10.0-p10, freebsd-update only, Xen VPS) > - mario (i386 10.0-p10, freebsd-update only, Xen VPS) > > The behaviour test: > > All six have a job in /etc/crontab as follows: > > * * * * * root date >>/var/log/test/0000 2>&1 > > That is, log the output of date every minute. > > For catnip, chombo, pug, and poodle, the logs from 13:50 to 14:05 PST > today look like this: > > Sat Nov 8 13:50:00 PST 2014 > Sat Nov 8 13:51:00 PST 2014 > Sat Nov 8 13:52:00 PST 2014 > Sat Nov 8 13:53:00 PST 2014 > Sat Nov 8 13:54:00 PST 2014 > Sat Nov 8 13:55:00 PST 2014 > Sat Nov 8 13:56:00 PST 2014 > Sat Nov 8 13:57:00 PST 2014 > Sat Nov 8 13:58:00 PST 2014 > Sat Nov 8 13:59:00 PST 2014 > Sat Nov 8 14:00:00 PST 2014 > Sat Nov 8 14:01:00 PST 2014 > Sat Nov 8 14:02:00 PST 2014 > Sat Nov 8 14:03:00 PST 2014 > Sat Nov 8 14:04:00 PST 2014 > Sat Nov 8 14:05:00 PST 2014 > > This is luigi's: > > Sat Nov 8 21:51:00 UTC 2014 > Sat Nov 8 21:51:55 UTC 2014 > Sat Nov 8 21:53:47 UTC 2014 > Sat Nov 8 21:54:38 UTC 2014 > Sat Nov 8 21:54:59 UTC 2014 > Sat Nov 8 21:56:34 UTC 2014 > Sat Nov 8 21:57:34 UTC 2014 > Sat Nov 8 21:58:29 UTC 2014 > Sat Nov 8 22:00:38 UTC 2014 > Sat Nov 8 22:00:59 UTC 2014 > Sat Nov 8 22:02:47 UTC 2014 > Sat Nov 8 22:03:38 UTC 2014 > Sat Nov 8 22:04:34 UTC 2014 > > And this is mario's: > > Sat Nov 8 21:50:34 UTC 2014 > Sat Nov 8 21:51:29 UTC 2014 > Sat Nov 8 21:53:34 UTC 2014 > Sat Nov 8 21:54:29 UTC 2014 > Sat Nov 8 21:56:34 UTC 2014 > Sat Nov 8 21:57:34 UTC 2014 > Sat Nov 8 21:58:25 UTC 2014 > Sat Nov 8 21:59:55 UTC 2014 > Sat Nov 8 22:01:51 UTC 2014 > Sat Nov 8 22:02:12 UTC 2014 > Sat Nov 8 22:03:12 UTC 2014 > Sat Nov 8 22:05:00 UTC 2014 > > Backing off the frequency to every 5 minutes see the variance increase > to a couple of minutes. For the production jobs running hourly, > variance is 0 to 59 minutes late. This is particularly problematic for > things like newsyslog. All machines have ntpd running and synchronized. > All of the machines except luigi run cron with the defaults. For > luigi, the following is in /etc/rc.conf: > > cron_dst="NO" > cron_flags="-J 1 -o" > > My HV provider hasn't heard of anything causing this. Before I go > reloading things back to 9.3, has anyone observed this? > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"