Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tools:time [2022/08/22 15:21]
darron [NTP]
tools:time [2024/05/06 15:50] (current)
darron [NTP]
Line 151: Line 151:
 </code> </code>
    
 +NB ntpq and ntptime are part of [[tools:time#ntp|ntp]].
 +
 +
 ===PPS=== ===PPS===
  
Line 227: Line 230:
 __systemd__ __systemd__
  
-systemd hijacks the GPSD socket so you will need to try a few things+systemd hijacks the GPSD socket (like inetd) so you will need to try a few things
 to resolve this. to resolve this.
  
Line 448: Line 451:
 <code> <code>
 apt install ntp ntpdate apt install ntp ntpdate
 +</code>
 +
 +<code>
 /etc/init.d/ntp stop /etc/init.d/ntp stop
 update-rc.d ntp disable update-rc.d ntp disable
 </code> </code>
  
-==Config==+__Bookworm__ 
 + 
 +<code> 
 +/etc/init.d/ntpsec stop 
 +update-rc.d ntpsec disable 
 +</code> 
 + 
 +<code> 
 +systemctl stop ntpd 
 +systemctl disable ntpd 
 +systemctl mask ntpd 
 +</code> 
 + 
 +==Master config==
  
 <code> <code>
Line 505: Line 524:
 server 127.127.28.2 server 127.127.28.2
 fudge 127.127.28.2 flag1 1 refid PTP fudge 127.127.28.2 flag1 1 refid PTP
 +</code>
 +
 +==Slave config==
 +
 +<code>
 +leapfile /usr/share/zoneinfo/leap-seconds.list
 +
 +statsdir /var/log/ntpstats/
 +statistics loopstats peerstats clockstats rawstats
 +filegen loopstats  file loopstats  type day enable
 +filegen peerstats  file peerstats  type day enable
 +filegen clockstats file clockstats type day enable
 +filegen rawstats   file rawstats   type day enable
 +
 +#server ntp.example.com
 +broadcastclient
 +disable auth
 </code> </code>
  
Line 549: Line 585:
 option is to find other sample devices to test and prefer. option is to find other sample devices to test and prefer.
  
 +The first character of each peer line above is called the ntp tally code.
 +<code>
 +Code  Message               Description
 +0     sel_reject              discarded as not valid (TEST10-TEST13)
 +1     sel_falsetick         discarded by intersection algorithm
 +2     sel_excess      .       discarded by table overflow (not used)
 +3     sel_outlier           discarded by the cluster algorithm
 +4     sel_candidate         included by the combine algorithm
 +5     sel_backup      #       backup (more than tos maxclock sources)
 +6     sel_sys.peer    *       system peer
 +7     sel_pps.peer    o       PPS peer (when the prefer peer is valid)
 +</code>
 +
 +==Debug==
 +
 +<code>
 +apt install tcpdump && rehash
 +tcpdump -ni wlan0 port 123 and udp
 +</code>
 ===PTP=== ===PTP===
  
Line 647: Line 702:
 <code> <code>
 apt install linuxptp apt install linuxptp
 +systemctl stop timemaster
 +systemctl disable timemaster
 +systemctl mask timemaster
 </code> </code>
  
-Necessary hardware is not available for further testing at this time.+More later...
 ===Resources=== ===Resources===