[ntp:questions] Re: ntp: simple question

Mike G. mqg99 at cs.com
Thu Jan 15 18:25:23 UTC 2004


mayer at gis.net (Danny Mayer) wrote in message news:<3a2a0492.0401150624.7b358746 at posting.google.com>...
> mqg99 at cs.com (Mike G.) wrote in message news:<566c1840.0401140821.529c3a87 at posting.google.com>...
> > Christian Vogel <chris-usenet at hedonism.cx> wrote in message news:<bsq39m$8r6o$1 at ID-101457.news.uni-berlin.de>...
> > > Hi Mike,
> > > 
> > > Mike G. wrote:
> > > > Can I make ntp NEVER adjust time by more than a second (actually less
> > > > than a second), backwards (forward doesn't matter), not even at
> > > > startup?
> > > 
> > > I think that's what the -x option to ntpd and/or the "tinker step NNN"
> > > statement in ntp.conf is for. If the time offset is greater than the
> > > step-threshold (-x sets it to 600 seconds), ntp will step the clock, if
> > > it's less, it will slew it. Setting the panic-threshold to less than the
> > > step-threshold (which is the maximum offset, if the offsets gets bigger,
> > > ntp will just quit), ntp will never step the clock but only slew it.
> > > 
> > > See http://www.eecis.udel.edu/~mills/ntp/html/miscopt.html and
> > > http://www.eecis.udel.edu/~mills/ntp/html/ntpd.html.
> > > 
> > >         Chris
> > 
> > Chris,
> > 
> > My apologies for my late reply and thanks for the info.  I think my
> > original problem was having different versions of ntpd on the
> > different platforms.  In any case, I downloaded ntpd 4.2.0 and at
> > least my commands run consistently.
> > 
> But you are not running 4.2.0 on all of the boxes.
> 
> > So, I successfully got ntpd -x to start on four different platforms:
> > AIX 5.2, Tru64 5.1a, Redhat Linux 8, and Redhat Enterprise Linux WS 3.
> > However, the time continues to drift away on the Redhat platforms.  On
> > AIX and Tru64 the time is within less a hundredth of a second.  But on
> > Redhat, it continues to drift.  I can however synch up the time on all
> > platform using ntpdate -b ntpserver.  But ntpd -x does not seem to do
> > the job on the Redhat platforms.  Any ideas are greatly appreciated.
> > 
> > Here's the /etc/ntp.conf on both Redhat servers (same problem with a
> > stratum 2 server like time.nist.gov):
> > 
> > grep -v ^\# /etc/ntp.conf
> > restrict default ignore
> >  
> > restrict 127.0.0.1
> >  
> > server  ntpserver.micol.com version 1 # local clock
> > server  127.127.1.0 # local clock
> > fudge   127.127.1.0 stratum 10
> >  
> > driftfile /var/lib/ntp/drift
> > broadcastdelay  0.008
> >  
> > authenticate yes
> >  
> > keys            /etc/ntp/keys
> > 
> > Here's the (lengthy) debug output from both Redhat versions:
> > 
> > Redhat Linux 8
> > --------------
> > [root at tstserver root]# ntpd -D4 -x
> > Debug1: 4 -> 4 = 4
> > ntpd 4.1.2 at 1.892 Thu Sep 11 05:38:15 EDT 2003 (1)
> 
> Well this box is running ntpd 4.1.2!
> 
> > Debug1: 4 -> 4 = 4
> > create_sockets(123)
> > interface <lo> OK
> > interface <eth0> OK
> > bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=1
> > flags for fd 4: 04002
> > bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
> > flags for fd 5: 04002
> > bind() fd 6, family 2, port 123, addr 141.138.3.80, flags=1
> > flags for fd 6: 04002
> > create_sockets: ninterfaces=3
> > interface 0:  fd=4,  bfd=0,  name=wildcard,  flags=0x1
> >               sin=0.0.0.0  bcast=0.0.0.0,  mask=255.255.255.255
> > interface 1:  fd=5,  bfd=0,  name=lo,  flags=0x4
> >               sin=127.0.0.1  mask=255.0.0.0
> > interface 2:  fd=6,  bfd=0,  name=eth0,  flags=0x1
> >               sin=141.138.3.80  bcast=141.138.255.255, 
> > mask=255.255.0.0
> > init_io: maxactivefd 6
> > Debug2: 4 -> 4 = 4
> > getnetnum 127.0.0.1 step 0 buf 127 temp 127 netnum 127
> > getnetnum 127.0.0.1 step 1 buf 0 temp 0 netnum 32512
> > getnetnum 127.0.0.1 step 2 buf 0 temp 0 netnum 8323072
> > getnetnum 127.0.0.1 step 3 buf 1 temp 1 netnum 2130706433
> > getnetnum given 127.0.0.1, got 127.0.0.1 (7f000001)
> > getnetnum: "" invalid host numberntpserver.micol.com.
> 
> I'm not sure where this error came from, but since this is an old
> version I'm not going to bother with it.
> 
> > resolving ntpserver.micol.com
> > config: ntpserver.micol.com 3 4 6 10 0 0 0 *
> > 
> 
>  [snip...]
> 
> > Red Hat Enterprise Linux WS release 3
> > -------------------------------------
> > Linux tst2server at SIS:/root # ntpd -D4 -x
> > Debug1: 4 -> 4 = 4
> > ntpd 4.2.0 at 1.1161-r Tue Jan 13 13:50:10 MST 2004 (1)
> > Debug1: 4 -> 4 = 4
> > addto_syslog: ntpd 4.2.0 at 1.1161-r Tue Jan 13 13:50:10 MST 2004 (1)
> > addto_syslog: signal_no_reset: signal 13 had flags 4000000
> > addto_syslog: set_process_priority: Leave priority alone:
> > priority_done is <2>
> > addto_syslog: precision = 1.000 usec
> > create_sockets(123)
> > addto_syslog: no IPv6 interfaces found
> > address_okay: listen Virtual: 1, IF name: lo, Up Flag: 1
> > address_okay: listen Virtual: 1, IF name: eth0, Up Flag: 1
> > bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8
> > flags for fd 4: 04002
> > bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
> > flags for fd 5: 04002
> > bind() fd 6, family 2, port 123, addr 141.138.16.220, flags=8
> > flags for fd 6: 04002
> > create_sockets: ninterfaces=3
> > interface 0:  fd=4,  bfd=-1,  name=wildcard,  flags=0x8
> >               sin=0.0.0.0  bcast=0.0.0.0,  mask=255.255.255.255
> > interface 1:  fd=5,  bfd=-1,  name=lo,  flags=0x5
> >               sin=127.0.0.1  mask=255.0.0.0
> > interface 2:  fd=6,  bfd=-1,  name=eth0,  flags=0x9
> >               sin=141.138.16.220  bcast=141.138.19.255, 
> > mask=255.255.252.0
> > init_io: maxactivefd 6
> > local_clock: at 0 state 0
> > Debug2: 4 -> 4 = 4
> > getaddrinfo 127.0.0.1
> > getnetnum given 127.0.0.1, got 127.0.0.1
> > getaddrinfo ntpserver.micol.com
> > getnetnum given ntpserver.micol.com, got 141.138.1.59
> > key_expire: at 0
> > peer_clear: at 0 assoc ID 42700 refid INIT
> > newpeer: 141.138.16.220->141.138.1.59 mode 3 vers 4 poll 6 10 flags
> > 0x1 0x1 ttl
> > 0 key 00000000
> > getaddrinfo 127.127.1.0
> > getnetnum given 127.127.1.0, got 127.127.1.0
> > key_expire: at 0
> > peer_clear: at 0 assoc ID 42701 refid INIT
> > newpeer: 127.0.0.1->127.127.1.0 mode 3 vers 4 poll 6 6 flags 0x21 0x1
> > ttl 0 key
> > 00000000
> > getaddrinfo 127.127.1.0
> > getnetnum given 127.127.1.0, got 127.127.1.0
> > addto_syslog: frequency initialized 0.000 PPM from /var/lib/ntp/drift
> > local_clock: at 0 state 1
> > addto_syslog: configure: keyword "authenticate" unknown, line ignored
> 
> I didn't see this in the previous log. Are you sure the ntp.conf files
> are the same?
> 
> Danny

Danny,

You lost me.  Why do you say I'm not running 4.2.0 on all boxes?  I am, I hope.
Mike



More information about the questions mailing list