ptpd - 2008)
/usr/lib/inet/ptpd [-?] [-B] [-c] [-C] [-S] [-f FILE] [-R FILE] [-d] [-D] [-P] [-x] [-O NUMBER] [-M NUMBER] [-t] [-T ttl] [-a NUMBER,NUMBER] [-w NUMBER] [-b NAME] [-K] [-u ADDRESS] [-e] [-h] [-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] [-W] [-Y NUMBER] [-L] [-j]
System Administration Commands ptpd(1M)
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] [-O NUMBER] [-M NUMBER] [-t] [-T ttl] [-a NUMBER,NUMBER]
[-w NUMBER] [-b NAME] [-K] [-u ADDRESS] [-e] [-h] [-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] [-W] [-Y NUMBER] [-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(5), 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(1M). 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(1M) and svccfg(1M).
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 3 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.
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
-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
-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.
-u ADDRESS
also send uni-cast to ADDRESS
-e run in ethernet mode (currently unimplemented)
-h run in End to End mode
-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
-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=yes
Then refresh the service, assuming it is enabled and online already -
#svcadm refresh svc:/network/ptp:default
ATTRIBUTES
See attributes(5) 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(5).
SEE ALSO
svcs(1), svcadm(1M), attributes(5), smf(5)
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.
This software was built from source available at
https://java.net/projects/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/.
version 2.2.0 January, 2012 ptpd(1M)