[ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread RedGrittyBrick

I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux 
server.

The docs at http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd say
   When ntpd receives a SIGINFO signal, it writes its peer and sensor
   status to syslog(3).

However SIGINFO isn't defined on Linux.

Has this feature been removed from the Portable version of OpenNTP or is 
there some other signal I can send, or some other way to get peer status 
(hopefully similar to ntpq -p on xntpd) to monitor convergence etc.

-- 
RGB

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Dave Hart
On Fri, Sep 4, 2009 at 9:44 AM, someone too cool to use a working
email address wrote:

 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux
 server.

This list (and ntp.org in general) are not related to OpenNTP.  I'm
afraid you'll need to ask the openntpd.org or openbsd.org folks.

Good luck,
Dave Hart
___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Dave Hart
On Sep 4, 9:44 am, RedGrittyBrick wrote:
 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux
 server.

This group (which is theoretically also gatewayed to
questions@lists.ntp.org) is populated mostly by people using the
ntp.org reference implementation.  You'll probably have more success
with a OpenNTPD- or OpenBSD-focused list.  If you'd like some Chrony
advocacy, we have a few participants willing to oblige.

Cheers,
Dave Hart

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Maarten Wiltink
RedGrittyBrick redgrittybr...@spamweary.invalid wrote in message
news:4aa0e178$0$2541$da0fe...@news.zen.co.uk...

 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux
 server.

Oh great. Now you'll get a hundred people telling you that OpenNTP is
Not Real NTP.


 The docs at http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd say
When ntpd receives a SIGINFO signal, it writes its peer and sensor
status to syslog(3).

Is this the man page for (reference) NTP or does it apply to OpenNTP?


 However SIGINFO isn't defined on Linux.

 Has this feature been removed from the Portable version of OpenNTP or
 is there some other signal I can send, or some other way to get peer
 status (hopefully similar to ntpq -p on xntpd) to monitor convergence
 etc.

According to Wikipedia, SIGINFO is 'a synonym for' SIGPWR on Linux.
You might try that instead.

Presumably this would be somewhat easy to find in the source.

Groetjes,
Maarten Wiltink


___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Dave Hart
On Sep 4, 11:42 am, Maarten Wiltink maar...@kittensandcats.net
wrote:
 RedGrittyBrick redgrittybr...@spamweary.invalid wrote in message

 news:4aa0e178$0$2541$da0fe...@news.zen.co.uk...

  I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux
  server.

 Oh great. Now you'll get a hundred people telling you that OpenNTP is
 Not Real NTP.

It's a knockoff ntpd whose creator chose to use the same executable
name as the reference implementation.  Since this group is, for better
or worse, focused on that reference implementation, let me be the
first of many.  OpenNTPD is Not Real NTPD.  I mean it's not
implementing the draft NTPv4 specification.  It is, on the other hand,
a daemon which uses the NTP protocol.

  The docs athttp://www.openbsd.org/cgi-bin/man.cgi?query=ntpdsay
     When ntpd receives a SIGINFO signal, it writes its peer and sensor
     status to syslog(3).

 Is this the man page for (reference) NTP or does it apply to OpenNTP?

Read it.  It's for The ntpd daemon  Any questions?  The confusion is
apparently intentional.  OpenNTPD's creators seem to live in a world
where There Can Be Only One, and to them, the One is what some refer
to as OpenNTPD.

In case it's not already clear, I wish the OpenNTPD creators had taken
the approach of DragonflyBSD, another OS which chooses to distribute
their own NTP daemon:  
http://leaf.dragonflybsd.org/cgi/web-man?section=8command=dntpd

Thanks to inertia, I wouldn't bet on the name of OpenBSD's ntpd ever
changing.  But I can grumble.  ;)

Cheers,
Dave Hart

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread RedGrittyBrick

Maarten Wiltink wrote:
 RedGrittyBrick redgrittybr...@spamweary.invalid wrote in message
 news:4aa0e178$0$2541$da0fe...@news.zen.co.uk...
 
 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux
 server.
 
 Oh great. Now you'll get a hundred people telling you that OpenNTP is
 Not Real NTP.

Oh dear.


 The docs at http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd say
When ntpd receives a SIGINFO signal, it writes its peer and sensor
status to syslog(3).
 
 Is this the man page for (reference) NTP or does it apply to OpenNTP?

It is the man page referred to by the Openntp web site.


 However SIGINFO isn't defined on Linux.

 Has this feature been removed from the Portable version of OpenNTP or
 is there some other signal I can send, or some other way to get peer
 status (hopefully similar to ntpq -p on xntpd) to monitor convergence
 etc.
 
 According to Wikipedia, SIGINFO is 'a synonym for' SIGPWR on Linux.
 You might try that instead.

Thanks

 Presumably this would be somewhat easy to find in the source.
 

I had looked, there's a couple of sighndlr routines that don't mention 
any signals other than TERM, INT and HUP. My C skills are limited so I 
thought it possible I'd missed something.

-- 
RGB

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Uwe Klein
RedGrittyBrick wrote:

 My aim is simply to get timestamps in logfiles synchronised to within 
 100ms across a handful of servers and PCs on a LAN. I'm aware that NTP 
 normally does far far better than this, it may be overkill for my needs.

Can you use logging over the net ( udp, port 514 ) to a single host ?
You get double timestamps one from the originating host, the other from
the logging/receiving host.

uwe

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


[ntp:questions] ntpd not talking to servers? (was Re: SIGINFO for Portable OpenNTP on Linux)

2009-09-04 Thread RedGrittyBrick

RedGrittyBrick wrote:
 
 Dave Hart wrote:
 On Sep 4, 9:44 am, RedGrittyBrick wrote:
 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux
 server.

 This group (which is theoretically also gatewayed to
 questions@lists.ntp.org) is populated mostly by people using the
 ntp.org reference implementation.  ...

 RedHat 8 does have ntp-4.1.1a which is the latest RPM I can find for it.
 However this runs but has problems communicating with NTP servers. I've 
  not been able to fathom why. Maybe I should revisit that.
 

Here's what happens

# rpm -q ntp
ntp-4.1.1a-9

# grep ^[^#] /etc/ntp.conf
restrict default ignore
restrict 127.0.0.1
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org
driftfile /etc/ntp/drift
broadcastdelay  0.008
authenticate yes
keys/etc/ntp/keys

# /etc/init.d/ntpd start
Starting ntpd: [  OK  ]

# grep ntp /var/log/messages
Sep  4 15:00:40 amber ntpd: ntpd startup succeeded
Sep  4 15:00:40 amber ntpd[3083]: ntpd 4.1...@1.791 Sat Aug 31 18:27:29 
EDT 2002 (1)
Sep  4 15:00:40 amber ntpd[3083]: precision = 13 usec
Sep  4 15:00:40 amber ntpd[3083]: kernel time discipline status 0040
Sep  4 15:00:40 amber ntpd[3083]: frequency initialized 0.000 from 
/etc/ntp/drift

# ntpq -p
  remote   refid  st t when poll reach   delay   offset 
  jitter
==
  ntp0.cis.strath 0.0.0.0 16 u-   6400.0000.000 
4000.00
  ntp1.exa.net.uk 0.0.0.0 16 u-   6400.0000.000 
4000.00
  dns1.rmplc.co.u 0.0.0.0 16 u-   6400.0000.000 
4000.00
  odie.tomelliott 0.0.0.0 16 u-   6400.0000.000 
4000.00


# date
Fri Sep  4 15:40:21 BST 2009

# ntpq -p
  remote   refid  st t when poll reach   delay   offset 
  jitter
==
  ntp0.cis.strath 0.0.0.0 16 u-  12800.0000.000 
4000.00
  ntp1.exa.net.uk 0.0.0.0 16 u-  12800.0000.000 
4000.00
  dns1.rmplc.co.u 0.0.0.0 16 u-  12800.0000.000 
4000.00
  odie.tomelliott 0.0.0.0 16 u-  12800.0000.000 
4000.00

# ntpdate -q ntp1.exa.net.uk
server 82.219.4.30, stratum 2, offset -0.061504, delay 0.07434
  4 Sep 15:40:57 ntpdate[3311]: adjust time server 82.219.4.30 offset 
-0.061504 sec


So, no contact with NTP servers after 40 mins of running, even though 
ntpdate can query those same servers quite happily.

Any ideas how I can find out what's wrong?


-- 
RGB

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] ntpd not talking to servers? (was Re: SIGINFO for Portable OpenNTP on Linux)

2009-09-04 Thread RedGrittyBrick

Ronan Flood wrote:
 RedGrittyBrick redgrittybr...@spamweary.invalid wrote:
 
 So, no contact with NTP servers after 40 mins of running, even though 
 ntpdate can query those same servers quite happily.
 
 ntpdate -q uses a high local port, ntpd uses local port 123.

Oh, OK.

 If you stop ntpd, does ntpdate, without -q or -u or -d, work?


# ntpdate
  4 Sep 16:35:22 ntpdate[3523]: no servers can be used, exiting

# /etc/init.d/ntpd stop
Shutting down ntpd:[  OK  ]

# /etc/init.d/ntpd status
ntpd is stopped

# ntpdate
  4 Sep 16:35:49 ntpdate[3543]: no servers can be used, exiting

 If not, perhaps a firewall issue.

The openntpd daemon seemed to be able to talk to servers, here's some 
syslog records from it:

Sep  4 09:47:27 amber ntpd[1261]: ntp engine ready
Sep  4 09:47:44 amber ntpd[1261]: peer 212.13.195.3 now valid
Sep  4 09:47:45 amber ntpd[1261]: peer 93.89.85.202 now valid
Sep  4 09:47:49 amber ntpd[1261]: peer 194.238.48.3 now valid
Sep  4 09:47:50 amber ntpd[1261]: peer 91.213.50.15 now valid
Sep  4 09:47:51 amber ntpd[1261]: peer 82.219.4.30 now valid
Sep  4 10:03:52 amber ntpd[1261]: clock is now synced
Sep  4 10:16:51 amber ntpd[1261]: peer 93.89.85.202 now invalid
Sep  4 10:28:20 amber ntpd[1261]: peer 93.89.85.202 now valid
Sep  4 10:31:24 amber ntpd[1261]: clock is now unsynced
Sep  4 10:50:52 amber ntpd[1261]: clock is now synced
Sep  4 11:08:28 amber ntpd[1260]: adjusting local clock by -0.135589s
Sep  4 11:32:22 amber ntpd[1261]: clock is now unsynced
Sep  4 11:40:02 amber ntpd[1261]: peer 194.238.48.3 now invalid
Sep  4 11:40:57 amber ntpd[1261]: peer 93.89.85.202 now invalid
Sep  4 11:42:30 amber ntpd[1261]: clock is now synced
Sep  4 11:53:33 amber ntpd[1261]: peer 194.238.48.3 now valid
Sep  4 11:53:53 amber ntpd[1261]: peer 93.89.85.202 now valid
Sep  4 12:28:08 amber ntpd[1260]: adjusting local clock by -0.191927s
Sep  4 12:37:32 amber ntpd[1261]: clock is now unsynced
Sep  4 12:57:26 amber ntpd[1261]: clock is now synced
Sep  4 13:37:16 amber ntpd[1260]: adjusting local clock by -0.190155s
Sep  4 13:37:16 amber ntpd[1261]: clock is now unsynced
Sep  4 13:44:14 amber ntpd[1261]: clock is now synced
Sep  4 13:47:21 amber ntpd[1261]: peer 194.238.48.3 now invalid
Sep  4 13:58:46 amber ntpd[1261]: peer 194.238.48.3 now valid
Sep  4 14:05:51 amber ntpd[1261]: peer 212.13.195.3 now invalid
Sep  4 14:19:06 amber ntpd[1261]: peer 212.13.195.3 now valid
Sep  4 14:31:32 amber ntpd[1260]: adjusting local clock by -0.137812s
Sep  4 14:31:32 amber ntpd[1261]: clock is now unsynced
Sep  4 14:44:28 amber ntpd[1260]: adjusting local clock by -0.154506s
Sep  4 14:44:28 amber ntpd[1261]: clock is now synced
Sep  4 14:53:47 amber ntpd[1260]: adjusting local clock by -0.170122s
Sep  4 14:58:06 amber ntpd[1261]: clock is now unsynced
Sep  4 15:00:12 amber ntpd[1261]: ntp engine exiting
Sep  4 15:00:12 amber ntpd[1260]: Terminating

I can't say I follow what it is doing, but I do get the impression it is 
able to talk to NTP servers.

A non-Linux server on the same LAN can use ntpd OK.

A Windows XP client can get time from 0.uk.pool.ntp.org using UDP on 
port 123. A sniffer (Wireshark) shows NTP version 3 packets.

Here's what tcpdump has to say on the non-working box when I start ntpd

# tcpdump -s0 port 123
tcpdump: listening on eth0
17:03:10.167926 amber.my.domain.ntp  razor.peloris.co.uk.ntp:  v4 
client strat 0 poll 6 prec -17 (DF) [tos 0x10]
17:03:10.231563 razor.peloris.co.uk.ntp  amber.my.domain.ntp:  v4 
server strat 2 poll 6 prec -20 (DF)
17:03:19.167366 amber.my.domain.ntp  ntp0.lon.bitfolk.com.ntp:  v4 
client strat 0 poll 6 prec -17 (DF) [tos 0x10]
17:03:19.223485 ntp0.lon.bitfolk.com.ntp  amber.my.domain.ntp:  v4 
server strat 3 poll 6 prec -20 (DF)
17:03:20.167292 amber.my.domain.ntp  ntp1.arse.org.ntp:  v4 client 
strat 0 poll 6 prec -17 (DF) [tos 0x10]
17:03:23.167106 amber.my.domain.ntp  ntp1.exa.net.uk.ntp:  v4 client 
strat 0 poll 6 prec -17 (DF) [tos 0x10]
17:03:23.215801 ntp1.exa.net.uk.ntp  amber.my.domain.ntp:  v4 server 
strat 2 poll 6 prec -20 (DF)

# ntpq -p
  remote   refid  st t when poll reach   delay   offset 
  jitter
==
  ntp1.arse.org   0.0.0.0 16 u-   6400.0000.000 
4000.00
  ntp0.lon.bitfol 0.0.0.0 16 u-   6400.0000.000 
4000.00
  ntp1.exa.net.uk 0.0.0.0 16 u-   6400.0000.000 
4000.00
  razor.peloris.c 0.0.0.0 16 u-   6400.0000.000 
4000.00


Odd eh? There's network traffic. Why doesn't it show up in `ntpq -p`?

-- 
RGB

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] ntpd not talking to servers? (was Re: SIGINFO for Portable OpenNTP on Linux)

2009-09-04 Thread Ronan Flood
RedGrittyBrick redgrittybr...@spamweary.invalid wrote:

 # ntpdate
   4 Sep 16:35:49 ntpdate[3543]: no servers can be used, exiting

You have to give it a server: ntpdate ntp1.exa.net.uk or whatever.

However thanks for the tcpdump, which does indeed show traffic flowing.
Looking again at your ntp.conf, you've got

restrict default ignore

which will be the problem here.  You have to open the restrictions
for the servers you're trying to use, but that might be complicated
by the fact that you're using the pool, with multiple A records for
each entry if your DNS resolver is rotating entries.

Try restrict default nomodify nopeer notrap instead of ignore and
see how that goes.

-- 
Ronan Flood use...@umbral.org.uk

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


[ntp:questions] Need patch for [BUG 452]

2009-09-04 Thread Mysore
Hi,
Please, could anyone point me the patch for this bug:
[Bug 452] Do not report kernel PLL/FLL flips.

Thanks,
Anand

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Unruh
Dave Hart daveh...@gmail.com writes:

On Sep 4, 1:55=A0pm, RedGrittyBrick wrote:

 RedHat 8 does have ntp-4.1.1a which is the latest RPM I can find for it.
 However this runs but has problems communicating with NTP servers. I've
 =A0 not been able to fathom why. Maybe I should revisit that.

I wouldn't bother.  That version came out in 2002 [1], any problems
are not going to garner a lot of interest from the developers of ntp
unless they also occur on the current ntp-stable (4.2.4p7) or recent
ntp-dev (4.2.5) as well.

 I would download the latest ntp.org source but my C skills are few and I
 thought there might be dependency issues on such an old OS.

 Any advice/suggestions welcome.

Now you're talking my language.  You don't need to have any C skills
to use the ntp.org source tarballs.  Grab 4.2.4p7 or 4.2.5p209 from
http://www.ntp.org/downloads.html, then:

tar xzf ntp*.gz
cd ntp*
./configure --with-lineeditlibs=3Dreadline
make

Well, you had better make sure that you have a variety of developement
packages installed. Eg, gcc, make, libc-devel, ...



You should then either:

sudo make install
-or-
su
make install

If you have any problems, we'll help you through them.  The ntp.org
distribution works on some very ancient OSes, yours is still
relatively young by our standards :)

Cheers,
Dave Hart


[1] http://archive.ntp.org/ntp4/ntp-4.1/

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread RedGrittyBrick

Dave Hart wrote:
 On Sep 4, 1:55 pm, RedGrittyBrick wrote:
 RedHat 8 does have ntp-4.1.1a which is the latest RPM I can find for it.
 However this runs but has problems communicating with NTP servers. I've
   not been able to fathom why. Maybe I should revisit that.
 
 I wouldn't bother.  That version came out in 2002 [1], any problems
 are not going to garner a lot of interest from the developers of ntp
 unless they also occur on the current ntp-stable (4.2.4p7) or recent
 ntp-dev (4.2.5) as well.
 
 I would download the latest ntp.org source but my C skills are few and I
 thought there might be dependency issues on such an old OS.

 Any advice/suggestions welcome.
 
 Now you're talking my language.  You don't need to have any C skills
 to use the ntp.org source tarballs.  Grab 4.2.4p7 or 4.2.5p209 from
 http://www.ntp.org/downloads.html, then:
 
 tar xzf ntp*.gz
 cd ntp*
 ./configure --with-lineeditlibs=readline
 make
 
 You should then either:
 
 sudo make install
 -or-
 su
 make install
 
 If you have any problems, we'll help you through them.  The ntp.org
 distribution works on some very ancient OSes, yours is still
 relatively young by our standards :)
 

I downloaded, configured, made, installed and ran 4.2.4p7. Same problem. 
I changed the ntp.conf as Ronan suggested, restarted ntpd and all is 
well. I'm happy.

Thanks Dave.

-- 
RGB

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] ntpd not talking to servers? (was Re: SIGINFO for Portable OpenNTP on Linux)

2009-09-04 Thread RedGrittyBrick

Ronan Flood wrote:
 RedGrittyBrick redgrittybr...@spamweary.invalid wrote:
 
 # ntpdate
   4 Sep 16:35:49 ntpdate[3543]: no servers can be used, exiting
 
 You have to give it a server: ntpdate ntp1.exa.net.uk or whatever.
 
 However thanks for the tcpdump, which does indeed show traffic flowing.
 Looking again at your ntp.conf, you've got
 
 restrict default ignore
 
 which will be the problem here.  You have to open the restrictions
 for the servers you're trying to use, but that might be complicated
 by the fact that you're using the pool, with multiple A records for
 each entry if your DNS resolver is rotating entries.
 
 Try restrict default nomodify nopeer notrap instead of ignore and
 see how that goes.
 

That fixed it, thanks!

-- 
RGB

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] ntpd not talking to servers? (was Re: SIGINFO for Portable OpenNTP on Linux)

2009-09-04 Thread Steve Kostecke
On 2009-09-04, RedGrittyBrick redgrittybr...@spamweary.invalid wrote:

 # grep ^[^#] /etc/ntp.conf
 restrict default ignore
 restrict 127.0.0.1
 server 0.uk.pool.ntp.org
 server 1.uk.pool.ntp.org
 server 2.uk.pool.ntp.org
 server 3.uk.pool.ntp.org

The 'restrict default ignore' line is your problem. It tells ntpd to
ignore _all_ NTP packets from _anywhere_.

When 'restrict default ignore' is used one must explicitly allow
packets from authorized addresses (which can be servers or clients).
Unfortunately, this won't work with the pool or any other host name
which can resolve to multiple IP addresses.

A more sensible set of restriction lines is:

restrict default nomodify nopeer notrap noquery
restrict 127.0.0.1

More information about restrictions is available at
http://support.ntp.org/Support/AccessRestrctions.

 driftfile /etc/ntp/drift

These lines aren't  doing anything useful:

 broadcastdelay  0.008
 authenticate yes
 keys/etc/ntp/keys


-- 
Steve Kostecke koste...@ntp.org
NTP Public Services Project - http://support.ntp.org/

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] ntpd not talking to servers? (was Re: SIGINFO for Portable OpenNTP on Linux)

2009-09-04 Thread Steve Kostecke
On 2009-09-04, RedGrittyBrick redgrittybr...@spamweary.invalid wrote:

 # ntpdate
   4 Sep 16:35:22 ntpdate[3523]: no servers can be used, exiting

That won't work.

You have to pass the server name(s) on the command line.

e.g. 'ntpdate pool.ntp.org'

-- 
Steve Kostecke koste...@ntp.org
NTP Public Services Project - http://support.ntp.org/

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Steve Kostecke
On 2009-09-04, Dave Hart daveh...@gmail.com wrote:

 On Sep 4, 9:44 am, RedGrittyBrick wrote:

 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8
 Linux server.

 This group (which is theoretically also gatewayed to
 questions@lists.ntp.org)

See https://lists.ntp.org/pipermail/questions/2009-September/thread.html

-- 
Steve Kostecke koste...@ntp.org
NTP Public Services Project - http://support.ntp.org/

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Steve Kostecke
On 2009-09-04, RedGrittyBrick redgrittybr...@spamweary.invalid wrote:

 Dave Hart wrote:

 This group ... is populated mostly by people using the ntp.org
 reference implementation.

 I didn't realise this was a controversial point, sorry for any
 annoyance caused.

It's not a matter of annoyance. It's the simple fact that, AFAIK, no one
here has any real experience (at least, that they'll admit to) with that
other implementation.

 RedHat 8 does have ntp-4.1.1a which is the latest RPM I can find for it.
 However this runs but has problems communicating with NTP servers. I've 
   not been able to fathom why. Maybe I should revisit that.

Yes, you should.

-- 
Steve Kostecke koste...@ntp.org
NTP Public Services Project - http://support.ntp.org/

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Dave Hart
On Sep 4, 3:51 pm, Steve Kostecke wrote:
 On 2009-09-04, Dave Hart wrote:

  This group (which is theoretically also gatewayed to
  questi...@lists.ntp.org)

 Seehttps://lists.ntp.org/pipermail/questions/2009-September/thread.html

It's a one-way gateway in practice.  Newsgroup postings make it to
questions@ but quesstions@ traffic never makes it to the newsgroup.
This has been a problem all summer and has as has been noted recently
by Martin Burnicki and David J Taylor.  In this very thread, you will
find my first reply was to questions@lists.ntp.org, and has not made
it to the newsgroup. [1]  I switched over to posting to the newsgroup,
since otherwise the OP would likely never see my messages.

Cheers,
Dave Hart

[1]
Date: Fri, 4 Sep 2009 11:37:51 +
Message-ID:
85d954180909040437i5eb57d8dt489ebe0c9ad6f...@mail.gmail.com
http://lists.ntp.org/pipermail/questions/2009-September/024170.html
^ note lack of s means no dire browser warnings...

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] ntpd not talking to servers?

2009-09-04 Thread Harlan Stenn
Your problem is the 'restrict' line in  your ntp.conf file.

Please see:

 http://support.ntp.org/Support/ConfiguringNTP

H

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] Need patch for [BUG 452]

2009-09-04 Thread Harlan Stenn
 In article 
 232192a8-6957-42ea-ad40-96dc60393...@y10g2000prg.googlegroups.com, Mysore 
 mr.anandaku...@gmail.com writes:

Mysore Hi, Please, could anyone point me the patch for this bug: [Bug 452]
Mysore Do not report kernel PLL/FLL flips.

Sure:

- look at the bug report to see when it was fixed and if the fix is in
  -stable (and therefore -dev) or -dev only

- visit http://ntp.bkbits.net, pick ntp-stable (if the fix is there) or
  ntp-dev (otherwise)

- select the appropriate date range

- search for 452

- visit the changeset

- see the patches

-- 
Harlan Stenn st...@ntp.org
http://ntpforum.isc.org  - be a member!

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] SIGINFO for Portable OpenNTP on Linux

2009-09-04 Thread Richard B. Gilbert
RedGrittyBrick wrote:
 
 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux 
 server.
 
 The docs at http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd say
   When ntpd receives a SIGINFO signal, it writes its peer and sensor
   status to syslog(3).
 
 However SIGINFO isn't defined on Linux.
 
 Has this feature been removed from the Portable version of OpenNTP or is 
 there some other signal I can send, or some other way to get peer status 
 (hopefully similar to ntpq -p on xntpd) to monitor convergence etc.
 

Open mouth, insert foot, chew vigorously!

OpenNTP is do it yourself project by some group whose name and 
affiliations I can't remember.  It *does* use the NTP protocol but there 
the connection ends!

It's possible that members of the responsible group monitor this news 
group but I wouldn't count on it.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] ntpd not talking to servers? (was Re: SIGINFO for Portable OpenNTP on Linux)

2009-09-04 Thread Richard B. Gilbert
RedGrittyBrick wrote:
 
 RedGrittyBrick wrote:

 Dave Hart wrote:
 On Sep 4, 9:44 am, RedGrittyBrick wrote:
 I'm using OpenNTP 3.9p1 (http://www.openntpd.org/) on an RedHat 8 Linux
 server.

 This group (which is theoretically also gatewayed to
 questions@lists.ntp.org) is populated mostly by people using the
 ntp.org reference implementation.  ...

 RedHat 8 does have ntp-4.1.1a which is the latest RPM I can find for it.
 However this runs but has problems communicating with NTP servers. 
 I've  not been able to fathom why. Maybe I should revisit that.

 
 Here's what happens
 
 # rpm -q ntp
 ntp-4.1.1a-9
 
 # grep ^[^#] /etc/ntp.conf
 restrict default ignore
 restrict 127.0.0.1
 server 0.uk.pool.ntp.org
 server 1.uk.pool.ntp.org
 server 2.uk.pool.ntp.org
 server 3.uk.pool.ntp.org
 driftfile /etc/ntp/drift
 broadcastdelay  0.008
 authenticate yes
 keys/etc/ntp/keys
 
 # /etc/init.d/ntpd start
 Starting ntpd: [  OK  ]
 
 # grep ntp /var/log/messages
 Sep  4 15:00:40 amber ntpd: ntpd startup succeeded
 Sep  4 15:00:40 amber ntpd[3083]: ntpd 4.1...@1.791 Sat Aug 31 18:27:29 
 EDT 2002 (1)
 Sep  4 15:00:40 amber ntpd[3083]: precision = 13 usec
 Sep  4 15:00:40 amber ntpd[3083]: kernel time discipline status 0040
 Sep  4 15:00:40 amber ntpd[3083]: frequency initialized 0.000 from 
 /etc/ntp/drift
 
 # ntpq -p
  remote   refid  st t when poll reach   delay   offset 
  jitter
 ==
  
 
  ntp0.cis.strath 0.0.0.0 16 u-   6400.0000.000 
 4000.00
  ntp1.exa.net.uk 0.0.0.0 16 u-   6400.0000.000 
 4000.00
  dns1.rmplc.co.u 0.0.0.0 16 u-   6400.0000.000 
 4000.00
  odie.tomelliott 0.0.0.0 16 u-   6400.0000.000 
 4000.00
 
 
 # date
 Fri Sep  4 15:40:21 BST 2009
 
 # ntpq -p
  remote   refid  st t when poll reach   delay   offset 
  jitter
 ==
  
 
  ntp0.cis.strath 0.0.0.0 16 u-  12800.0000.000 
 4000.00
  ntp1.exa.net.uk 0.0.0.0 16 u-  12800.0000.000 
 4000.00
  dns1.rmplc.co.u 0.0.0.0 16 u-  12800.0000.000 
 4000.00
  odie.tomelliott 0.0.0.0 16 u-  12800.0000.000 
 4000.00
 
 # ntpdate -q ntp1.exa.net.uk
 server 82.219.4.30, stratum 2, offset -0.061504, delay 0.07434
  4 Sep 15:40:57 ntpdate[3311]: adjust time server 82.219.4.30 offset 
 -0.061504 sec
 
 
 So, no contact with NTP servers after 40 mins of running, even though 
 ntpdate can query those same servers quite happily.
 
 Any ideas how I can find out what's wrong?
 
 

Lose the restrict statements in ntp.conf.  You should then be able to 
receive replies from the servers!

Restrict is not as well documented as it might be!  You told ntpd to 
ignore ALL servers with restrict default ignore

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


[ntp:questions] ntp server and client

2009-09-04 Thread Jason Marshall
Hi All

I just need to ask a quick and maybe a dumb one, sorry but I do not have 
time to search for the solution on the net.

I want to set up a NetBSD unit to run as ntp server and client.

At the moment my configuration file looks like this:

###
server 127.127.1.0
fudge 127.127.1.0 stratum 4

 server 0.europe.pool.ntp.org iburst
 server 1.europe.pool.ntp.org iburst
 server 0.us.pool.ntp.org iburst
 server 1.us.pool.ntp.org iburst
###

A the moment my local unit is syncing to the local clock? How do I 
change this so that I give time updates to local clients,
and get the time from the external stratum 2 server?

Thanks
Jason
___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


[ntp:questions] ntpd reads from shared memory but doesn't act on it

2009-09-04 Thread J. Jobin

Hi,

I'm trying to get ntpd to read from shared memory and then adjust the time 
accordingly. Problem is it seems to read the value that I put into shared 
memory but doesn't seem to adjust the time accordingly.

This is how I ran ntpd:

 ./ntpd -D 3 -u 113:124 -g

Using the gpsd program, I borrowed code from there and wrote my own little 
program to write into shared memory. When I run my program, I have it set to 
increase the time by 60 seconds and 300 microseconds, i.e., 60.000300 seconds. 
Example output from my program:

ntpshm_put: Clock: 1251851559 @ 1251851499.390156

Additionally, there is an entry in my /etc/ntp.conf that says fudge is 0.420. 
When I run my program, I see this output from gpsd immediately:

peer SHM(0) event 'event_reach' (0x84) status 'unreach, conf, 2 events, 
event_reach' (0x8024)
refclock_sample: n 1 offset 60.420300 disp 0.00 jitter 0.01
clock_filter: n 1 off 60.420300 del 0.00 dsp 7.937500 jit 0.01, age 0

That offset - 60.420300 - seems consistent with what I set. (60.0003000 + 0.420)

However even after half a day, ntpd doesn't seem to have adjusted the time. 
Maybe I'm forgetting to set some option? Maybe once is not enough for ntpd, and 
I need to keep writing new values regularly? Any idea on what I might be 
forgetting or doing incorrectly?

Some relevant information:

I don't want my ntpd to talk to external servers. The intention is that a 
script will write values into shared memory and ntpd should read this and 
adjust accordingly.


This is what my /etc/ntp.conf file looks like:

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# You do need to talk to an NTP server or two (or three).
#server ntp.ubuntu.com

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust

server 127.127.28.0 mode 1 minpoll 4 maxpoll 4
fudge 127.127.28.0 time1 0.420 refid GPS

server 127.127.28.1 mode 1 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.1 refid GPS1




The output of ntpq -p

 remote   refid  st t when poll reach   delay   offset  jitter
==
 SHM(0)  .GPS.0 l  17h   1600.0000.000   0.001
 SHM(1)  .GPS1.   0 l-   1600.0000.000   0.001


That 17h corresponds to when my program wrote into the shared memory.

The output of ntpdc

ntpdc loopinfo
offset:   0.00 s
frequency:-34.340 ppm
poll adjust:   0
watchdog timer:   63469 s


$ cat /var/lib/ntp/ntp.drift 
-34.340


$ cat /proc/sysvipc/shm
   key  shmid   perms size  cpid  lpid  nattch uid gid cuid  cgid
atime  dtime  ctime
1314148400  0700   80   5014 25550   20   00   0 1251851499 
1251851500  1251847089
131414840132769   70080  5014 25550   100   0   0 1251851499 
1251851500  1251847089
 0   65538  1600 393216 5466 55882 106 114 106  114 1251847098 
1251847098 1251847098


On strange thing I did notice is that the lpid in the above output is always 
that of my program which writes into it. Looking at the ntpd output, it seems 
to read it from shared memory *after* my program has written into it. So, 
shouldn't the lpid be that of the ntpd process?

FWIW, I'm using ntpd version 4.2.4p7 on a 32-bit Ubuntu 8.04 machine.

Thanks.





_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery
___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions