Wierd time changes
Mark Ovens
mark at ukug.uk.freebsd.org
Mon Mar 8 17:50:16 PST 2004
Lowell Gilbert wrote:
> Mark Ovens <mark at ukug.uk.freebsd.org> writes:
>
>> Where does FreeBSD store the corrupted time across reboots though and,
>> more importantly, why?
>
> Just to be clear; it doesn't sound like it's actually storing
> anything, right? The time it comes up with is roughly the same every
> time, regardless of what it was when the machine shut down?
>
The time it comes up with at the next boot (irrespective of how long
after the shutdown this is) is *exactly* the time it recorded (in
/var/log/messages) at the previous shutdown. Note that the system clock
doesn't get changed until after the reboot (as long as I reset it before
rebooting - if you see what I mean)
From the /var/log/messages fragment I originally posted (my comments in
[...]:
Feb 11 16:17:28 redshift reboot: rebooted by root
Feb 11 16:17:28 redshift syslogd: exiting on signal 15
[The above two lines show the correct date/time]
Feb 11 20:19:10 redshift syslogd: kernel boot file is /boot/kernel/kernel
[Where did 20:19:10 come from!!!!]
Feb 11 20:19:10 redshift kernel: boot() called on cpu#1
Feb 11 20:19:10 redshift kernel: Waiting (max 60 seconds) for system
process `vnlru' to stop...stopped
Feb 11 20:19:10 redshift kernel: Waiting (max 60 seconds) for system
process `bufdaemon' to stop...stopped
Feb 11 20:19:10 redshift kernel: Waiting (max 60 seconds) for system
process `syncer' to stop...stopped
Feb 11 20:19:10 redshift kernel:
Feb 11 20:19:10 redshift kernel: syncing disks, buffers remaining... 3 3
Feb 11 20:19:10 redshift kernel: done
[about an hour elapsed between the above shutdown and this reboot]
[note that the logged date/time is the same though implying that]
[FreeBSD has stored the (incorrect) previous shutdown time and is]
[now restoring it]
Feb 11 20:19:10 redshift kernel: Copyright (c) 1992-2004 The FreeBSD
Project.
Feb 11 20:19:10 redshift kernel: Copyright (c) 1979, 1980, 1983, 1986,
1988, 1989, 1991, 1992, 1993, 1994
Feb 11 20:19:10 redshift kernel: The Regents of the University of
California. All rights reserved.
Feb 11 20:19:10 redshift kernel: FreeBSD 5.2-RELEASE #10: Tue Jan 13
19:36:15 GMT 2004
Feb 11 20:19:10 redshift kernel: root at redshift:/usr/obj/usr/src/sys/REDSHIFT
........
Feb 11 20:19:10 redshift kernel: cd2 at ahc0 bus 0 target 5 lun 0
Feb 11 20:19:10 redshift kernel: cd2: <PIONEER DVD-ROM DVD-305 1.05>
Removable CD-ROM SCSI-2 device
Feb 11 20:19:10 redshift kernel: cd2: 5.000MB/s transfers (5.000MHz,
offset 16)
Feb 11 20:19:10 redshift kernel: cd2: Attempt to query device size
failed: NOT READY, Medium not present
Feb 11 20:19:10 redshift kernel: Mounting root from ufs:/dev/da1s1a
[still the same date/time]
Feb 11 20:19:28 redshift login: ROOT LOGIN (root) ON ttyv0
[now the clock has jumped by about the time it takes to boot]
The only thing that seems consistent is that it almost always sets the
hours to 20, although I have now seen it shift the time back four years
(since a previous post when I'd only seen that once).
Here's some output from the current boot (note kern.boottime):
You have mail.
redshift# sysctl -a > /tmp/sysctl.wrong
redshift# ntpdate ntp.nildram.co.uk
9 Mar 01:16:18 ntpdate[534]: step time server 195.112.4.14 offset
126230399.743969 sec
You have new mail.
redshift# sysctl -a > /tmp/sysctl.right
redshift# diff -u /tmp/sysctl.{wrong,right}
--- /tmp/sysctl.wrong Thu Mar 9 01:16:08 2000
+++ /tmp/sysctl.right Tue Mar 9 01:16:25 2004
@@ -16,7 +16,7 @@
kern.ngroups: 16
kern.job_control: 1
kern.saved_ids: 0
-kern.boottime: { sec = 952564475, usec = 323439 } Thu Mar 9 01:14:35 2000
+kern.boottime: { sec = 1078794875, usec = 67393 } Tue Mar 9 01:14:35 2004
Sorry if I'm being a bit vague but I'm really stumped so I don't really
know what info to post, except what I see. I am wondering if
utmp/wtmp/lastlog may have something to do with it since, AIUI, the
point at which the logged time changes during shutdown would be about
the time the reboot/shutdown gets logged in wtmp?
Let me know anything else you need to see.
Thanks for your time.
Regards,
Mark
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
> .
>
More information about the freebsd-questions
mailing list