The configuration file is divided into sections. Each section starts with a line containing its name
enclosed in brackets and it follows with settings. Each setting is placed on a separate line, it
contains the name of the option and the value separated by whitespace characters. Empty lines and lines
starting with # are ignored.
Sections that can used in the configuration file and options that can be set in them are described below.
[timemaster]ntp_program
Select which NTP implementation should be used. Possible values are chronyd and ntpd. The default
value is chronyd. Limitations of the implementations relevant to the timemaster configuration are
listed in NOTES.
rundir Specify the directory where should be generated chronyd, ntpd and ptp4l configuration files and
sockets. The directory will be created if it doesn't exist. The default value is
/var/run/timemaster.
first_shm_segment
Specify the first number in a sequence of SHM segments that will be used by ptp4l and phc2sys. The
default value is 0. Increasing the number can be useful to avoid conflicts with time sources that
are not started by timemaster, e.g. gpsd using segments number 0 and 1.
restart_processes
Enable or disable restarting of processes started by timemaster. If the option is set to a non-
zero value, all processes except chronyd and ntpd will be automatically restarted when terminated
and timemaster is running for at least one second (i.e. the process did not terminate due to a
configuration error). If a process was terminated and is not started again, timemaster will kill
the other processes and exit with a non-zero status. The default value is 1 (enabled).
use_vclocks
Enable or disable synchronization with virtual clocks. If enabled, timemaster will create virtual
clocks running on top of physical clocks needed by configured PTP domains. This enables hardware
time stamping for multiple ptp4l instances using the same network interface. The default value is
-1, which enables the virtual clocks if running on Linux 5.18 or later.
[ntp_serveraddress]
The ntp_server section specifies an NTP server that should be used as a time source. The address of the
server is included in the name of the section.
minpollmaxpoll
Specify the minimum and maximum NTP polling interval as powers of two in seconds. The default
values are 6 (64 seconds) and 10 (1024 seconds) respectively. Shorter polling intervals usually
improve the accuracy significantly, but they should be used only when allowed by the operators of
the NTP service (public NTP servers generally don't allow too frequent queries). If the NTP server
is located on the same LAN, polling intervals around 4 (16 seconds) might give best accuracy.
iburst Enable or disable sending a burst of NTP packets on start to speed up the initial synchronization.
Possible values are 1 and 0. The default value is 0 (disabled).
ntp_options
Specify extra options that should be added for this source to the server directive in the
configuration file of the selected NTP implementation. No extra options are added by default.
[ptp_domainnumber]
The ptp_domain section specifies a PTP domain that should be used as a time source. The PTP domain number
is included in the name of the section. The ptp4l instances are configured to run in the clientOnly mode.
In this section at least the interfaces option needs to be set, other options are optional.
interfaces
Specify which network interfaces should be used for this PTP domain. A separate ptp4l instance
will be started for each group of interfaces sharing the same PHC and for each interface that
supports only SW time stamping. HW time stamping is enabled automatically. If an interface with HW
time stamping is specified also in other PTP domains and virtual clocks are disabled, only the
ptp4l instance from the first PTP domain will be using HW time stamping.
ntp_poll
Specify the polling interval of the SOCK/SHM reference clock reading samples from ptp4l or
phc2sys. It's specified as a power of two in seconds. The default value is 2 (4 seconds).
phc2sys_poll
Specify the polling interval used by phc2sys to read a PTP clock synchronized by ptp4l and update
the SOCK/SHM sample for chronyd/ntpd. It's specified as a power of two in seconds. The default
value is 0 (1 second).
delay Specify the maximum assumed roundtrip delay to the primary source of the time in this PTP domain.
This value is included in the distance used by chronyd in the source selection algorithm to detect
falsetickers and assign weights for source combining. The default value is 1e-4 (100
microseconds). With ntpd, the tosmindist command can be used to set a limit with similar purpose
globally for all time sources.
ntp_options
Specify extra options that should be added for this source to the refclock or server directives in
the configuration file of the selected NTP implementation. No extra options are added by default.
ptp4l_option
Specify an extra ptp4l option specific to this PTP domain that should be added to the
configuration files generated for ptp4l. This option may be used multiple times in one ptp_domain
section.
[chronyd]path Specify the path to the chronyd binary. The default value is chronyd to search for the binary in
PATH.
options
Specify extra options that should be added to the chronyd command line. No extra options are
added by default.
[chrony.conf]
Settings specified in this section are copied directly to the configuration file generated for chronyd.
If this section is not present in the timemaster configuration file, the following setting will be added:
makestep 1 3
This configures chronyd to step the system clock in the first three updates if the offset is larger than
1 second.
[ntpd]path Specify the path to the ntpd binary. The default value is ntpd to search for the binary in PATH.
options
Specify extra options that should be added to the ntpd command line. No extra options are added by
default.
[ntp.conf]
Settings specified in this section are copied directly to the configuration file generated for ntpd. If
this section is not present in the timemaster configuration file, the following settings will be added:
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
This configures ntpd to use safe default restrictions.
[phc2sys]path Specify the path to the phc2sys binary. The default value is phc2sys to search for the binary in
PATH.
options
Specify extra options that should be added to all phc2sys command lines. By default, -l5 is
added to the command lines.
[ptp4l]path Specify the path to the ptp4l binary. The default value is ptp4l to search for the binary in PATH.
options
Specify extra options that should be added to all ptp4l command lines. By default, -l5 is added
to the command lines.
[ptp4l.conf]
Settings specified in this section are copied directly to the global section of the configuration files
generated for all ptp4l instances. There is no default content of this section.
Other sections (e.g. [unicast_master_table]) may be specified here, but lines beginning with the bracket
need to be prefixed with the > character to prevent timemaster from parsing it as a beginning of another
section.