Date: Thu, 9 Nov 2000 09:27:21 -0800
From: Michael Perry
On Thu, Nov 09, 2000 at 08:27:48AM +0100, Koos Pol wrote:
On Wed, 8 Nov 2000 22:54:08 -0800, Michael Perry wrote:
| I have a debian box which talks ntpd to a timeserver at clock.via.net. I | then use ntpdate to talk with my box which talks with the timeserver. I | have a cronjob which runs every 2 hours which synchs the time to my box. | Works for me quite well. | | My cron job looks like: | | * */2 /usr/sbin/ntpdate -s 192.168.0.1 |
I am not mistaken, this approach is the wrong way around. ntpdate is used to make an initial sync with a timeserver and xntpd is being run afterwards for the continuous syncing. On other words, one needs to run ntpdate only once (at machine bootime). If you run xntpd hereafter at boottime then xntpd will start itself as a daemon, and will continuously try to sync itself with the timeserver. The ntp protocol will figure out for itself how often it is necessary to sync.
Koos Pol ---------------------------------------------------------------------- S.C. Pol T: +31 20 3116122 Systems Administrator F: +31 20 3116200 Compuware Europe B.V. E: koos_pol@nl.compuware.com Amsterdam PGP public key available
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
My problem is that when I initially sync with a server, which sets the correct time. I get out of sync somehow, yet my hwclock stays correct. For some reason xntpd is not working, yet I see it accessing the servers via ntop.
This is what keeps happening:
8 Nov 00:38:21 xntpd[1355]: ntpd exiting on signal 15 8 Nov 11:01:20 xntpd[2543]: signal_no_reset: signal 17 had flags 4000000 8 Nov 14:16:57 xntpd[2542]: time error 7769 over 1000 seconds; set clock manual -- rsweet@socal.rr.com | "I refuse to have a battle of -o) | wits with an unarmed person." Linux, the Choice /\ | of a GNU generation _\_v | |
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Man ntpdate claims that ntpdate is used to periodically sync a system whether at boot time or other times. I run a ntp timeserver on another box which polls a known time server on the cloud. Here is what man ntpdate says about time polling: ntpdate sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the server arguments to determine the correct time. It must be run as root on the local host. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of ntpdate depends on the number of servers, the number of polls each time it is run and the interval between runs. ntpdate can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. This is useful in some cases to set the clock initially before starting the NTP daemon ntpd. It is also possible to run ntpdate from a cron script. However, it is important to note that ntpdate with contrived cron scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since ntpdate does not discipline the host clock frequency as does ntpd, the accuracy using ntpdate is limited. NTPdate can theoretically run by itself at boot time to sync clocks; but as the man page says above it is no replacement for ntpd. All I am saying is that I already have a ntp server which connects to a known time server on the net. This box becomes a timeserver for my network which then gets hit by ntpdate requests at various time like boot or cron. I use this timeserver running ntp to serve up time to my entire home network. I don't hit external timeservers with ntpdate requests. An interesting second note from the ntpdate man page is: ntpdate will decline to set the date if an NTP server daemon (e.g., ntpd) is running on the same host. When running ntpdate on a regular basis from cron as an alternative to running a daemon, doing so once every hour or two will result in precise enough timekeeping to avoid stepping the clock. -- Michael Perry mperry@tsoft.com ------------------