[NTLUG:Discuss] ntpdate -vs- cron

Kyle_Davenport@compusa.com Kyle_Davenport at compusa.com
Tue Oct 31 17:22:12 CST 2000


xntpd works only within a certain time difference (300-1000 seconds - depends),
but ntpdate will always set the time.  Since you cannot run ntpdate and xntpd at
the same time (they both bind to the same socket), you should run ntpdate on
startup, and xntpd thereafter (not in cron!).  The best place for clock -w or
hwclock is on shutdown (at least, my redhat does that).

did you check netstat or lsof to see if in fact something had bound the socket
on port 123?





"Egome" <egome at ticnet.com> on 10/27/2000 12:42:15 PM

Please respond to discuss at ntlug.org

To:   discuss at ntlug.org
cc:    (bcc: Kyle Davenport/Is/Corporate/CompUSA)
Subject:  Re: [NTLUG:Discuss] ntpdate -vs- cron



>  hmm.  Try embedding it in a script file and running it that way.  It may
>be some environment variables aren't getting set when run as a cron job.


ok...will try that.

>  BTW, I don't need microsecond accuracy, and run the following:
>rdate -s clock.psu.edu
>hwclock --systohc
>  once a day. that prevents me from tickling psu's clock too much (and
>being cut off), and sets the hardware accordingly so the next time I
>reboot, I'm still correct.


I don't have rdate on my system.

>Why not run xntp as a daemon and then cron just uses the date function
>which has been (roughly) synchronised via xntp?

I've tried to get xntp running...but it never actually updates the clock!
I've set
the date to an incorrect value (well set the time off by 15 minutes anyway)
and
even a day later, I STILL have the wrong time.

(snip)








More information about the Discuss mailing list