|
Next: pkg_list & applications from source
|
| Author |
Message |
External

Since: Jun 01, 2007 Posts: 8
|
(Msg. 1) Posted: Fri Jun 01, 2007 8:22 pm
Post subject: NTP Archived from groups: comp>unix>bsd>freebsd>misc (more info?)
|
|
|
/etc/rc.conf
------------
ntpd_enable="YES"
/etc/ntp.conf
-------------
server time.nist.gov prefer
server time.windows.com
as per FreeBSD Handbook.
But nothing happens.
I don't get any errors but ntpd updates neither server's clock,
nor clients' clocks.
What's wrong/missing?
Bruno >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
|
patpro ~ Patrick Proniews
|
External

Since: Jun 01, 2007 Posts: 2
|
(Msg. 2) Posted: Fri Jun 01, 2007 8:44 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article ,
"Bruno Campanini" wrote:
> /etc/rc.conf
> ------------
> ntpd_enable="YES"
>
>
> /etc/ntp.conf
> -------------
> server time.nist.gov prefer
> server time.windows.com
>
> as per FreeBSD Handbook.
> But nothing happens.
> I don't get any errors but ntpd updates neither server's clock,
> nor clients' clocks.
>
> What's wrong/missing?
ntpd is running ? No firewalling issue ?
you might want to try openntpd.
patpro
--
http://www.patpro.net/ >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 02, 2007 Posts: 7
|
(Msg. 3) Posted: Sat Jun 02, 2007 1:30 am
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2007-06-01, Bruno Campanini wrote:
> /etc/rc.conf
> ------------
> ntpd_enable="YES"
>
>
> /etc/ntp.conf
> -------------
> server time.nist.gov prefer
> server time.windows.com
>
> as per FreeBSD Handbook.
> But nothing happens.
> I don't get any errors but ntpd updates neither server's clock,
> nor clients' clocks.
>
> What's wrong/missing?
>
> Bruno
You may need to touch the drift file (#touch /etc/ntp.drft).
--
Russell Wood <http://www.dynode.net/~rjw/> >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 02, 2007 Posts: 7
|
(Msg. 4) Posted: Sat Jun 02, 2007 1:36 am
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2007-06-02, Russell Wood wrote:
> On 2007-06-01, Bruno Campanini wrote:
>> /etc/rc.conf
>> ------------
>> ntpd_enable="YES"
>>
>>
>> /etc/ntp.conf
>> -------------
>> server time.nist.gov prefer
>> server time.windows.com
>>
>> as per FreeBSD Handbook.
>> But nothing happens.
>> I don't get any errors but ntpd updates neither server's clock,
>> nor clients' clocks.
>>
>> What's wrong/missing?
>>
>> Bruno
>
> You may need to touch the drift file (#touch /etc/ntp.drft).
Sorry, that's `drift' (#touch /etc/ntp.drift).
--
Russell Wood <http://www.dynode.net/~rjw/> >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Dec 28, 2003 Posts: 43
|
(Msg. 5) Posted: Sat Jun 02, 2007 1:53 am
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Russell Wood wrote:
> On 2007-06-02, Russell Wood wrote:
>>
>> You may need to touch the drift file (#touch /etc/ntp.drft).
>
> Sorry, that's `drift' (#touch /etc/ntp.drift).
FreeBSD default is /var/db/ntpd.drift (from /etc/defaults/rc.conf).
--
Warren Block * Rapid City, South Dakota * USA >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 02, 2007 Posts: 7
|
(Msg. 6) Posted: Sat Jun 02, 2007 7:56 am
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2007-06-02, Warren Block wrote:
> Russell Wood wrote:
>> On 2007-06-02, Russell Wood wrote:
>>>
>>> You may need to touch the drift file (#touch /etc/ntp.drft).
>>
>> Sorry, that's `drift' (#touch /etc/ntp.drift).
>
> FreeBSD default is /var/db/ntpd.drift (from /etc/defaults/rc.conf).
It's being set as a parameter to the ntpd command:
ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
In your /etc/ntp.conf file just put:
driftfile /etc/ntp.drift
Then I'm sure it'll work.
--
Russell Wood <http://www.dynode.net/~rjw/> >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 01, 2007 Posts: 8
|
(Msg. 7) Posted: Sat Jun 02, 2007 12:12 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Russell Wood" wrote in message
news:slrnf628lu.20tu.bitbucket@union.lab.dynode.net...
> On 2007-06-02, Warren Block wrote:
>> Russell Wood wrote:
>>> On 2007-06-02, Russell Wood wrote:
>>>>
>>>> You may need to touch the drift file (#touch /etc/ntp.drft).
>>>
>>> Sorry, that's `drift' (#touch /etc/ntp.drift).
>>
>> FreeBSD default is /var/db/ntpd.drift (from /etc/defaults/rc.conf).
>
> It's being set as a parameter to the ntpd command:
>
> ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
>
> In your /etc/ntp.conf file just put:
>
> driftfile /etc/ntp.drift
>
> Then I'm sure it'll work.
Ok Russel,
Executed
----------
ntpdate -b time.nist.gov
touch /var/run/ntpd.pid
touch /var/db/ntpd.drift
/etc/ntp.conf
-------------
server pool.ntp.org prefer
server time.nist.gov
server time.windows.com
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
/etc/rc.conf
------------
ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
ntpd_enable="YES"
How can I verify ntpd is working on server?
How can I get ntpd working on a client? this one is 2 mins
away from server's time. How long does it take to sync?
Bruno >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 02, 2007 Posts: 7
|
(Msg. 8) Posted: Sat Jun 02, 2007 12:12 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2007-06-02, Bruno Campanini wrote:
> "Russell Wood" wrote in message
> news:slrnf628lu.20tu.bitbucket@union.lab.dynode.net...
>> On 2007-06-02, Warren Block wrote:
>>> Russell Wood wrote:
>>>> On 2007-06-02, Russell Wood wrote:
>>>>>
>>>>> You may need to touch the drift file (#touch /etc/ntp.drft).
>>>>
>>>> Sorry, that's `drift' (#touch /etc/ntp.drift).
>>>
>>> FreeBSD default is /var/db/ntpd.drift (from /etc/defaults/rc.conf).
>>
>> It's being set as a parameter to the ntpd command:
>>
>> ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
>>
>> In your /etc/ntp.conf file just put:
>>
>> driftfile /etc/ntp.drift
>>
>> Then I'm sure it'll work.
>
> Ok Russel,
>
> Executed
> ----------
> ntpdate -b time.nist.gov
>
> ...
>
> /etc/rc.conf
> ------------
> ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
> ntpd_enable="YES"
>
ntpdate and ntpd are two different programs.
--
Russell Wood <http://www.dynode.net/~rjw/> >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jul 13, 2003 Posts: 30
|
(Msg. 9) Posted: Sat Jun 02, 2007 12:15 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article "Bruno
Campanini" writes:
>"Russell Wood" wrote in message
>news:slrnf628lu.20tu.bitbucket@union.lab.dynode.net...
>> On 2007-06-02, Warren Block wrote:
>>> Russell Wood wrote:
>>>> On 2007-06-02, Russell Wood wrote:
>>>>>
>>>>> You may need to touch the drift file (#touch /etc/ntp.drft).
>>>>
>>>> Sorry, that's `drift' (#touch /etc/ntp.drift).
>>>
>>> FreeBSD default is /var/db/ntpd.drift (from /etc/defaults/rc.conf).
>>
>> It's being set as a parameter to the ntpd command:
>>
>> ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
>>
>> In your /etc/ntp.conf file just put:
>>
>> driftfile /etc/ntp.drift
>>
>> Then I'm sure it'll work.
Why do you think it will work better if you put the drift file in the
wrong place?  Periodically updated state files should not be in /etc
(not that ntpd cares, of course). And there is absolutely no reason to
create it if you don't have something useful to put in it (all that
gives you is an error message, see followup), ntpd will do that when
*it* has something useful to put there.
>How can I verify ntpd is working on server?
The standard method for a basic sanity check is 'ntpq -p'.
--Per Hedeland
per.RemoveThis@hedeland.org >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 01, 2007 Posts: 8
|
(Msg. 10) Posted: Sat Jun 02, 2007 12:30 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bruno Campanini" wrote in message
> Executed
> ----------
> ntpdate -b time.nist.gov
> touch /var/run/ntpd.pid
> touch /var/db/ntpd.drift
>
> /etc/ntp.conf
> -------------
> server pool.ntp.org prefer
> server time.nist.gov
> server time.windows.com
> restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
>
> /etc/rc.conf
> ------------
> ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
> ntpd_enable="YES"
>
> How can I verify ntpd is working on server?
> How can I get ntpd working on a client? this one is 2 mins
> away from server's time. How long does it take to sync?
And...
From dmesg -a I read:
Starting ntpd.
ntpd[791]: Frequency format error in /var/db/ntpd.drift
The file /var/db/ntpd.drift has been only touch(ed) and
it is still empty...
Bruno >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 02, 2007 Posts: 7
|
(Msg. 11) Posted: Sat Jun 02, 2007 12:43 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2007-06-02, Per Hedeland wrote:
> In article "Bruno
> Campanini" writes:
>>"Russell Wood" wrote in message
>>news:slrnf628lu.20tu.bitbucket@union.lab.dynode.net...
>>> On 2007-06-02, Warren Block wrote:
>>>> Russell Wood wrote:
>>>>> On 2007-06-02, Russell Wood wrote:
>>>>>>
>>>>>> You may need to touch the drift file (#touch /etc/ntp.drft).
>>>>>
>>>>> Sorry, that's `drift' (#touch /etc/ntp.drift).
>>>>
>>>> FreeBSD default is /var/db/ntpd.drift (from /etc/defaults/rc.conf).
>>>
>>> It's being set as a parameter to the ntpd command:
>>>
>>> ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
>>>
>>> In your /etc/ntp.conf file just put:
>>>
>>> driftfile /etc/ntp.drift
>>>
>>> Then I'm sure it'll work.
>
> Why do you think it will work better if you put the drift file in the
> wrong place?
The default location is actually /etc (man ntpd):
-f driftfile
Specify the name and path of the frequency file, default
/etc/ntp.drift. This is the same operation as the driftfile
driftfile configuration command.
I have seen ntpd issues in the past when a drift file has not been
present. Once it's been touched things magically being to work. Just
/my/ experience.
--
Russell Wood <http://www.dynode.net/~rjw/> >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jan 23, 2004 Posts: 43
|
(Msg. 12) Posted: Sat Jun 02, 2007 1:23 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Bruno Campanini wrote:
> away from server's time. How long does it take to sync?
Give it about 10 - 15 minutes the first time (when the driftfile is empty).
--
Torfinn Ingolfsen,
Norway >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jul 13, 2003 Posts: 30
|
(Msg. 13) Posted: Sat Jun 02, 2007 1:36 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article Russell Wood
writes:
>On 2007-06-02, Per Hedeland wrote:
>> In article "Bruno
>> Campanini" writes:
>>>"Russell Wood" wrote in message
>>>news:slrnf628lu.20tu.bitbucket@union.lab.dynode.net...
>>>> On 2007-06-02, Warren Block wrote:
>>>>> Russell Wood wrote:
>>>>>> On 2007-06-02, Russell Wood wrote:
>>>>>>>
>>>>>>> You may need to touch the drift file (#touch /etc/ntp.drft).
>>>>>>
>>>>>> Sorry, that's `drift' (#touch /etc/ntp.drift).
>>>>>
>>>>> FreeBSD default is /var/db/ntpd.drift (from /etc/defaults/rc.conf).
>>>>
>>>> It's being set as a parameter to the ntpd command:
>>>>
>>>> ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
>>>>
>>>> In your /etc/ntp.conf file just put:
>>>>
>>>> driftfile /etc/ntp.drift
>>>>
>>>> Then I'm sure it'll work.
>>
>> Why do you think it will work better if you put the drift file in the
>> wrong place?
>
>The default location is actually /etc (man ntpd):
It's ntpd's default, but it's wrong for FreeBSD (and most other modern
Unices).
>I have seen ntpd issues in the past when a drift file has not been
>present. Once it's been touched things magically being to work. Just
>/my/ experience.
And often our experience is wrong, because we did something (or more
frequently multiple things) and something else happened, and we
incorrectly concluded that one was the cause of the other. But of course
bugs happen, and I obviously can't say that no version of (x)ntpd ever
had such a bug.
Anyway, current ntpd absolutely does not need the drift file to be
present at startup. If it is present, ntpd expects it to contain a
previously calculated drift value that is reasonably correct for the
host. If it does, it can significantly speed up synchronization, but if
it contains something else (or nothing), it can only cause harm.
E.g. I've seen some flavor of Linux create a drift file containing "0.0"
at install time, which will actually make the initial synchronization
take *longer* than needed.
--Per Hedeland
per DeleteThis @hedeland.org >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jun 01, 2007 Posts: 8
|
(Msg. 14) Posted: Sat Jun 02, 2007 3:02 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Per Hedeland" wrote in message
> Why do you think it will work better if you put the drift file in the
> wrong place? Periodically updated state files should not be in /etc
> (not that ntpd cares, of course). And there is absolutely no reason to
> create it if you don't have something useful to put in it (all that
> gives you is an error message, see followup), ntpd will do that when
> *it* has something useful to put there.
Somebody told me (in this thread) to touch driftfile and after
restarting it gave me an error. Then ntpd started writing on it
and boot sequence produced no more error.
Ok then, ntpd creates its driftfile by itself when needed!
Is it only necessary to touch ntpd.pid file?
>>How can I verify ntpd is working on server?
>
> The standard method for a basic sanity check is 'ntpq -p'.
ntpq -p check produces the right output, but the clients
are still out of sync.
They are two Windows machines (XP Pro + Vista); any problems
with Windows?
Bruno >> Stay informed about: NTP |
|
| Back to top |
|
 |  |
External

Since: Jul 13, 2003 Posts: 30
|
(Msg. 15) Posted: Sat Jun 02, 2007 3:02 pm
Post subject: Re: NTP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article "Bruno
Campanini" writes:
>
>Ok then, ntpd creates its driftfile by itself when needed!
>Is it only necessary to touch ntpd.pid file?
That's not necessary (or even a good idea) either.
>ntpq -p check produces the right output, but the clients
>are still out of sync.
Are you sure you can determine that it is the "right" output? Maybe just
post it.
>They are two Windows machines (XP Pro + Vista); any problems
>with Windows?
Lots. Can't really help you with that, but first you need to determine
that the server is working right.
--Per Hedeland
per.DeleteThis@hedeland.org >> Stay informed about: NTP |
|
| Back to top |
|
 |  |