[PLUG] Future Time Stamp: Clocks FUBAR

Rich Shepard rshepard at appl-ecosys.com
Sat Jan 17 06:23:38 PST 2015


On Fri, 16 Jan 2015, Jim Garrison wrote:

> One thing to be aware of is that in Linux, the HW clock runs independently
> of the SW clock. The idea is that you are using a good time synch tool
> (like NTPD) which constantly updates the SW clock frequency keeping it in
> sync with the time server. This makes the SW clock a MUCH better time
> source than the HW clock of a typical PC since after settling down it will
> rarely drift more than a few milliseconds before being resynchronized.

Jim,

   Yes. Went off the tracks and lost sight of the destination. The real
problem is why the timestamp of the files in a newly created tarball is 12
hours ahead of the system time. That's never before happened and my Web
searches found nothing enlightening.

   However, it turns out there's no longer an issue. I had been trying to
upgrade sqlite from -3.0.7.4 (which was an upgrade from a much earlier
version) to -3.0.8.0. Just now I ran slackpkg to install patched packages
and there was sqlite-3.7.17, a version I did not see on the sqlite Web site.
So, that's now the currently installed version and I'll not spend more time
with the lower version.

> The only way the two ever sync during normal operation (i.e. not in the
> context of a shutdown or bootup) is via the hwclock(8) command. So, unless
> you intervene manually the SW clock should not jump around between
> reboots, regardless of what the HW clock does. That's sort of a
> fundamental assumption in the kernel -- time is smooth.

   And, futzing with hwclock (other than reading it with the -r option) can
really bork the system. Lesson learned! I rebooted, then had to manually
umount each partition and run e2fsck -v -y on them before remounting. The
two that could not be done (/usr and /var) were fixed on the second reboot
when the process ran rsck on them.

> Let's say something similar happened to you.  Your system wakes up and
> sets the (wrong) time from HW clock,

   System's on all the time.

Thanks for the extensive explanation,

Rich



More information about the PLUG mailing list