Hi,

I am aiming to let NTP synchronise the system clock by using the shared memory 
which I would like to fill by using PTP. Now I have read that Timemaster is the 
binary to realise such setup. 

I have a RHEL 7.5 installation with linuxptp version 1.8.5 installed on it and 
(ofcourse as included with the RHEL installation) ntpd installed. 

I have configured my /etc/timemaster.conf file as follows:

# Configuration file for timemaster

#[ntp_server localhost.localdomain]
#minpoll 4
#maxpoll 4

[ptp_domain 0]
interfaces eno1
delay 10e-6
ntp_poll 4
phc2sys_poll 2
ntp_options prefer
ptp4l_option slaveOnly 1
ptp4l_option clock_servo ntpshm
ptp4l_option time_stamping hardware

[timemaster]
ntp_program ntpd

#[chrony.conf]
#include /etc/chrony.conf

[ntp.conf]
includefile /etc/ntp.conf

[ptp4l.conf]

#[chronyd]
#path /usr/sbin/chronyd
#options -u chrony

[ntpd]
path /usr/sbin/ntpd
options -u ntp:ntp -g

[phc2sys]
path /usr/sbin/phc2sys

[ptp4l]
path /usr/sbin/ptp4l

In my /etc/ntp.conf file I have commented out all of the default servers from 
Red Hat.

When restarting the timemaster service ($ sudo systemctl restart timemaster) 
and afterwards checking it’s status ($ sudo systemctl status timemaster) 
returns the following:

● timemaster.service - Synchronize system clock to NTP and PTP time sources
   Loaded: loaded (/usr/lib/systemd/system/timemaster.service; disabled; vendor 
preset: disabled)
   Active: active (running) since Fri 2018-04-20 14:49:19 CEST; 3s ago
 Main PID: 67855 (timemaster)
    Tasks: 4
   CGroup: /system.slice/timemaster.service
           ├─67855 /usr/sbin/timemaster -f /etc/timemaster.conf
           ├─67857 /usr/sbin/ntpd -u ntp:ntp -g -n -c 
/var/run/timemaster/ntp.conf
           ├─67858 /usr/sbin/ptp4l -l 5 -f /var/run/timemaster/ptp4l.0.conf -H 
-i eno1
           └─67859 /usr/sbin/phc2sys -l 5 -a -r -R 0.25 -z 
/var/run/timemaster/ptp4l.0.socket -t [0:eno1] -n 0 -E ntpshm -M 0

Apr 20 14:49:19 localhost.localdomain ntpd[67857]: Listen normally on 2 lo 
127.0.0.1 UDP 123
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: Listen normally on 3 eno1 
10.100.0.3 UDP 123
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: Listen normally on 4 virbr0 
192.168.122.1 UDP 123
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: Listen normally on 5 lo ::1 
UDP 123
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: Listen normally on 6 eno1 
fe80::dd2d:9125:1f21:a25e UDP 123
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: Listening on routing socket 
on fd #23 for interface updates
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: 0.0.0.0 c016 06 restart
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: 0.0.0.0 c012 02 freq_set 
kernel 0.000 PPM
Apr 20 14:49:19 localhost.localdomain ntpd[67857]: 0.0.0.0 c011 01 freq_not_set
Apr 20 14:49:20 localhost.localdomain phc2sys[67859]: [7901.340] [0:eno1] 
Waiting for ptp4l...

When checking the status again after a few moments it keeps outputting the 
following:

Apr 20 14:50:22 localhost.localdomain ptp4l[67858]: [7962.983] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:50:28 localhost.localdomain ptp4l[67858]: [7969.218] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:50:35 localhost.localdomain ptp4l[67858]: [7976.200] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:50:43 localhost.localdomain ptp4l[67858]: [7983.419] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:50:50 localhost.localdomain ptp4l[67858]: [7991.146] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:50:57 localhost.localdomain ptp4l[67858]: [7998.098] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:51:04 localhost.localdomain ptp4l[67858]: [8005.303] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:51:11 localhost.localdomain ptp4l[67858]: [8011.678] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:51:17 localhost.localdomain ptp4l[67858]: [8018.044] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30
Apr 20 14:51:24 localhost.localdomain ptp4l[67858]: [8024.578] [0:eno1] 
selected best master clock 3c5282.fffe.5abe30

And when checking the state of the NTP synchronisation ($ ntpq -p) it does list 
the shared memory source (PTP), but it does not synchronise or even start 
synchronisation in any way:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 SHM(0)          .PTP0.           0 l    -   16    0    0.000    0.000   0.000

Now I have tried many different options in the /etc/timemaster.conf file but I 
can’t find anything that get’s the NTP process starting to synchronize to the 
PTP data in the shared memory (if  PTP even sends data to the shared memory 
(suspicious about that since timemaster continuously only returns ‘selected 
best master clock 3c5282.fffe.5abe30))

Do you have any idea what I am doing wrong and how I can solve my problem as to 
how to synchronize with NTP by using PTP as the source clock. Or should I even 
use a completely different method to reach that aim?


Kind regards,
Jord Pool 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to