[ntp:questions] Synchronizing contrived time

Amit Dor-Shifer amit.dor.shifer at gmail.com
Tue Mar 11 10:43:35 UTC 2014


Hi.

With the configuration I've been advised here, I'm still not able to
maintaine a skewed time on the server. ntpd does execute, yet a few seconds
after its initialization, it resets the time skew I've generated (I.E, even
b4 the client had a chance to query it)

$ sudo tail -f /var/log/messages
#...snip
$
$
$ date
Tue Mar 11 20:43:03 EST 2014
$ cat ~/test_ntpd/ntp.conf
server 127.127.1.0 minpoll 4 maxpoll 4
$ sudo date -s "$(date) - 50 minute"
Tue Mar 11 19:53:30 EST 2014
$ date
Tue Mar 11 19:53:35 EST 2014
$ sudo ntpd -g -f ~/test_ntpd/ntp.conf
sudo: timestamp too far in the future: Mar 11 20:43:30 2014

Mar 11 19:54:06  ntpd[31080]: ntpd 4.2.6p5 at 1.2349-o Sat Nov 23 18:21:48 UTC
2013 (1)
$ Mar 11 19:54:06  ntpd[31081]: proto: precision = 1.495 usec
Mar 11 19:54:06  ntpd[31081]: 0.0.0.0 c01d 0d kern kernel time sync enabled
Mar 11 19:54:06  ntpd[31081]: format error frequency file
/home/amit/test_ntpd/ntp.conf
Mar 11 19:54:06  ntpd[31081]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP
123
Mar 11 19:54:06  ntpd[31081]: Listen and drop on 1 v6wildcard :: UDP 123
Mar 11 19:54:06  ntpd[31081]: Listen normally on 2 lo 127.0.0.1 UDP 123
Mar 11 19:54:06  ntpd[31081]: Listen normally on 3 eth0 10.250.129.79 UDP
123
Mar 11 19:54:06  ntpd[31081]: Listen normally on 4 lo ::1 UDP 123
#...snip
Mar 11 19:54:06  ntpd[31081]: peers refreshed
Mar 11 19:54:06  ntpd[31081]: Listening on routing socket on fd #22 for
interface updates

$
$
$
$ date
Tue Mar 11 19:54:09 EST 2014
$
$
$
$
$ Mar 11 19:54:16  ntpd[31081]: 0.0.0.0 c016 06 restart
Mar 11 19:54:16  ntpd[31081]: 0.0.0.0 c012 02 freq_set kernel -25.992 PPM

$
$ date
Tue Mar 11 19:54:21 EST 2014
$ Mar 11 20:44:23  ntpd[31081]: 0.0.0.0 c61c 0c clock_step +3000.023162 s
Mar 11 20:44:23  ntpd[31081]: 0.0.0.0 c614 04 freq_mode
Mar 11 20:44:24  ntpd[31081]: 0.0.0.0 c618 08 no_sys_peer

$
$
$
$ date
Tue Mar 11 20:44:29 EST 2014

David, when you were suggesting before that I didn't configure the correct
local clock driver - is that achieved via ntp.conf? Could you refer me to
an example?
Thanks


On Tue, Mar 11, 2014 at 6:12 AM, William Unruh <unruh at invalid.ca> wrote:

> On 2014-03-10, Amit Dor-Shifer <amit.dor.shifer at gmail.com> wrote:
> > Thanks.
> > Would this then be the reference implementation?
> >
> > [user at centos test_ntpd]$ rpm -qf $(which ntpd)
> > ntp-4.2.6p5-1.el6.centos.x86_64
> > [user at centos test_ntpd]$ cat ~/test_ntpd/ntp.conf
> > server 127.127.1.0 minpoll 4 maxpoll 4
> > [user at centos test_ntpd]$ ps -ef|grep ntp
> > user     13411 12236  0 22:03 pts/0    00:00:00 grep ntp
> >
> > # moving clock back some 50 mins
>
> AAAAAARGH. No do not do that. ntpd is horrible at handlking sudden
> changes in time. It is like testing how good a car is by driving it off
> a cliff. It was never designed to fly.
>
>
> >
>
> _______________________________________________
> questions mailing list
> questions at lists.ntp.org
> http://lists.ntp.org/listinfo/questions
>


More information about the questions mailing list