ptpd2.conf(5)
Bestie, welcome to ptpd2.conf(5) β aka the PTPd config file manual β and itβs literally the config file for the Precision Time Protocol daemon. Weβre making it make sense. β¨
π NAME π
ptpd2.conf β Precision Time Protocol daemon config file.
π CONFIGURATION FILE FORMAT π
Settings in the PTPd configuration file are grouped into sections and take the form of section:key="value" variables. The config file can either be formatted that way (preferred, slay) or in .ini file style, where a series of key="value" variables is grouped into sections using [section] headers. Every setting listed here can also be specified as a command line parameter: --section:key=value. Quotation marks are optional.
NOTE: the configuration file must end with a newline. π
π RELOADING CONFIGURATION π
Only a small number of configuration file settings β SNMP and lock file configuration β require a restart of the PTPd process to take effect. All the other settings can be changed while ptpd is running: the configuration file is reloaded and checked for changes when PTPd receives the SIGHUP signal.
When reloading configuration, PTPd will always attempt to test settings before applying them, and once itβs running it will never exit as a result of configuration errors. If it does exit during a config refresh, thatβs most likely a bug. π
π PRIORITY π
Any setting passed as a command line parameter will always take priority over the configuration file. So once ptpd is running, those settings cannot be changed β a warning will be logged on every attempt to change those settings using the configuration file. Periodt. β οΈ
π CONFIGURATION SECTIONS π
ptpengineβ PTP protocol specific configurationclockβ Clock related settingsservoβ Clock control PI servo configurationglobalβ Global configuration - logging, etc.ntpengineβ NTP control configuration
π¦ CONFIGURATION VARIABLES π¦
Here come the variables, bestie β no skipping. π«Ά
ptpengine:interface [STRING]- usage: Network interface to use β
eth0,igb0etc. (required). - default:
[none]
- usage: Network interface to use β
ptpengine:backup_interface [STRING]- usage: Backup network interface to use β
eth0,igb0etc. When no GM is available, the slave will keep alternating between primary and secondary until a GM is found. - default:
[none]
- usage: Backup network interface to use β
ptpengine:preset [SELECT]- options:
none,slaveonly,masteronly,masterslave - usage: PTP engine preset:
noneβ Defaults, no clock class restrictionsslaveonlyβ Slave only (clock class 255 only)masteronlyβ Master, passive when not best master (clock class 0..127)masterslaveβ Full IEEE 1588 implementation: Master, slave when not best master (clock class 128..254)
- default:
slaveonly - NOTE: Presets affect the following settings:
ptpengine:slave_only,clock_no_adjustandptpengine:clock_class(range and default value). To see all preset settings, runptpd2 -H(--long-help).
- options:
ptpengine:transport [SELECT]- options:
ipv4,ethernet - usage: Transport type for PTP packets. NOTE: Ethernet transport requires building with libpcap and is not supported on Solaris as of 2.3.1, and cannot be enabled on those systems unless
ptpdis compiled with--enable-experimental-options. - default:
ipv4
- options:
ptpengine:dot2as [BOOLEAN]- usage: Enable IEEE 802.1AS / AVB compatibility (
transportSpecificfield in PTP message headers). Requires Ethernet transport as this is the only mapping used by 802.1AS that PTP supports. - default:
N
- usage: Enable IEEE 802.1AS / AVB compatibility (
ptpengine:ip_mode [SELECT]- options:
multicast,unicast,hybrid - usage: IP transmission mode (requires IP transport):
multicastβ uses multicast for all messageshybridβ uses multicast for sync and announce, and unicast for delay request and responseunicastβ uses unicast for all transmission. When unicast mode is selected, destination IP(s) (ptpengine:unicast_destinations) must be configured depending on unicast negotiation setting (ptpengine:unicast_negotiation) and master or slave role (see:ptpengine:unicast_destinations)
- default:
multicast
- options:
ptpengine:unicast_negotiation [BOOLEAN]- usage: Enable unicast negotiation support using signaling messages β as used by the Telecom profile (ITU-T G.8265.1).
- default:
N
ptpengine:unicast_grant_duration [INT: 30 .. 604800]- usage: Duration (seconds) for which the transmission of unicast messages is granted by a master, or requested by a slave when unicast negotiation is used (
ptpengine:unicast_negotiation). When using PTPd with other PTP implementations, PTPd will never refuse to grant a message based on the requested duration: it will grant for 30 seconds if requested for any less than 30 seconds, and will grant for 7 days (604800) if requested for any longer. - default:
300
- usage: Duration (seconds) for which the transmission of unicast messages is granted by a master, or requested by a slave when unicast negotiation is used (
ptpengine:disable_bmca [BOOLEAN]- usage: Disable Best Master Clock Algorithm for unicast masters. Only effective for
masteronlypreset β all Announce messages will be ignored and the cock will transition directly intoMASTERstate and remain an active master. This behaviour is required for Telecom profile operation. - default:
N
- usage: Disable Best Master Clock Algorithm for unicast masters. Only effective for
ptpengine:use_libpcap [BOOLEAN]- usage: Use libpcap for sending and receiving traffic (automatically enabled in Ethernet mode). Requires building with libpcap β builds made with
--disable-pcapcannot use this feature, and as of 2.3.1, Solaris systems will not attempt to use libpcap unless compiled with--enable-experimental-options. - default:
N
- usage: Use libpcap for sending and receiving traffic (automatically enabled in Ethernet mode). Requires building with libpcap β builds made with
ptpengine:delay_mechanism [SELECT]- options:
E2E,P2P,DELAY_DISABLED - usage: Delay detection mode used β use
DELAY_DISABLEDfor syntonisation only (no synchronisation). - default:
E2E
- options:
ptpengine:domain [INT: 0 .. 127]- usage: PTP domain number.
- default:
0
ptpengine:any_domain [BOOLEAN]- usage: Usability extension: if enabled, a slave-only clock will accept masters from any domain, while preferring the configured domain, and preferring lower domain number. This option should be used for slave-only clocks and should not be used with unicast negotiation. NOTE: this behaviour is not part of the standard.
- default:
N
ptpengine:port_number [INT: 1 .. 65534]- usage: PTP port number (part of PTP Port Identity β not UDP port). For ordinary clocks (single port), the default should be used, but when running multiple instances to simulate a boundary clock, The port number can be changed.
- default:
1
ptpengine:slave_only [BOOLEAN]- usage: Slave only mode (sets clock class to 255, overriding value from preset).
- default:
Y
ptpengine:inbound_latency [INT]- usage: Specify latency correction (nanoseconds) for incoming packets.
- default:
0
ptpengine:outbound_latency [INT]- usage: Specify latency correction (nanoseconds) for outgoing packets.
- default:
0
ptpengine:offset_shift [INT]- usage: Apply an arbitrary shift (nanoseconds) to offset from master when in slave state. Value can be positive or negative β useful for correcting for of antenna latencies, delay assymetry and IP stack latencies. This will not be visible in the offset from master value β only in the resulting clock correction.
- default:
0
ptpengine:always_respect_utc_offset [BOOLEAN]- usage: Compatibility option: In slave state, always respect UTC offset announced by best master, even if the the
currrentUtcOffsetValidflag is announcedFALSE. NOTE: this behaviour is not part of the standard. - default:
N
- usage: Compatibility option: In slave state, always respect UTC offset announced by best master, even if the the
ptpengine:prefer_utc_offset_valid [BOOLEAN]- usage: Compatibility extension to BMC algorithm: when enabled, BMC for both master and save clocks will prefer masters announcing
currrentUtcOffsetValidasTRUE. NOTE: this behaviour is not part of the standard. - default:
N
- usage: Compatibility extension to BMC algorithm: when enabled, BMC for both master and save clocks will prefer masters announcing
ptpengine:require_utc_offset_valid [BOOLEAN]- usage: Compatibility option: when enabled,
ptpd2will ignore Announce messages from masters announcingcurrentUtcOffsetValidasFALSE. NOTE: this behaviour is not part of the standard. - default:
N
- usage: Compatibility option: when enabled,
ptpengine:log_announce_interval [INT: -4 .. 7]- usage: PTP announce message interval in master state. When using unicast negotiation (
ptpengine:unicast_negotiation), for slaves this is the initial (minimum) interval requested and for masters this is the minimum interval granted. (expressed as log 2 i.e.-1=0.5s,0=1s,1=2setc.) - default:
1
- usage: PTP announce message interval in master state. When using unicast negotiation (
ptpengine:log_announce_interval_max [INT: -1 .. 7]- usage: When using unicast negtiation (
ptpengine:unicast_negotiation), this is the maximum announce interval granted by a master, and the maximum interval a slave will attempt to request. (expressed as log 2 i.e.-1=0.5s,0=1s,1=2setc.) - default:
5
- usage: When using unicast negtiation (
ptpengine:announce_receipt_timeout [INT: 2 .. 255]- usage: PTP announce receipt timeout announced in master state.
- default:
6
ptpengine:announce_receipt_grace_period [INT: 0 .. 20]
β¦okay so picking right back up on the grace-period one whose header is sitting at the bottom of the last chunk π«Ά β here's the tea: it's the PTP announce receipt timeout grace period, and it does its thing in slave state. When an announce receipt timeout goes down, ptpd disqualifies the current best GM, and then it waits n times the announce receipt timeout before resetting. That's literally what buys you a seamless GM failover when your standby GMs are being slow to react π’. Set it to 0 and this option just isn't used.
default: 0
ptpengine:log_sync_interval[INT: -7 .. 7] β the PTP sync message interval when you're in master state. When unicast negotiation is on (ptpengine:unicast_negotiation): for slaves this is the initial (minimum) interval they request, and for masters it's the minimum interval they grant. (Expressed as log 2, i.e.-1=0.5s,0=1s,1=2setc.) default0.ptpengine:log_sync_interval_max[INT: -1 .. 7] β when unicast negotiation is on (ptpengine:unicast_negotiation), this is the maximum sync interval a master grants and the maximum interval a slave will even attempt to request. (Log 2 again, bestie:-1=0.5s,0=1s,1=2setc.) default5.ptpengine:log_delayreq_override[BOOLEAN] β overrides the Delay Request interval that the best master hands you π. defaultN.ptpengine:log_delayreq_auto[BOOLEAN] β automatically overrides the Delay Request interval (usingptpengine:log_delayreq_interval) whenever the value you received is127(0X7F), like in unicast messages β unless you're running unicast negotiation (ptpengine:unicast_negotiation). defaultY.ptpengine:log_delayreq_interval_initial[INT: -7 .. 7] β the delay request interval used before you receive your first delay response. (Log 2:-1=0.5s,0=1s,1=2setc.) default0.ptpengine:log_delayreq_interval[INT: -7 .. 7] β the minimum delay request interval announced in master state; in slave state it overrides the master's interval. (Log 2:-1=0.5s,0=1s,1=2setc.) With unicast negotiation (ptpengine:unicast_negotiation): for slaves this is the initial (minimum) interval requested, for masters the minimum interval granted. default0.ptpengine:log_delayreq_interval_max[INT: -1 .. 7] β with unicast negotiation (ptpengine:unicast_negotiation), this is the maximum delay request interval a master grants, and the maximum a slave will attempt to request. (Log 2:-1=0.5s,0=1s,1=2setc.) default5.ptpengine:log_peer_delayreq_interval[INT: -7 .. 7] β the minimum peer delay request message interval in peer-to-peer delay mode (log 2:-1=0.5s,0=1s,1=2setc.). With unicast negotiation (ptpengine:unicast_negotiation), this is the initial (minimum) interval a node requests from its peer, and the minimum interval granted for a peer π«±π«². default1.ptpengine:log_peer_delayreq_interval_max[INT: -1 .. 7] β with unicast negotiation (ptpengine:unicast_negotiation), this is the maximum peer delay request interval granted by a node, and the maximum a node will attempt to request from its peer. (Log 2:-1=0.5s,0=1s,1=2setc.) default5.ptpengine:foreignrecord_capacity[INT: 5 .. 10] β the foreign master record size, aka the maximum number of foreign masters. default5.ptpengine:ptp_allan_variance[INT: 0 .. 65535] β the Allan variance announced in master state. default28768.ptpengine:ptp_clock_accuracy[SELECT] β the clock accuracy range announced in master state. Your options areACC_25NS,ACC_100NS,ACC_250NS,ACC_1US,ACC_2.5US,ACC_10US,ACC_25US,ACC_100US,ACC_250US,ACC_1MS,ACC_2.5MS,ACC_10MS,ACC_25MS,ACC_100MS,ACC_250MS,ACC_1S,ACC_10S,ACC_10SPLUS,ACC_UNKNOWN. defaultACC_UNKNOWN(very "I'll figure it out later" of you π).ptpengine:utc_offset[INT] β the underlying time source UTC offset announced in master state. default0.ptpengine:utc_offset_valid[BOOLEAN] β whether that underlying time source UTC offset is valid, announced in master state. defaultN.ptpengine:time_traceable[BOOLEAN] β the underlying time source's time traceability, announced in master state. defaultN.ptpengine:frequency_traceable[BOOLEAN] β same energy, but for the underlying time source's frequency traceability, announced in master state. defaultN.ptpengine:ptp_timescale[SELECT] β optionsPTPandARB. It's the time scale announced in master state (withARB, UTC properties are ignored by slaves, just so you know π). When clock class is set to13(application specific), this value is ignored andARBis used. defaultARB.ptpengine:ptp_timesource[SELECT] β optionsATOMIC_CLOCK,GPS,TERRESTRIAL_RADIO,PTP,NTP,HAND_SET,OTHER,INTERNAL_OSCILLATOR. The time source announced in master state β. defaultINTERNAL_OSCILLATOR.ptpengine:clock_class[INT: 0 .. 255] β the clock class, announced in master state. It's always255for slave-only. The minimum, maximum and default values are controlled by presets. If you set it to13(application specific time source), the announced time scale is always set toARB, periodt. This setting also controls which states a PTP port can be in: below128, the port will only ever be inMASTERorPASSIVEstates (master only); above127, the port will be inMASTERorSLAVEstates. default255.ptpengine:priority1[INT: 0 .. 248] β Priority 1 announced in master state, used for Best Master Clock selection π. default128.ptpengine:priority2[INT: 0 .. 248] β Priority 2 announced in master state, also used for Best Master Clock selection. default128.ptpengine:max_listen[INT: min: 1] β how many consecutive protocol resets toLISTENINGyou get before a full network reset. default5.ptpengine:unicast_destinations[STRING] β an IPv4 address, or a whole list of IPv4 addresses, to be used as unicast destinations. When unicast negotiation (ptpengine:unicast_negotiation) is enabled, setting this is mandatory for slaves, because they have to know which GMs to request messages from. When unicast negotiation is disabled, setting this is mandatory for GMs, because they have to deliver messages to a pre-configured group of slaves. default[none].ptpengine:unicast_domains[STRING] β the PTP domain number for each configured unicast destination (ptpengine:unicast_destinations). Only used by slave-only clocks that use unicast destinations, so that each master can sit in a separate domain β like with Telecom Profile π. The number of entries should match the number of unicast destinations; otherwise unconfigured domains, or domains set to0, get set to the domain configured inptpengine:domain. Format is a comma, tab or space-separated list of 8-bit unsigned integers (0..255). default[none].ptpengine:unicast_local_preference[STRING] β a local preference for each configured unicast destination (ptpengine:unicast_destinations). Only used by slave-only clocks using unicast destinations, so the slave can locally influence each master's BMC selection β Telecom Profile vibes again π . The number of entries should match the number of unicast destinations; otherwise the unconfigured preference gets set to0(highest). Format is a comma, tab or space-separated list of 8-bit unsigned integers (0..255). default[none].ptpengine:unicast_peer_destination[STRING] β when you're using IP unicast mode (ptpengine:ip_mode=unicast) together with the Peer to Peer delay mechanism (ptpengine:delay_mechanism=P2P), you must configure a peer unicast destination to request the peer delay from. Format is a single unicast IPv4 address. default[none].ptpengine:management_enable[BOOLEAN] β enables handling of PTP management messages. Only GET messages get processed by default. Seeptpengine:management_set_enableπ. defaultY.ptpengine:management_set_enable[BOOLEAN] β accepts SET and COMMAND management messages. defaultN.ptpengine:igmp_refresh[BOOLEAN] β sends explicit IGMP joins between engine resets, and periodically while in master state. defaultY.ptpengine:master_igmp_refresh_interval[INT: 0 .. 255] β the periodic IGMP join interval (seconds) in master state when running IPv4 multicast. When it's set below10, or whenptpengine:igmp_refreshis disabled, this setting has no effect π«₯. default60.ptpengine:multicast_ttl[INT: 1 .. 64] β multicast time to live for multicast PTP packets (ignored and set to1for peer to peer messages). default64.ptpengine:ip_dscp[INT: 0 .. 63] β the DiffServ Codepoint for packet prioritisation (decimal). When it's set to zero, this option isn't used. Use46for Expedited Forwarding (0x2e) π₯. default0.ptpengine:sync_stat_filter_enable[BOOLEAN] β okay so this is exactly where our chunk runs out π the rest of this one (its usage and its default) is waiting for you in part three, bestie β go go go πββοΈπ¨- usage β flips on the statistical filter for Sync messages. default
Nπ΄ (so like, off unless you say otherwise)
ptpengine:sync_stat_filter_type [SELECT]β which flavor of filtering we're doing on Sync messages, bestie. pick one:- options:
nonemeanminmaxabsminabsmaxmedian noneβ no filtering at all, pure pass-through, the vibe is "I trust the packets" π«Άmeanβ mean (average); smooths things out but lowkey gets dragged around by outliers πminβ the minimal value; iconic when packet delay variation is high (we call those "lucky packets" β¨)maxβ the maximal value; perfect for testing worst-case scenarios πabsminβ absolute minimum, i.e. the value closest to zero. also great for test purposes π§ͺabsmaxβ absolute maximun value farthest away from zero πmedianβ median (middle value); more robust thanmean, and not influenced by outliers πΈ- default
min
- options:
ptpengine:sync_stat_filter_window [INT: 3 .. 128]β how many samples the Sync statistical filter chews on. default4πptpengine:sync_stat_filter_window_type [SELECT]β how the sampling window behaves for the Sync statistical filter:- options:
slidinginterval slidingβ sliding window; a value comes out every time the filter runs, which can result in duplicates πintervalβ only output a value every n-th sample (full window); independent sampling periods π- default
sliding
- options:
ptpengine:delay_stat_filter_enable [BOOLEAN]β turns on the statistical filter for Delay messages. defaultNptpengine:delay_stat_filter_type [SELECT]β the filter type used for Delay message filtering, same menu as before:- options:
nonemeanminmaxabsminabsmaxmedian noneβ no filtering, pass-through, we're raw-dogging the data πmeanβ mean (average); smooth results but influenced by outliersminβ minimal value; useful for high packet delay variation ("lucky packets")maxβ maximal value; useful for testing worst case scenariosabsminβ absolute minimum, value closest to zero. also useful for test purposesabsmaxβ absolute maximun value farthest away from zeromedianβ median (middle value); more robust thanmean, not influenced by outliers- default
min
- options:
ptpengine:delay_stat_filter_window [INT: 3 .. 128]β number of samples used for the Delay statistical filter. default4πptpengine:delay_stat_filter_window_type [SELECT]β sampling window behaviour for the Delay statistical filter:- options:
slidinginterval slidingβ sliding window; a value is output every time the filter runs, which can result in duplicatesintervalβ only output a value every n-th sample (full window); independent sampling periods- default
sliding
- options:
ptpengine:delay_outlier_filter_enable [BOOLEAN]β enables the outlier filter for the Delay Response component, but only in slave state. defaultNπ¦ptpengine:delay_outlier_filter_action [SELECT]β what we do with Delay Response outliers:- options:
discardfilter - if set to
filter, outliers are replaced with moving average π«Ά - default
discard
- options:
ptpengine:delay_outlier_filter_capacity [INT: 4 .. 60]β number of samples in the Delay Response outlier filter buffer. default20ptpengine:delay_outlier_filter_threshold [FLOAT: 0.001000 .. 1000.000000]β Delay Response outlier filter threshold: the multiplier for Peirce's maximum standard deviation. set it below1.0and the filter is tighter, set it above1.0and the filter is looser than the standard Peirce's test. default1.000000βptpengine:delay_outlier_filter_always_filter [BOOLEAN]β always run the Delay Response outlier filter, even if the clock is being slewed at maximum rate. defaultNptpengine:delay_outlier_filter_autotune_enable [BOOLEAN]β enables automatic threshold control for the Delay Response outlier filter. defaultY(yes bestie, this one's on by default π)ptpengine:delay_outlier_filter_autotune_minpercent [INT: 0 .. 99]β Delay Response outlier filter autotune low watermark: the minimum percentage of discarded samples in the update period before the filter gets tightened by the autotune step value. default20ptpengine:delay_outlier_filter_autotune_maxpercent [INT: 1 .. 100]β Delay Response outlier filter autotune high watermark: the maximum percentage of discarded samples in the update period before the filter gets loosened by the autotune step value. default95ptpengine:delay_outlier_filter_autotune_step [FLOAT: 0.010000 .. 10.000000]β the value the Delay Response outlier filter threshold is increased or decreased by when auto-tuning. default0.100000ptpengine:delay_outlier_filter_autotune_minthreshold [FLOAT: 0.010000 .. 10.000000]β minimum Delay Response filter threshold value used when auto-tuning. default0.100000ptpengine:delay_outlier_filter_autotune_maxthreshold [FLOAT: 0.010000 .. 10.000000]β maximum Delay Response filter threshold value used when auto-tuning. default5.000000ptpengine:delay_outlier_weight [FLOAT: 0.010000 .. 2.000000]β Delay Response outlier weight: if an outlier is detected, this decides the amount of its deviation from mean that's used to build the standard deviation statistics and influence further outlier detection. when set to1.0, the outlier is used as is. default1.000000
ptpengine:delay_outlier_filter_stepdetect_enable [BOOLEAN]β enables Delay Response filter step detection (delaySM) to block when a certain level is exceeded. defaultNπptpengine:delay_outlier_filter_stepdetect_threshold [INT: 50000 .. 999999999]β Delay step detection threshold. step detection is only performed whendelaySMis below this threshold (nanoseconds). default1000000ptpengine:delay_outlier_filter_stepdetect_level [INT: 50000 .. 999999999]β Delay step level. when step detection is enabled and operational,delaySMabove this level (nanoseconds) is considered a clock step and updates are paused. default500000ptpengine:delay_outlier_filter_stepdetect_credit [INT: 50 .. 1000]β initial credit (number of samples) the Delay step detection filter can block for. when credit is exhausted, the filter stops blocking. credit is gradually restored (seeptpengine:delay_outlier_filter_stepdetect_credit_increment). default200ptpengine:delay_outlier_filter_stepdetect_credit_increment [INT: 1 .. 100]β amount of credit for the Delay step detection filter restored every full sample window. default10
ptpengine:sync_outlier_filter_enable [BOOLEAN]β enables the outlier filter for the Sync component, in slave state. defaultNπptpengine:sync_outlier_filter_action [SELECT]β what happens to Sync outliers:- options:
discardfilter - if set to
filter, outliers are replaced with moving average πΈ - default
discard
- options:
ptpengine:sync_outlier_filter_capacity [INT: 4 .. 60]β number of samples in the Sync outlier filter buffer. default20ptpengine:sync_outlier_filter_threshold [FLOAT: 0.001000 .. 1000.000000]β Sync outlier filter threshold: multiplier for the Peirce's maximum standard deviation. below1.0= tighter filter, above1.0= looser than the standard Peirce's test. default1.000000β¨ptpengine:sync_outlier_filter_always_filter [BOOLEAN]β always run the Sync outlier filter, even if the clock is being slewed at maximum rate. defaultNptpengine:sync_outlier_filter_autotune_enable [BOOLEAN]β enables automatic threshold control for the Sync outlier filter. defaultYπptpengine:sync_outlier_filter_autotune_minpercent [INT: 0 .. 99]β Sync outlier filter autotune low watermark: minimum percentage of discarded samples in the update period before the filter is tightened by the autotune step value. default20ptpengine:sync_outlier_filter_autotune_maxpercent [INT: 1 .. 100]β Sync outlier filter autotune high watermark: maximum percentage of discarded samples in the update period before the filter is loosened by the autotune step value. default95ptpengine:sync_outlier_filter_autotune_step [FLOAT: 0.010000 .. 10.000000]β the value the Sync outlier filter threshold is increased or decreased by when auto-tuning. default0.100000ptpengine:sync_outlier_filter_autotune_minthreshold [FLOAT: 0.010000 .. 10.000000]β minimum Sync filter threshold value used when auto-tuning. default0.100000ptpengine:sync_outlier_filter_autotune_maxthreshold [FLOAT: 0.010000 .. 10.000000]β β¦ π§
Wrapping up that filter-threshold entry: usage β Maximum Sync filter threshold value used when auto-tuning; default β 5.000000.
ptpengine:sync_outlier_weight[FLOAT: 0.010000 .. 2.000000]β bestie, this is the outlier weight: if an outlier is detected, this value determines the amount of its deviation from mean that is used to build the standard deviation statistics and influence further outlier detection. When set to1.0, the outlier is used as is.- default:
1.000000
- default:
ptpengine:sync_outlier_filter_stepdetect_enable[BOOLEAN]β Enable Sync filter step detection (delayMS) to block when certain level exceeded.- default:
N
- default:
ptpengine:sync_outlier_filter_stepdetect_threshold[INT: 50000 .. 999999999]β Sync step detection threshold. Step detection is performed only whendelayMSis below this threshold (nanoseconds).- default:
1000000
- default:
ptpengine:sync_outlier_filter_stepdetect_level[INT: 50000 .. 999999999]β Sync step level. When step detection enabled and operational,delayMSabove this level (nanoseconds) is considered a clock step and updates are paused.- default:
500000
- default:
ptpengine:sync_outlier_filter_stepdetect_credit[INT: 50 .. 1000]β Initial credit (number of samples) the Sync step detection filter can block for. When credit is exhausted, filter stops blocking. Credit is gradually restored (seeptpengine:sync_outlier_filter_stepdetect_credit_increment).- default:
200
- default:
ptpengine:sync_outlier_filter_stepdetect_credit_increment[INT: 1 .. 100]β Amount of credit for the Sync step detection filter restored every full sample window.- default:
10
- default:
ptpengine:sync_sequence_checking[BOOLEAN]β When enabled, Sync messages will only be accepted if sequence ID is increasing. note: This can cause the slave to temporarily lock up if GM restarts before announce timeout, so this is limited to50consecutive sequence errors. Alternatively,ptpengine:clock_update_timeoutcan be used to reset the slave beforehand.- default:
N
- default:
ptpengine:clock_update_timeout[INT: 0 .. 3600]β If set to non-zero, time (seconds) before slave is reset back intoPTP_LISTENING, if there were no clock updates. This is useful for situations where slave is inSLAVEstate (receiving Announce) but is not receiving or not accepting Sync messages.- default:
0
- default:
ptpengine:calibration_delay[INT: 0 .. 300]β Delay between moving to slave state and enabling clock updates (seconds). This allows mean path delay to stabilise before starting clock updates. Activated when going into slave state and during slave's GM failover.0- not used.- default:
0
- default:
ptpengine:idle_timeout[INT: 10 .. 3600]β PTP idle timeout (seconds): if PTPd is inSLAVEstate and there have been no clock updates for this amount of time, PTPd releases clock control.- default:
0
- default:
ptpengine:panic_mode[BOOLEAN]β Enable panic mode: when offset from master is above1second, stop updating the clock for a period of time and then step the clock if offset remains above1second.- default:
N
- default:
ptpengine:panic_mode_duration[INT: 1 .. 60]β Duration (minutes) of the panic mode period (no clock updates) when offset above1second detected.- default:
2
- default:
ptpengine:panic_mode_release_clock[BOOLEAN]β When entering panic mode, release clock control while panic mode lasts. If not set, PTP will hold clock control during panic mode. If set together withntpengine:*configured, this will fail over to NTP.- default:
N
- default:
ptpengine:panic_mode_exit_threshold[INT: 0 .. 999999999]β Do not exit panic mode until offset drops below this value (nanoseconds).0= not used.- default:
0
- default:
ptpengine:pid_as_clock_identity[BOOLEAN]β Use PTPd's process ID as the middle part of the PTP clock ID - useful for running multiple instances.- default:
N
- default:
ptpengine:ntp_failover[BOOLEAN]β Fail over to NTP when PTP time sync not available - requiresntpengine:enabled, but does not require the rest of NTP configuration: will warn instead of failing over if cannot controlntpd.- default:
N
- default:
ptpengine:ntp_failover_timeout[INT: 0 .. 1800]β NTP failover timeout in seconds: time between PTP slave going intoLISTENINGstate, and failing over to NTP.0= fail over immediately. This setting controls the time provider election hold time.- default:
60
- default:
ptpengine:prefer_ntp[BOOLEAN]β Prefer NTP time synchronisation. Only use PTP when NTP not available. Could be used when NTP runs with a local GPS receiver or another hardware reference.- default:
N
- default:
ptpengine:panic_mode_ntp[BOOLEAN]β Deprecated as of2.3.1, but still supported: seeptppengine:panic_mode_release_clock.- default:
N
- default:
ptpengine:sigusr2_clears_counters[BOOLEAN]β Clear counters after dumping all counter values onSIGUSR2.- default:
N
- default:
ptpengine:timing_acl_permit[STRING]β Permit access control list for timing and signaling messages. Format is a series of network prefixes and/or IP addresses separated by commas, spaces, tabs or semicolons. Accepted format is CIDR notation (a.b.c.d/mm), single IP address (a.b.c.d), or full network/mask (a.b.c.d/m.m.m.m). Shortcuts can be used:172.16/12is expanded to172.16.0.0/12;192.168/255.255is expanded to192.168.0.0/255.255.0.0, etc. The match is performed on the source IP address of the incoming messages. IP access lists are only supported when using the IP transport.- default:
[none]
- default:
ptpengine:timing_acl_deny[STRING]β Deny access control list for timing and signaling messages. Format is a series of network prefixes and/or IP addresses separated by commas, spaces, tabs or semicolons. Accepted format is CIDR notation (a.b.c.d/mm), single IP address (a.b.c.d), or full network/mask (a.b.c.d/m.m.m.m). Shortcuts can be used:172.16/12is expanded to172.16.0.0/12;192.168/255.255is expanded to192.168.0.0/255.255.0.0, etc. The match is performed on the source IP address of the incoming messages. IP access lists are only supported when using the IP transport.- default:
[none]
- default:
ptpengine:management_acl_permit[STRING]β Permit access control list for management messages. Format is a series of network prefixes and/or IP addresses separated by commas, spaces, tabs or semicolons. Accepted format is CIDR notation (a.b.c.d/mm), single IP address (a.b.c.d), or full network/mask (a.b.c.d/m.m.m.m). Shortcuts can be used:172.16/12is expanded to172.16.0.0/12;192.168/255.255is expanded to192.168.0.0/255.255.0.0, etc. The match is performed on the source IP address of the incoming messages. IP access lists are only supported when using the IP transport.- default:
[none]
- default:
ptpengine:management_acl_deny[STRING]β Deny access control list for management messages. Format is a series of network prefixes and/or IP addresses separated by commas, spaces, tabs or semicolons. Accepted format is CIDR notation (a.b.c.d/mm), single IP address (a.b.c.d), or full network/mask (a.b.c.d/m.m.m.m). Shortcuts can be used:172.16/12is expanded to172.16.0.0/12;192.168/255.255is expanded to192.168.0.0/255.255.0.0, etc. The match is performed on the source IP address of the incoming messages. IP access lists are only supported when using the IP transport.- default:
[none]
- default:
ptpengine:timing_acl_order[SELECT]- options:
permit-deny,deny-permit - usage: Order in which permit and deny access lists are evaluated for timing and signaling messages, the evaluation process is the same as for Apache httpd. See:
http://httpd.apache.org/docs/current/mod/mod_access_compat.html#order - default:
deny-permit
- options:
ptpengine:management_acl_order[SELECT]- options:
permit-deny,deny-permit - usage: Order in which permit and deny access lists are evaluated for management messages, the evaluation process is the same as for Apache httpd. See:
http://httpd.apache.org/docs/current/mod/mod_access_compat.html#order - default:
deny-permit
- options:
clock:no_adjust[BOOLEAN]β Do not adjust the clock.- default:
N
- default:
clock:no_reset[BOOLEAN]β Do not reset the clock - only slew.- default:
N
- default:
clock:step_startup_force[BOOLEAN]β Force clock step on first sync after startup regardless of offset andclock:no_reset.- default:
N
- default:
clock:step_startup[BOOLEAN]β Step clock on startup only if offset >=1second, ignoring panic mode andclock:no_reset.- default:
N
- default:
clock:set_rtc_on_step[BOOLEAN]
usage β attempt to set the RTC any time the clock gets stepped (Linux only, mwah π β FreeBSD already does this for us).
β οΈ WARNING: this will always set the RTC to the OS clock time, no matter what time zones are doing, so it assumes the RTC runs in UTC or otherwise on the same timescale as PTP. True at least on most single-boot x86 Linux systems, iykyk.
defaultβN
clock:drift_handling [SELECT]
optionsβreset,preserve,fileusageβ the method for handling observed drift between servo restarts, bestie:resetβ set it to zero (not recommended π©)preserveβ use the kernel valuefileβ load/save to the drift file on startup/shutdown, and use the kernel value in between. To specify the drift file, use theclock:drift_filesetting.
defaultβpreserve
clock:drift_file [STRING]
usageβ specifies the drift file ποΈdefaultβ/etc/ptpd2_kernelclock.drift
clock:leap_seconds_file [STRING]
usageβ specifies where the leap second file lives (an up-to-date version can be downloaded fromhttp://www.ietf.org/timezones/data/leap-seconds.listβ¨). When it's configured, the PTP master uses data from this file to announce leap flags and the UTC offset, overriding the OS info, and the PTP slave uses data from this file plus the info the GM supplies. If it's configured, this file is always reloaded on configuration reload (SIGHUP), reloaded on clock step, and reloaded after a leap second event, so the info stays up to date, fr fr. As of ptpd 2.3.1 the file is bundled with ptpd and gets installed into(prefix)/share/ptpd/leap-seconds.list.ddMMMyyyy, whereddMMMyyyyis the leap seconds file expiry date ποΈdefaultβ[none]
clock:leap_second_pause_period [INT: 5 .. 600]
usageβ the time (in seconds) before and after midnight during which clock updates get suspended while a leap second event is happening. The total pause is twice whatever you configure here. Clock updates are suspended when a leap second event is pending and the time to midnight is less than or equal to this value, and they resume no earlier than this value after midnight βΈοΈ. They come back in a controlled way β after a control message, like a PTP announce. That's what makes sure the updated UTC offset is received before any more clock updates happen, no cap.defaultβ5
clock:leap_second_notice_period [INT: 3600 .. 86400]
usageβ how many seconds before midnight PTPd starts announcing the leap second when it's running as master π£. The IEEE 1588 standard suggests 12 hours notice and that's the default, but you can change it for more flexibility.defaultβ43200
clock:leap_second_handling [SELECT]
optionsβaccept,ignore,step,smearusageβ clock sync behaviour during leap second events:acceptβ inform the OS kernel about the leap second and let the kernel insert or delete itignoreβ don't inform the kernel β this ends up with a+/-1-second offset which then gets slewed back downstepβ don't inform the kernel, and step the clock immediately after the leap second eventsmearβ gradually introduce an extra offset over a period of time before the leap second event, which accumulates to+/-1second (seeclock:leap_second_smear_period). Once the clock stabilises, this results in a clock frequency shift which gets taken off after the event. Once the leap second event is over, the extra offset is also removed and time is back in line with master time π
defaultβaccept
clock:leap_second_smear_period [INT: 3600 .. 86400]
usageβ whenclock:leap_second_handlingis set tosmear, this setting defines the period (in seconds) before the leap second event over which the leap second offset is gradually added. Example: when set to 24 hours (86400), an extra+/-11.5microseconds is added every second (that's an11.5ppm clock frequency offset) π§defaultβ86400
clock:max_offset_ppm [INT: 500 .. 1000]
usageβ the maximum absolute frequency shift that can be applied to the clock servo when slewing the clock, expressed in parts per million (1ppm = a shift of1us per second). Values above512will use the tick duration correction to allow even faster slewing. Default maximum is512without using tick.defaultβ500
servo:delayfilter_stiffness [INT]
usageβ Mean Path Delay filter stiffness.defaultβ6
servo:kp [FLOAT: min: 0.000001 ]
usageβ clock servo PI controller proportional component gain (kP).defaultβ0.100000
servo:ki [FLOAT: min: 0.000001 ]
usageβ clock servo PI controller integral component gain (kI).defaultβ0.001000
servo:dt_method [SELECT]
optionsβnone,constant,measuredusageβ how the servo update interval (delta t) gets calculated:noneβ servo not corrected for update interval (dt always1)constantβ a constant value (the target servo update rate) β the sync interval for PTPmeasuredβ the servo measures how often it's updated and uses this interval
defaultβconstant
servo:dt_max [FLOAT: 1.500000 .. 100.000000]
usageβ maximum servo update interval (delta t) when using the measured servo update interval (servo:dt_method=measured), specified as a sync interval multiplier.defaultβ5.000000
servo:stability_detection [BOOLEAN]
usageβ enables clock synchronisation servo stability detection (based on the standard deviation of the observed drift value) π¦ β drift gets saved to the drift file / cached when it's considered stable, and clock stability status gets logged too.defaultβN
servo:stability_threshold [FLOAT: 1.000000 .. 10000.000000]
usageβ specifies the observed drift standard deviation threshold in parts per billion (ppb) β if the standard deviation is within the threshold, the servo is considered stable β¨defaultβ5.000000
servo:stability_period [INT: 1 .. 100]
usageβ specifies for how many statistics update intervals the observed drift standard deviation has to stay within the threshold to be considered stable.defaultβ3
servo:stability_timeout [INT: 1 .. 60]
usageβ specifies after how many minutes without stabilisation the servo is considered unstable. Helps with logging servo stability info, and lets you preserve observed drift if the servo can't stabilise πdefaultβ10
servo:max_delay [INT: 0 .. 999999999]
usageβ don't accept master to slave delay (delayMSβ from the Sync message) or slave to master delay (delaySMβ from the Delay Response message) if it's greater than this value (nanoseconds).0= not used.defaultβ0
servo:max_delay_max_rejected [INT: min: 0 ]
usageβ the maximum number of consecutive rejected delay measurements exceeding the maxDelay threshold (servo:max_delay) before the slave gets reset.0= not checked.defaultβ0
servo:max_delay_stable_only [BOOLEAN]
usageβ ifservo:max_delayis set, perform the check only if the clock servo has stabilised.defaultβN
servo:max_offset [INT: 0 .. 999999999]
usageβ don't reset the clock if the offset from master is greater than this value (nanoseconds).0= not used.defaultβ0
global:enable_snmp [BOOLEAN]
usageβ enable the SNMP agent (if compiled withPTPD_SNMP).defaultβN
global:use_syslog [BOOLEAN]
usageβ send log messages to syslog. Disabling this sends all messages to stdout (or to the specified log file) π«ΆdefaultβN
global:lock_file [STRING]
usageβ lock file location.defaultβ[none]
global:auto_lockfile [BOOLEAN]
usageβ use a mode-specific and interface-specific lock file (this overridesglobal:lock_file).defaultβN
global:lock_directory [STRING]
usageβ lock file directory: used with automatic mode-specific lock files, and also used when no lock file is specified. When a lock file is specified, it's expected to be an absolute path.defaultβ/var/run
global:ignore_lock [BOOLEAN]
usageβ skip lock file checking and locking entirely.defaultβN
global:quality_file [STRING]
usageβ the file used to record data about sync packets. Recording is enabled whenever this is set πdefaultβ[none]
global:quality_file_max_size [INT: min: 0 ]
usageβ maximum sync packet record file size (in kB) β the file gets truncated if the size exceeds the limit.0= no limit.defaultβ0
global:quality_file_max_files [INT: 0 .. 100]
usageβ enable log rotation of the sync packet record file up to n files.0= do not rotate.defaultβ0
global:quality_file_truncate [BOOLEAN]
(stick around, bestie β this one's deets drop in the next bit π )
okay bestie, last little crumb of that sync packet record file truncate setting before we move on β donβt worry, weβre still slaying π
usageβ Truncate the sync packet record file every time it is (re) opened: startup and SIGHUP. default:N.
now the status/log era begins, and honestly? itβs giving observability π
global:status_file[STRING]β usage: File used to log ptpd2 status information. default:/var/run/ptpd2.statusglobal:log_status[BOOLEAN]β usage: Enable / disable writing status information to file. default:Nglobal:status_update_interval[INT: 1 .. 30]β usage: Status file update interval in seconds. default:1global:log_file[STRING]β usage: Specify log file path (event log). Setting this enables logging to file. default:[none]global:log_file_max_size[INT: min: 0 ]β usage: Maximum log file size (in kB) - log file will be truncated if size exceeds the limit.0- no limit. default:0global:log_file_max_files[INT: 0 .. 100]β usage: Enable log rotation of the sync packet record file up to n files.0- do not rotate. default:0global:log_file_truncate[BOOLEAN]β usage: Truncate the log file every time it is (re) opened: startup and SIGHUP. default:Nglobal:log_level[SELECT]β usage: Specify log level (only messages at this priority or higer will be logged). The minimal level isLOG_ERR.LOG_ALLenables debug output if compiled withRUNTIME_DEBUG. options:LOG_ERR,LOG_WARNING,LOG_NOTICE,LOG_INFO,LOG_ALL. default:LOG_ALLglobal:statistics_file[STRING]β usage: Specify statistics log file path. Setting this enables logging of statistics, but can be overriden withglobal:log_statistics. default:[none]global:statistics_log_interval[INT: min: 0 ]β usage: Log timing statistics every n seconds for Sync and Delay messages (0- log all). default:0global:statistics_file_max_size[INT: min: 0 ]β usage: Maximum statistics log file size (in kB) - log file will be truncated if size exceeds the limit.0- no limit. default:0global:statistics_file_max_files[INT: 0 .. 100]β usage: Enable log rotation of the statistics file up to n files.0- do not rotate. default:0global:statistics_file_truncate[BOOLEAN]β usage: Truncate the statistics file every time it is (re) opened: startup and SIGHUP. default:Nglobal:dump_packets[BOOLEAN]β usage: Dump the contents of every PTP packet. default:Nglobal:verbose_foreground[BOOLEAN]β usage: Run in foreground with statistics and all messages logged to stdout. Overrides log file and statistics file settings and disables syslog. default:Nglobal:foreground[BOOLEAN]β usage: Run in foreground - ignored whenglobal:verbose_foregroundis set. default:Nglobal:log_statistics[BOOLEAN]β usage: Log timing statistics for every PTP packet received. Output is in CSV format and field headers are always printed when starting or refreshing the statistics log. default:Nglobal:statistics_timestamp_format[SELECT]β usage: Timestamp format used when logging timing statistics (whenglobal:log_statisticsis enabled):datetimeβ Formatted date and time:YYYY-MM-DD hh:mm:ss.uuuuuuunixβ Unix timestamp with nanoseconds:s.nsbothβ Formatted date and time followed by unix timestamp (adds one extra field to the log) options:datetime,unix,both. default:datetime
global:periodic_updates[BOOLEAN]β usage: Log a status update every time statistics are updated (global:statistics_update_interval). This update is written to the main log target. Status updates are logged even if ptpd is configured without support for statistics. default:Nglobal:cpuaffinity_cpucore[INT: -1 .. 255]β usage: Bind ptpd2 process to a selected CPU core number.0= first CPU core, etc.-1= do not bind to a single core. default:0global:statistics_update_interval[INT: 1 .. 60]β usage: Clock synchronisation statistics update interval in seconds. Also controls how often periodic status information is logged (when usingglobal:statistics_update_interval). default:30global:timingdomain_election_delay[INT: 0 .. 3600 ]β usage: Delay (seconds) before releasing a time service (NTP or PTP) and electing a new one to control a clock.0= elect immediately. default:15ntpengine:enabled[BOOLEAN]β usage: Enable NTPd integration. default:Nntpengine:control_enabled[BOOLEAN]β usage: Enable control over local NTPd daemon. default:Nntpengine:check_interval[INT: 5 .. 600]β usage: NTP control check interval in seconds. default:15ntpengine:key_id[INT: 0 .. 65535]β usage: NTP key number - must be configured as a trusted control key inntp.conf, and be non-zero for thentpengine:control_enabledsetting to take effect. default:0ntpengine:key[STRING]β usage: NTP key (plain text, max.20characters) - must match the key configured in ntpd's keys file, and must be non-zero for thentpengine:control_enabledsetting to take effect. default:[none]
π BUGS π
okay so real talk: configuration file support has only been introduced in version 2.3. There may still be some inconsistencies in the way some settings are parsed, and while order should not make any difference, for some complex behaviours it may still be the case. π
Please report any bugs using the bug tracker on the SourceForge page: http://sourceforge.net/projects/ptpd/
π SEE ALSO π
ptpd2(8)β yes bestie, go read the big one too π
π AUTHORS π
Steven Kreuzer <skreuzer@freebsd.org>Gael Mace <gael_mace@users.sourceforge.net>George Neville-Neil <gnn@freebsd.org>Wojciech Owczarek <wojciech@owczarek.co.uk>Alexandre Van Kempen
ptpd2.conf(5) man page first written by Wojciech Owczarek for ptpd 2.3.0 in November 2013
and thatβs the whole page, bestie π this beauty is from version 2.3.1, dated June, 2015, and itβs the ptpd2.conf(5) page. periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: ptpd 2.3.1-bp160.1.9 Β· BSD-3-Clause
- opensuse-leap 16.0: ptpd 2.3.1-bp160.1.9 Β· BSD-3-Clause
- opensuse-leap 16.0: ptpd 2.3.1-bp160.1.9 Β· BSD-3-Clause
- opensuse-leap 16.0: ptpd 2.3.1-bp160.1.9 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms