]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
examples: improve configuration examples
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 Jan 2017 17:33:19 +0000 (18:33 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 31 Jan 2017 10:22:11 +0000 (11:22 +0100)
examples/chrony.conf.example1
examples/chrony.conf.example2
examples/chrony.conf.example3

index ab163357187e6d18cdd24ab8a538bc6a0ad8e918..5e93ea75698f465a20cfb48d76c1c967c087a971 100644 (file)
@@ -4,8 +4,8 @@ pool pool.ntp.org iburst
 # Record the rate at which the system clock gains/losses time.
 driftfile /var/lib/chrony/drift
 
-# In first three updates step the system clock instead of slew
-# if the adjustment is larger than 1 second.
+# Allow the system clock to be stepped in the first three updates
+# if its offset is larger than 1 second.
 makestep 1.0 3
 
 # Enable kernel synchronization of the real-time clock (RTC).
index 2d4421feb99649d54a612d2715de99815eacd27c..cbd065eda8ba082edade88775d98468305888736 100644 (file)
@@ -5,17 +5,24 @@ pool pool.ntp.org iburst
 # Record the rate at which the system clock gains/losses time.
 driftfile /var/lib/chrony/drift
 
-# In first three updates step the system clock instead of slew
-# if the adjustment is larger than 1 second.
+# Allow the system clock to be stepped in the first three updates
+# if its offset is larger than 1 second.
 makestep 1.0 3
 
 # Enable kernel synchronization of the real-time clock (RTC).
 rtcsync
 
+# Enable hardware timestamping on all interfaces that support it.
+#hwtimestamp *
+
+# Increase the minimum number of selectable sources required to adjust
+# the system clock.
+#minsources 2
+
 # Allow NTP client access from local network.
-#allow 192.168/16
+#allow 192.168.0.0/16
 
-# Serve time even if not synchronized to any NTP server.
+# Serve time even if not synchronized to a time source.
 #local stratum 10
 
 # Specify file containing keys for NTP authentication.
index feeb8e735e4711900faba1485fa59794b70577f9..fdc656a4d28af7f603724e90bb212ffce7f22980 100644 (file)
 
 ! pool pool.ntp.org iburst
  
-# However, for dial-up use you probably want these instead.  The word
-# 'offline' means that the server is not visible at boot time.  Use
-# chronyc's 'online' command to tell chronyd that these servers have
-# become visible after you go on-line.
-
-! server foo.example.net offline
-! server bar.example.net offline
-! server baz.example.net offline
-
-! pool pool.ntp.org offline
-
-# You may want to specify NTP 'peers' instead.  If you run a network
-# with a lot of computers and want several computers running chrony to
-# have the 'front-line' interface to the public NTP servers, you can
-# 'peer' these machines together to increase robustness.
-
-! peer foo.example.net
-
-# There are other options to the 'server' and 'peer' directives that you
-# might want to use.  For example, you can ignore measurements whose
-# round-trip-time is too large (indicating that the measurement is
-# probably useless, because you don't know which way the measurement
-# message got held up.)  Consult the full documentation for details.
-
 #######################################################################
 ### AVOIDING POTENTIALLY BOGUS CHANGES TO YOUR CLOCK
 #
 # To avoid changes being made to your computer's gain/loss compensation
 # when the measurement history is too erratic, you might want to enable
-# one of the following lines.  The first seems good for dial-up (or
-# other high-latency connections like slow leased lines), the second
-# seems OK for a LAN environment.
+# one of the following lines.  The first seems good with servers on the
+# Internet, the second seems OK for a LAN environment.
 
 ! maxupdateskew 100
 ! maxupdateskew 5
 
+# If you want to increase the minimum number of selectable sources
+# required to update the system clock in order to make the
+# synchronisation more reliable, uncomment (and edit) the following
+# line.
+
+! minsources 2
+
+# If your computer has a good stable clock (e.g. it is not a virtual
+# machine), you might also want to reduce the maximum assumed drift
+# (frequency error) of the clock (the value is specified in ppm).
+
+! maxdrift 100
+
 #######################################################################
 ### FILENAMES ETC
 # Chrony likes to keep information about your computer's clock in files.
@@ -181,13 +169,12 @@ driftfile /var/lib/chrony/drift
 # machine accesses it.  The information can be accessed by the 'clients'
 # command of chronyc.  You can disable this facility by uncommenting the
 # following line.  This will save a bit of memory if you have many
-# clients.
+# clients and it will also disable support for the interleaved mode.
 
 ! noclientlog
 
 # The clientlog size is limited to 512KB by default.  If you have many
-# clients, especially in many different subnets, you might want to
-# increase the limit. 
+# clients, you might want to increase the limit.
 
 ! clientloglimit 4194304
 
@@ -196,7 +183,7 @@ driftfile /var/lib/chrony/drift
 # clients that are sending requests too frequently, uncomment and edit
 # the following line.
 
-! limitrate interval 3 burst 8
+! ratelimit interval 3 burst 8
 
 #######################################################################
 ### REPORTING BIG CLOCK CHANGES
@@ -243,7 +230,17 @@ driftfile /var/lib/chrony/drift
 # Rate limiting can be enabled also for command packets.  (Note,
 # commands from localhost are never limited.)
 
-! cmdratelimit interval 1 burst 16
+! cmdratelimit interval -4 burst 16
+
+#######################################################################
+### HARDWARE TIMESTAMPING
+# On Linux, if the network interface controller and its driver support
+# hardware timestamping, it can significantly improve the accuracy of
+# synchronisation. It can be enabled on specified interfaces only, or it
+# can be enabled on all interfaces that support it.
+
+! hwtimestamp eth0
+! hwtimestamp *
 
 #######################################################################
 ### REAL TIME CLOCK
@@ -274,6 +271,12 @@ driftfile /var/lib/chrony/drift
 
 ! rtcdevice /dev/misc/rtc
 
+# Alternatively, if not using the -s option, this directive can be used
+# to enable a mode in which the RTC is periodically set to the system
+# time, with no tracking of its drift.
+
+! rtcsync
+
 #######################################################################
 ### REAL TIME SCHEDULER
 # This directive tells chronyd to use the real-time FIFO scheduler with the