[CentOS] hwclock problem
rkampen at kampensonline.com
Thu Nov 11 20:28:38 EST 2010
Jobst Schmalenbach wrote:
> I run peridocally (from cron) on all of my machines
> 30 * * * * root /sbin/hwclock --systohc
> All of those machines in question take their time via NTP
> from the same local server, and that server gets its time
> from a ntp pool.
> Now I had to reboot a couple of them two days ago and to my surprise
> all had problems with the time upon booting.
> Here are the important files:
> [root at XXXXXX ~] #>l /etc/adjtime
> 0.001687 1289518202 0.000000
> [root at XXXXXXX ~] #>l /etc/sysconfig/clock
> So from my understanding the hwclock should contain the local time.
> [root at XXXXXX ~] #>date
> Fri Nov 12 11:26:23 EST 2010
> [root at XXXXXX ~] #>hwclock
> Fri 12 Nov 2010 11:26:42 EST -0.167976 seconds
> [root at XXXXXX ~] #>
> However on boot I get the following:
> Nov 10 19:08:37 XXXXXX syslogd 1.4.1: restart.
> Nov 10 19:08:37 XXXXXX kernel: klogd 1.4.1, log source = /proc/kmsg started.
> Nov 10 19:08:37 XXXXXX kernel: Linux version 2.6.18-164.11.1.el5 (mockbuild at builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.
> 1.2-46)) #1 SMP Wed Jan 20 07:32:21 EST 2010
> Nov 10 19:08:37 XXXXXX kernel: Command line: ro root=/dev/sda2 vga=791
> Nov 10 19:08:37 XXXXXX kernel: BIOS-provided physical RAM map:
> Nov 10 19:08:51 XXXXXX kernel: IPv6 over IPv4 tunneling driver
> Nov 10 08:08:52 XXXXXX ntpdate: step time server 192.168.1.1 offset -39599.950905 sec
> Nov 10 08:08:52 XXXXXX xinetd: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
> and off course dovecot falls over too "Time just moved backwards by 39599 seconds."
> Now, 39600s is 11 hours, which is (inc DST) *MY* offset from Greenwich.
> So what am I doing wrong?
> The idea of running hwclock is to make sure that exactly the problem with dovecot does NOT occur, and ntp does not have a coughing fit when the hardware clock is not close to the correct time upon booting.
> The last time I booted some of those machine was more than 200 days ago, so the hwclock will be skewed if I do not update it.
Last time I checked the shut down of a machine writes the system time to
the H/W prior to reboot. Thus the problem you describe should not occur
if proper shutdown occurs. HTH
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 278 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos/attachments/20101111/08f618a3/attachment.vcf
More information about the CentOS