Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

ptpd (8)

Name

ptpd - 2008)

Synopsis

/usr/lib/inet/ptpd  [-?]   [-B] [-c] [-C] [-S] [-f FILE] [-R FILE] [-d]
[-D] [-P] [-x] [-A NUMBER] [-O NUMBER] [-M NUMBER] [-t]  [-T  ttl]  [-a
NUMBER,NUMBER]  [-w  NUMBER] [-b NAME] [-K] [-u ADDRESS] [-U] [-e] [-h]
[-J DIRECTORY] [-l NUMBER,NUMBER] [-o NUMBER] [-i NUMBER]  [-n  NUMBER]
[-y  NUMBER]  [-m  NUMBER] [-V NUMBER] [-g] [-v NUMBER] [-r NUMBER] [-N
NUMBER] [-s NUMBER] [-p NUMBER] [-q NUMBER] [-Q NUMBER] [-W]  [-Y  NUM-
BER] [-L] [-j]

Description

System Administration Commands                                         ptpd(8)



NAME
       ptpd - Precision Time Protocol daemon (1588-2008)

SYNOPSIS
       /usr/lib/inet/ptpd  [-?]   [-B] [-c] [-C] [-S] [-f FILE] [-R FILE] [-d]
       [-D] [-P] [-x] [-A NUMBER] [-O NUMBER] [-M NUMBER] [-t]  [-T  ttl]  [-a
       NUMBER,NUMBER]  [-w  NUMBER] [-b NAME] [-K] [-u ADDRESS] [-U] [-e] [-h]
       [-J DIRECTORY] [-l NUMBER,NUMBER] [-o NUMBER] [-i NUMBER]  [-n  NUMBER]
       [-y  NUMBER]  [-m  NUMBER] [-V NUMBER] [-g] [-v NUMBER] [-r NUMBER] [-N
       NUMBER] [-s NUMBER] [-p NUMBER] [-q NUMBER] [-Q NUMBER] [-W]  [-Y  NUM-
       BER] [-L] [-j]

DESCRIPTION
       The  ptpd  program is a userland daemon that does very precise synchro-
       nization of system clocks of LAN connected systems.  It implements  the
       Precision  Time  Protocol  (PTP)   Version   2  as  defined by the IEEE
       1588-2008 standard.

       PTPd is a complete implementation of the IEEE 1588 v2 specification for
       a  standard (ordinary) clock. PTPd has been tested with and is known to
       work properly with other IEEE 1588 implementations. The source code for
       PTPd is freely available under a BSD-style license. Thanks to contribu-
       tions from users, PTPd is becoming an increasingly portable, interoper-
       able, and stable IEEE 1588 implementation.

       For more information, see http://ptpd.sourceforge.net/

       ptpd  in  Solaris works over any Ethernet based data link.  It can also
       take advantage of PTP specific hardware found in certain NICs  (Network
       Interface Card) for improved accuracy.

SERVICE MANAGEMENT
       The operation of ptpd is managed as a service by the service management
       facility, smf(7), under the service identifier:

         svc:/network/ptp:default

       Administrative actions on this service, such as   enabling,  disabling,
       or   requesting   restart,   can be performed using svcadm(8). The ser-
       vice's status can be  queried  using  the svcs(1) command.   There  are
       several  options  controlled by services properties which can be set by
       the system administrator. The available options can be listed  by  exe-
       cuting the following command:

         svccfg -s svc:/network/ptp:default listprop config

       Each of these properties can be set using this command:

         svccfg -s svc:/network/ptp:default setprop <propname> = <value>


       See svcadm(8) and svccfg(8).

       Available options and their meaning are as follows:

       config/listen_ifname
              A  string  specifying  the  name of the link to which ptp daemon
              should bind to. By default, ptp daemon picks  the  first  usable
              link with an IP address configured.

       config/node_type
              A  string  specifying  the  working  mode of the ptpd. It can be
              either "slave" or "master". Default value is "slave".

       config/use_hw
              A boolean which when true, instructs ptpd to take  advantage  of
              the  PTP hardware assist in the NIC. If set to true and NIC does
              not have PTP hardware assist, the ptpd will  exit.   Default  is
              false.  See EXAMPLES on how to recognize a NIC with PTP hardware
              assist.

       config/domain
              An integer specifying PTP domain as defined in the IEEE specifi-
              cation.   It  can  take  values  from  0  to 127 both inclusive.
              Default value is 0.

       config/announce_interval
              An integer specifying the interval in seconds between successive
              PTP ANNOUNCE messages sent by PTP master.  Default value is 2.

       config/sync_interval
              An  integer  specifying the interval between successive PTP SYNC
              messages sent by PTP master. Default value is 1.

       config/logfile
              A string specifying the location of the file  used  for log out-
              put. The default is /var/log/ptp.log

       config/enable_logging
              A boolean which when true, instructs ptpd to log synchronization
              and other related information in  the  file  specified  by  con-
              fig/logfile. Default value is false.

       config/other_options
              A  string  specifying other command line options mentioned below
              to be passed to svc:/network/ptp:default at startup.

       config/drift_dir
              A string to specify a readable and writeable directory were ptpd
              can  store  drift  files. Specifying a drift directory automati-
              cally enables the use of drift files. Drift files  are  used  to
              store  the native measured drift of the system clock relative to
              the upstream master clocks.

       config/startup_delay
              A number of seconds to delay before starting  the  ptpd  daemon.
              Used  if  the network interfaces on the system are not done ini-
              tializing befoe ptpd starts.

       config/delay_only_if_aggr
              Only wait the delay seconds from the startup_delay  property  if
              the  interface  specified  in  the listen_ifname properter is of
              type aggr. An aggr interface can be partially initialized  so  a
              delay  may  be  necessary to allow it to fully initialize before
              starting ptpd.

       config/debug_level
              Set the debug level. The default is zero, no debugging.  Maximum
              is 3.

       config/send_debug_to_stderr
              Send  debug  messages to stderr if true, to the syslog if false.
              Default is true.

       config/clock_step_seconds
              An integer that tells ptpd to allow stepping  the  system  clock
              only  when  it  first  starts and for only the number of seconds
              specified by this property after the first time the system clock
              is  set.  After the interval expires no further clock steps will
              be allowed. The default value is zero, which allows the clock to
              be stepped at any time.  number

       config/strict_rsp
              Allows  ptpd  to  use  the delay response from any clock for any
              other clock that has not received a response. This  should  only
              be used if link aggregations are being used and the ports in the
              aggregation are connected to PTP boundary clocks.

OPTIONS
       -?     display a short help text

       -B     enable debugging if it has been previously compiled in

       -c     run in command line (non-daemon) mode

       -C     run in command line mode and display statistics and logs

       -S     do not log information to  syslog,  except  messages  at  NOTICE
              level or above.

       -f FILE
              send output to FILE

       -R FILE
              record a quality FILE

       -d     display stats

       -D     display stats in .csv format

       -x     do not reset the clock if off by more than one second

       -A NUMBER
              Allow  stepping the clock at startup only. Stepping the clock is
              allowed for NUMBER seconds after the first time the clock is set
              and then disallowed thereafter.

       -M NUMBER
              do not accept delay values of more than NUMBER nanoseconds

       -O NUMBER
              do not reset the clock if offset is more than NUMBER nanoseconds

       -P     display packets received for debugging purposes

       -t     do not adjust the system clock

       -T     set multicast TTL for packets.  Defaults to 1.

       -a NUMBER,NUMBER
              specify clock servo P and I attenuations

       -w NUMBER
              specify one way delay filter stiffness

       -b NAME
              bind PTP to network interface NAME

       -K     use  PTP  hardware in network interface. Exit if PTP hardware is
              not usable or available.

       -k     Allows ptpd to use the delay response from  any  clock  for  any
              other clock that has not received a response.

       -u ADDRESS
              also send uni-cast to ADDRESS

       -U     enable hybrid mode which uses both unicast and multicast

       -e     run in ethernet mode (currently unimplemented)

       -h     run in End to End mode

       -J DIRECTORY
              specify  the  directory  to use to read and write the driftfile.
              There is no default. Specifying the directory enables the use of
              driftfiles.  The  directory  must have its permissions set to be
              readable and writeable by the ptpd daemon.

       -l NUMBER,NUMBER
              specify inbound, outbound latency in nsec

       -o NUMBER
              specify current UTC offset

       -i NUMBER
              specify PTP domain number

       -n NUMBER
              specify announce interval in 2^NUMBER sec

       -y NUMBER
              specify sync interval in 2^NUMBER sec

       -m NUMBER
              specify max number of foreign master records

       -N NUMBER
              announce receipt timeout

       -V     limit displaying statistics by setting the seconds  between  log
              messages

       -g     run as slave only

       -v NUMBER
              specify system clock allen variance

       -r NUMBER
              specify system clock accuracy

       -s NUMBER
              specify system clock class

       -p NUMBER
              specify priority1 attribute

       -q NUMBER
              specify priority2 attribute

       -Q NUMBER
              Specify  an  offset above which the clock will be stepped rather
              than slewed. The units are nanoseconds. The default is 0.1  sec-
              ond. The maximum is one second. All offsets above one second are
              always stepped.

       -W     run as master only

       -Y NUMBER
              set an initial delay request value

       -L     enable running multiple ptpd daemons

       -j     turn off IGMP refresh messages

EXAMPLES
       Example 1 Identify the presence of PTP  hardware  assist.  If  the  ptp
       property is equal to 1, PTP hardware assist can be enabled for that NIC
       through the config/use_hw property.

       #dladm show-linkprop -p ptp

       LINK   PROPERTY   PERM VALUE   EFFECTIVE  DEFAULT   POSSIBLE
       net1     ptp        r-    0        0          0          0,1
       net2     ptp        r-    0        0          0          0,1
       net0     ptp        r-    0        0          0          0,1
       net3     ptp        r-    0        0          0          0,1
       net7     ptp        r-    0        0          0          0,1
       net8     ptp        r-    1        1          0          0,1

       In the example above, the link net8 supports ptp in hardware.

       Example 2 Starting the ptp service in slave mode.

       First bind ptp service to net8 -
       #svccfg -s svc:/network/ptp:default \
           setprop config/listen_ifname=net8

       Then set the mode to "slave" -
       #svccfg -s svc:/network/ptp:default \
           setprop config/node_type=slave

       Enable the service -
       #svcadm enable svc:/network/ptp:default

       Starting the service in slave mode will allow the ptp  service  to  set
       system  time to an external clock (PTP master) on the network connected
       to interface net8.

       Example 3 Force ptp service to use PTP hardware in the NIC.

       First configure the service to use the PTP hardware -
       #svccfg -s svc:/network/ptp:default \
           setprop config/use_hw=true

       Then refresh the service, assuming it is enabled and online already -
       #svcadm refresh svc:/network/ptp:default



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+---------------------+
       |ATTRIBUTE TYPE |  ATTRIBUTE VALUE    |
       +---------------+---------------------+
       |Availability   | service/network/ptp |
       +---------------+---------------------+
       |Stability      | Uncommitted         |
       +---------------+---------------------+

NOTES
       Be careful when logging is enabled. In default setting it can  generate
       upto  40  MB  of  data  in  a window of 24 hours and many times more if
       enabled with -P option.

       Solaris does not allow ptpd to run inside a zones(7).


       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source     was      downloaded      from       http://downloads.source-
       forge.net/project/ptpd/ptpd/2.2.0/ptpd-2.2.0.tar.gz.

       Further information about this software can be found on the open source
       community website at http://ptpd.sourceforge.net/.

SEE ALSO
       svcs(1), svcadm(8), attributes(7), smf(7)


       IEEE Standard 1588-2008, Precision Clock Synchronization  Protocol  for
       Networked Measurement and Control Systems, 2008


AUTHORS
       Gael Mace <gael_mace@users.sourceforge.net> & Alexandre Van Kempen.

       Steven Kreuzer <skreuzer@freebsd.org>

       George Neville-Neil <gnn@freebsd.org>

       This  manual  page  was  written by Gael Mace for any Linux environment
       project.




version 2.2.0                    October, 2015                         ptpd(8)