ntpd

Network Time Protocol daemon

ntpd [-aAbdgLmnPqx] [-c conffile] [-D level]
[-f driftfile] [-k keyfile] [-l logfile] [-p pidfile]
[-s statsDir] [-t key] [-v variable] [-V variable] [-N high] [-r broadcastDelay]

Maintains local time-of-day synchronism with time servers.

This documentation is not a detailed description but rather a most commonly used features reference

It seems that neither Mac os nor linux use this daemon

Processes the config file, the command line, or NetInfo .
Use ntpq and ntpdc to query or change options.
-q quit after the first time the clock is set (as does ntpdate).
-g and -x can be used with this option.
Not sufficient to synchronize the clock.
-g disable sanity i.e. any offset is accepted once,
Afterwards the offset must be less then the sanity limit, ( 1000 seconds by default). Used with -q (quit).
-x express slew time in all cases, frequently used with -q (quit).
Prevents reducing the time which might be required if the system is ahead of the time server.
Normally, the time is
  • slewed if the offset is less than the step threshold, (128 ms by default) and
  • stepped if above the step threshold.
    If the step threshold is set to zero, all offsets are stepped, regardless of value and regardless of the -x option.

    Not a good idea as it bypasses the checks to cope with differences.
    Since the slew rate is limited to 0.5 ms/s, each second of adjustment requires an interval of 2,000 seconds ( 33 minutes).
    An adjustment of many seconds can take hours or days .

  • -n Do Not fork.
    -c conffile configuration file. (Disable netinfo?)
    -d debugging mode. multiple times, greater detail of display.
    -D level debugging level directly. D 9 sample
    -f driftfile file for drift
    -l logfile log file. Default: system log facility syslog.
    -s statsdir statistics directory
    -L Listen to virtual IPs.
    -b
    -m
    broadcast messages.
    use multicast messages on the IP multicast group address 224.0.1.1
    -p pidfile pidfile to record the ntpd's process ID.
    -N priority Not Nice priority i.e. higher
    -P Override the Priority limit set by the operating system.
    -r delay default propagation delay . if the delay cannot be computed automatically
    -a Enable authentication mode (default).
    -A Disable authentication mode.
    -k keyfile keyfile containing the NTP authentication .
    -t key trusted key list is appended with key
    -v variable
    -V variable
    Add a system variable listed by default.

    The list of servers is in: /etc/ntp.conf. For Example: server pool.ntp.org

    Be careful when using a command like:

    sudo /usr/sbin/ntpd -g -q -n -x  -D 9 |more
    Which disables the sanity check permiting large adjustments and slews to the new time, quits after one update, does not fork and show debugging

    Additional gory details can be found in the man page.


    Files

    /etc/ntp.conf , /etc/ntp.drift , /etc/ntp.keys

    See

    M ntp.conf, ntpdate, ntpdc, ntpq(8), sntp (client)

    ntp2.rbauman.com (San Jose)
    [ntp1][ ntp31
    Current Time (UTC):
    Reference ID 11FD04FD (ussic2-ntp-002.aaplimg.com)
    Stratum 2
    Ref time (UTC)Tue Apr 26 16:16:38 2022
    System time 0.000006641 seconds slow of NTP time
    Last offset -0.000015106 seconds
    RMS offset 0.000036191 seconds
    Frequency 2.750 ppm slow
    Residual freq -0.061 ppm
    skew 0.239 ppm
    Root delay 0.000855854 seconds
    Root dispersion 0.000301458 seconds
    Update interval 130.3 seconds
    Leap status Normal
    
    
    Tue Apr 26 16:16:38 2022
    
    MS Name/IP address          Stratum Poll Reach LastRx    Last sample
    ussjc2-ntp-002.aaplimg.c>   1       7       377 105     -10us [  -25us] +/-  600us
    time-d-b.nist.gov           1       9       377 474     -519us[ -562us] +/-   15
    ntpl.wiktel.com             1      10           726    +1303   +1309          36
    ntp3.torix.ca               1      10           179    -3359   -3371          31
    tick.usnogps.navy.mil       1
    clock.sjc.he.net
    clock.fmt.he.net
    time.cloudflare.com         3      10   
    rdnsl.steadfast.net
    ^? ipv4a.ntpl.rbauman.com
    ^? ipv6a.ntpl.rbauman.com
    ipv4.ntp3.rbauman.com
    ^? ipv6.ntp3.rbauman.com
    
    37
    37°
    37
    105
    474
    726
    179
    626
    741
    448
    527
    919
    511
    116
    98
    44
    113
    - 10uS
    -25us]
    -519us|
    -562us1
    +1303us[+1309us]
    -3359us{-3371us]
    +14ms l
    +14ms]
    -3165us[-3161us]
    +143us! +100us]
    -101us
    -76usl
    +1220us[+1235us]
    -89us
    -63usl
    +1136us[+1121us]
    +753ns +753n51
    +1389us[+1389us]
    -187us[ -202us]
    16:18:25 up 2 days,
    15:34.
    load average: 0.16, 0.09, 0.02
    Receive 2618 | Transmit 2406 (pkts/s) 8% dropped
    Abusers:
    40
    conntrack: 46167/131072 358
    IP: 144.126.151.19
    (my-love-date.de)
    

    See

    timedatectl