[ntp:questions] chu and wwv audio driver problems in debian lenny

jimmyterrence at gmail.com jimmyterrence at gmail.com
Tue Nov 25 19:06:41 UTC 2008


On Nov 25, 9:13 am, Steve Kostecke <koste... at ntp.org> wrote:
> On 2008-11-25, jimmyterre... at gmail.com <jimmyterre... at gmail.com> wrote:
>
> > remote        refid   st t when poll reach  delay  offset  jitter
> >==================================================================
> > CHU_AUDIO(0)  0.0.0.0  1 l    -   64    0   0.000   0.000   0.001
>
> In the future, please consider condensing your ntpq -p output (as done
> above) so that it does not wrap.
>
> > /etc/ntp.audio0
>
> > idev /dev/oss/ich0/pcm0
> > cdev /dev/oss/ich0/mix0
> > source line
> > agc line
> > monitor line
>
> What does 'ossinfo' show?
>
> > time:~# ntpd -D2
> > ntpd: illegal option -- D
>
> You need to rebuild with debugging enabled.
>
> 1. As root, edit your /etc/apt/sources.list and add a 'deb-src' line
> that matches your main 'deb' line. e.g.
>
> debhttp://mirrors.kernel.org/debian/testing main
> deb-srchttp://mirrors.kernel.org/debian/testing main
>
> 2. As root do the following to set up the build environment
>
>         # apt-get update
>         # apt-get build-dep ntp
>
> 3. Switch back to a non-root user and
>
>         $ cd /parent/directory/for/this/build
>         $ apt-get source ntp
>
> 4. Enter the ntp source directory and edit ./debian/rules and change
> '--disable-debugging' to '--enable-debugging' in the configure line.
>
> 5. To just build the ntpd binary run './debian/rules binary' and look in
> the ./ntpd directory.
>
> 6. To build a local package run 'debuild -us -uc'. The deb package
> will be in the parent dirctory. You can install this deb with 'dpkg -i
> ntp-package-name.deb'.
>
> Please feel free to stop by #ntp on irc.freenode.net for more
> assistance.
>
> --
> Steve Kostecke <koste... at ntp.org>
> NTP Public Services Project -http://support.ntp.org/

time:~# ossinfo
Version info: OSS 4.0 (b1016/200806170542) (0x00040003)
Platform: Linux/i686 2.6.26-1-686 #1 SMP Sat Nov 8 19:00:26 UTC 2008
(time)

Number of audio devices:	1
Number of audio engines:	6
Number of mixer devices:	1


Device objects
 0: osscore0 OSS core services
 1: ich0 Intel ICH (2415) interrupts=62594 (62594)
 2: ossusb0 USB audio core services


Mixer devices
 0: ICH AC97 Mixer (AD1881) (Mixer 0 of device object 1)

Audio devices
Intel ICH (2415)                  /dev/oss/ich0/pcm0  (device index 0)


I downloaded the source from http://www.ntp.org/downloads.html before
I saw your post on how to do it by building a deb package.  I can redo
it that way if it will work better, though.

I used the following options:

./configure --enable-debugging --enable-AUDIO-CHU --enable-WWV  --
program-prefix=/usr

and then

make; make install

Now debugging works.

time:~/ntp-4.2.4p5# /usr/bin/ntpd -d -d -d
ntpd 4.2.4p5 at 1.1541 Tue Nov 25 16:28:02 UTC 2008 (1)
addto_syslog: set_process_priority: Leave priority alone:
priority_done is <2>
addto_syslog: precision = 1.000 usec
create_sockets(123)
addto_syslog: ntp_io: estimated max descriptors: 1024, initial socket
boundary: 16
addto_syslog: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
addto_syslog: Listening on interface #1 wildcard, ::#123 Disabled
update_interfaces(123)
create_interface(::1#123)
addto_syslog: Listening on interface #2 lo, ::1#123 Enabled
created interface #2: fd=18, bfd=-1, name=lo, flags=0x5, scope=1,
ifindex=0, sin=::1, Enabled:
updating interface #2: fd=18, bfd=-1, name=lo, flags=0x5, scope=1,
ifindex=0, sin=::1, Enabled: new - created
create_interface(fe80::2b0:d0ff:fe54:44e2#123)
addto_syslog: Listening on interface #3 eth0,
fe80::2b0:d0ff:fe54:44e2#123 Enabled
created interface #3: fd=19, bfd=-1, name=eth0, flags=0x11, scope=2,
ifindex=0, sin=fe80::2b0:d0ff:fe54:44e2, Enabled:
updating interface #3: fd=19, bfd=-1, name=eth0, flags=0x11, scope=2,
ifindex=0, sin=fe80::2b0:d0ff:fe54:44e2, Enabled: new - created
create_interface(127.0.0.1#123)
addto_syslog: Listening on interface #4 lo, 127.0.0.1#123 Enabled
created interface #4: fd=20, bfd=-1, name=lo, flags=0x5, scope=0,
ifindex=0, sin=127.0.0.1, mask=255.0.0.0, Enabled:
updating interface #4: fd=20, bfd=-1, name=lo, flags=0x5, scope=0,
ifindex=0, sin=127.0.0.1, mask=255.0.0.0, Enabled: new - created
create_interface(192.168.2.116#123)
addto_syslog: Listening on interface #5 eth0, 192.168.2.116#123
Enabled
created interface #5: fd=21, bfd=-1, name=eth0, flags=0x19, scope=0,
ifindex=0, sin=192.168.2.116, bcast=192.168.2.255,,
mask=255.255.255.0, Enabled:
updating interface #5: fd=21, bfd=-1, name=eth0, flags=0x19, scope=0,
ifindex=0, sin=192.168.2.116, bcast=192.168.2.255,,
mask=255.255.255.0, Enabled: new - created
create_sockets: Total interfaces = 6
init_io: maxactivefd 21
local_clock: time 0 offset 0.000000 freq 0.000 state 0
addto_syslog: kernel time sync status 0040
addto_syslog: frequency initialized 0.000 PPM from /var/lib/ntp/
ntp.drift
getnetnum given 127.127.7.0, got 127.127.7.0 (t_UNK/0)
newpeer: cast flags: 0x1 for address: 127.127.7.0
newpeer: using fd 20 and our addr 127.0.0.1
peer_crypto_clear: at 0 next 0 assoc ID 2307
peer_clear: at 0 next 1 assoc ID 2307 refid INIT
audio_config_read: reading </etc/ntp.audio0>
idev </dev/oss/ich0/pcm0>
cdev </dev/oss/ich0/mix0>
agc <line> 8
monitor <line> 6
audio_init: </dev/oss/ich0/pcm0> bufsiz 240
audio_show: ctl_fd 6
newpeer: 127.0.0.1->127.127.7.0 mode 3 vers 4 poll 6 10 flags 0x1021
0x1 ttl 0 key 00000000
getnetnum given 127.127.7.0, got 127.127.7.0 (t_REF/1)
authtrust: keyid 0000ffff life 1
local_clock: time 0 offset 0.000000 freq 0.000 state 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm,
sync_unspec, 1 event, event_unspec' (0xc010)
refclock_transmit: at 1 127.127.7.0
poll_update: at 1 127.127.7.0 flags 1021 poll 6 burst 0 last 1 next 65
auth_agekeys: at 1 keys 1 expired 0
timer: interface update
update_interfaces(123)
auth_agekeys: at 60 keys 1 expired 0
refclock_transmit: at 65 127.127.7.0
poll_update: at 65 127.127.7.0 flags 1021 poll 6 burst 0 last 65 next
128
auth_agekeys: at 120 keys 1 expired 0
refclock_transmit: at 128 127.127.7.0
poll_update: at 128 127.127.7.0 flags 1021 poll 6 burst 0 last 128
next 194
auth_agekeys: at 180 keys 1 expired 0
refclock_transmit: at 194 127.127.7.0
poll_update: at 194 127.127.7.0 flags 1021 poll 6 burst 0 last 194
next 257
auth_agekeys: at 240 keys 1 expired 0
refclock_transmit: at 257 127.127.7.0
poll_update: at 257 127.127.7.0 flags 1021 poll 6 burst 0 last 257
next 322
auth_agekeys: at 300 keys 1 expired 0
timer: interface update
update_interfaces(123)
refclock_transmit: at 322 127.127.7.0
poll_update: at 322 127.127.7.0 flags 1021 poll 6 burst 0 last 322
next 385
auth_agekeys: at 360 keys 1 expired 0
refclock_transmit: at 385 127.127.7.0
poll_update: at 385 127.127.7.0 flags 1021 poll 6 burst 0 last 385
next 448
auth_agekeys: at 420 keys 1 expired 0
refclock_transmit: at 448 127.127.7.0
poll_update: at 448 127.127.7.0 flags 1021 poll 6 burst 0 last 448
next 512
auth_agekeys: at 480 keys 1 expired 0
refclock_transmit: at 512 127.127.7.0
poll_update: at 512 127.127.7.0 flags 1021 poll 6 burst 0 last 512
next 577
auth_agekeys: at 540 keys 1 expired 0
refclock_transmit: at 577 127.127.7.0
poll_update: at 577 127.127.7.0 flags 1021 poll 6 burst 0 last 577
next 642
auth_agekeys: at 600 keys 1 expired 0
timer: interface update
update_interfaces(123)
refclock_transmit: at 642 127.127.7.0
poll_update: at 642 127.127.7.0 flags 1021 poll 6 burst 0 last 642
next 708
auth_agekeys: at 660 keys 1 expired 0
refclock_transmit: at 708 127.127.7.0
poll_update: at 708 127.127.7.0 flags 1021 poll 6 burst 0 last 708
next 771
auth_agekeys: at 720 keys 1 expired 0

I'm guessing the

 auth_agekeys: at 720 keys 1 expired 0

lines means that ntp isn't hearing the audio signal, for whatever
reason.

While I was writing this post, something else came up in the debug
output:

opcode 1, found command handler
read_status: ID 0
sendpkt(fd=20 dst=127.0.0.1, src=127.0.0.1, ttl=-6, len=16)
read_network_packet: fd=20 length 12 from 7f000001 127.0.0.1
receive: at 968 127.0.0.1<-127.0.0.1 flags 5 restrict 000
in process_control()
opcode 2, found command handler
sendpkt(fd=20 dst=127.0.0.1, src=127.0.0.1, ttl=-6, len=472)
sendpkt(fd=20 dst=127.0.0.1, src=127.0.0.1, ttl=-6, len=152)
read_network_packet: fd=20 length 12 from 7f000001 127.0.0.1
receive: at 999 127.0.0.1<-127.0.0.1 flags 5 restrict 000
in process_control()
opcode 1, found command handler
read_status: ID 0
sendpkt(fd=20 dst=127.0.0.1, src=127.0.0.1, ttl=-6, len=16)
read_network_packet: fd=20 length 12 from 7f000001 127.0.0.1
receive: at 999 127.0.0.1<-127.0.0.1 flags 5 restrict 000
in process_control()

Is this significant?

Thank you,

Court






More information about the questions mailing list