Hi Horace, > I am added "/usr/sbin/ntpdate stdtime.gov.hk" command to /etc/cron.hourly/ path > that let the crond to do the System time update for every hour. > > ->Does your system keep setting its time from the hardware clock etc.? > No. > > Could you tell me what info you want. > I have check the Hardware clock by using "hwclock", and the time is > monotonic increasing. But the /bin/date sometime will be decrease for 1-4 > seconds.
Ntp and ntpdate only set the system time, not the hardware clock. This means hwclock and date will not always produce the same time. To set the hardware clock to the current system time use hwclock --systohc. Red Hat systems do this automatically on shutdown I believe. If your system time is not correct it will be udpated every hour by ntpdate. This could explain the time shift. If you have a bad system clock (f.e. an old battery) after every boot your system time might shift a few seconds at the first cron job, but it shouldn't change too much after that. (In your case it looks like your hardware clock is actually running too fast, which would explain the backward shift of a few seconds. Again, this shift usually is only this big the first time the clock is updated.) Bye, Leonard. -- How clean is a war when you shoot around nukelar waste? Stop the use of depleted uranium ammo! End all weapons of mass destruction. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list