Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 1998 23:15:45 +0100
From:      Palle Girgensohn <girgen@partitur.se>
To:        Alexander Dubinin <alex@nstl.nnov.ru>
Cc:        FreeBSD-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: How I can force xntpd & ntpdate to work together? Ntpdate says "port busy" than xntp rinning...
Message-ID:  <351AD391.38760863@partitur.se>
References:  <0711.980326@nstl.nnov.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Dubinin wrote:
> 
>     Hello All!
> 
> I'm want to run xntpd daemon to syncronize time in my local network,
> but primary host (there xntpd must live) synchronized with external time servers
> via ntpdate each 6 hours.
> 
> As soon as I run xntpd, ntpdate say: "ntp port is busy". How I can
> avoid it?
> 
>  Bye!
>   Alexander Dubinin                            mailto: alex@nstl.nnov.ru
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

xntpd is both a server and a client. The ntp protocol involves for the
xntpd to deterine when to set the time by asking its servers. The more
correct the time is, the less often it asks. Also, xntpd learns how
faulty the hardware clock is, and corrects it without asking servers all
the, so when it has been running for a while, it knows so much that it
very seldom asks the servers. (so I hope and believe, anyway... :).

The reason that you get "port busy" is that xntpd is already running.

This is a good setup:

xntpd always running on your server  (see /etc/rc.conf)

on the server feed /etc/ntp.conf with a bunch of good timeservers you
know of close to you on the internet. 

on the clients, run xntpd with a ntp.conf file with only one entry: your
server.

Or, if you clients have poor performance, or if you don't want the
overhead that ntp does, check out timed. This is what I do. I use timed
on all clients, and timed -F localhost on the server. Also in
/etc/rc.conf.

So, in short:

in the clients' /etc/rc.conf

timed_enable="YES"              # Run the time daemon (or NO).
timed_flags=""                  # Flags to timed (if enabled).
ntpdate_enable="NO"             # Run the ntpdate to sync time (or NO).
ntpdate_flags=""                # Flags to ntpdate (if enabled).
xntpd_enable="NO"               # Run xntpd Network Time Protocol (or
NO).
xntpd_flags=""                  # Flags to xntpd (if enabled).

in the server's /etc/rc.conf

timed_enable="YES"              # Run the time daemon (or NO).
timed_flags="-F localhost"      # Flags to timed (if enabled).
ntpdate_enable="YES"            # Run the ntpdate to sync time (or NO).
ntpdate_flags=""                # Flags to ntpdate (if enabled).
xntpd_enable="NO"               # Run xntpd Network Time Protocol (or
NO).
xntpd_flags=""                  # Flags to xntpd (if enabled).

and in the server's /etc/ntp.conf

some time servers close to you, one per line.

I also suggest the xntpd man page, and timed too. Hope this helps.

/Palle

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?351AD391.38760863>