Hi to all.
I'm trying to setup an NTP server. I have an external device that is connected
to a GPS signal and sends to my device the time. My device runs an application
that receives this time and has to fill-in the shared memory of NTP, thus
allowing NTP to adjust system time and to distribute the time to other clients
connected.
In my device I'm trying to setup NTP in a way in which he can read the time
only from the shared memory.
My configuration file il se following:
#
driftfile /var/log/ntp.drift # path for drift file
logfile /var/log/ntp.log # alternate log file
# shared memory configuration
server 127.127.28.0 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.0 time1 0.420 refid SHM1 stratum 0 true
server 127.127.28.1 minpoll 4 maxpoll 4
fudge 127.127.28.1 time1 0.420 refid SHM2 stratum 0 true
NTP is running:
emh2@tutnix:/var/log$ ps -fea | grep ntp
emh2 9709 3167 0 10:24 pts/0 00:00:00 grep --color=auto ntp
ntp 23280 2013 0 09:59 ? 00:00:00 /usr/sbin/ntpd -p
/var/run/ntpd.pid -g -u 117:126 -c /etc/ntp.conf
and I have shared memory segment:
emh2@tutnix:/etc$ sudo ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x4e545030 5406720 root 600 80 1
0x4e545031 5439489 root 600 80 1
Querying the ntp gives me:
emh2@tutnix:/etc$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
SHM(0) .SHM1. 0 l - 16 0 0.000 0.000 0.000
SHM(1) .SHM2. 0 l - 16 0 0.000 0.000 0.000
Seems that nothing is working.
I've written a simple application for now that writes in the shared memory
segment the information about time following the approach shown here:
http://www.opensource.apple.com/source/ntp/ntp-86/util/sht.c
Can someone please help me?
Thanks in advance,
Claudio
_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions