Skip to content

Instantly share code, notes, and snippets.

@AJIOB
Created December 4, 2018 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AJIOB/bceb73f9f4f99955312c12d74766a5fc to your computer and use it in GitHub Desktop.
Save AJIOB/bceb73f9f4f99955312c12d74766a5fc to your computer and use it in GitHub Desktop.
; /etc/ptpd.conf
; ==============================================================================
; This is a recommended configuration for a PTPv2 slave
; For a full list of options run ptpd2 -H or see the documentation and man pages
; ==============================================================================
; interface has to be specified (see with ifconfig)
ptpengine:interface=enp6s0
; PTP domain
ptpengine:domain=0
;ptpengine:domain=42
; available presets are slaveonly, masteronly and masterslave (full IEEE 1588 implementation)
ptpengine:preset=masteronly
; multicast for both sync and delay requests - use hybrid for unicast delay requests
ptpengine:ip_mode=multicast
; when enabled, instead of sockets, libpcap is used to receive (sniff) and send (inject) packets.
; on low latency hardware such as 10GE NICs this can provide results close to hardware-assisted PTP
ptpengine:use_libpcap=y
; go into panic mode for 10 minutes instead of resetting the clock
ptpengine:panic_mode=y
ptpengine:panic_mode_duration=10
; uncomment this to enable outlier filters
;ptpengine:sync_outlier_filter_enable=y
;ptpengine:delay_outlier_filter_enable=y
; store observed drift in a file
clock:drift_handling=file
; update online statistics every 5 seconds
;global:statistics_update_interval=30
; wait 5 statistics intervals for one-way delay to stabilise
;ptpengine:calibration_delay=5
; log file, event log only. if timing statistics are needed, see statistics_file
global:log_file=/var/log/ptpd2.log
; log file up to 5M
global:log_file_max_size=5000
; rotate logs up to 5 files
global:log_file_max_files=5
; status file providing an overview of ptpd's operation and statistics
global:log_status=y
; required if ip_mode is set to hybrid
;ptpengine:log_delayreq_interval=0
; uncomment this to log a timing log like in previous ptpd versions
; global:statistics_file=/var/log/ptpd2.stats
; Specify log level (only messages at this priority or higer will be logged).
; The minimal level is LOG_ERR. LOG_ALL enables debug output if compiled with
; RUNTIME_DEBUG.
; Options: LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_ALL
; global:log_level = LOG_ALL
; Maximum statistics log file size (in kB) - log file will be truncated
; if size exceeds the limit. 0 - no limit.
global:statistics_file_max_size = 1000
; on multi-core systems it is recommended to bind ptpd to a single core
global:cpuaffinity_cpucore=0
; use DSCP 46 for expedited forwarding over ipv4 networks
ptpengine:ip_dscp=46
; always keep a new line in the end
; Set ptpd transport
; ipv4 => IPv4/UDP
; ethernet => Raw ethernet
ptpengine:transport=ethernet
;ptpengine:transport=ipv4
; Delay detection mode used - use DELAY_DISABLED for syntonisation only
; (no full synchronisation).
; Options: E2E P2P DELAY_DISABLED
ptpengine:delay_mechanism=P2P
; ========= newline required in the end ==========
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment