]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-timesyncd.service.xml
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / man / systemd-timesyncd.service.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7
8 Copyright © 2014 Kay Sievers
9 -->
10
11 <refentry id="systemd-timesyncd.service" conditional='ENABLE_TIMESYNCD'>
12
13 <refentryinfo>
14 <title>systemd-timesyncd.service</title>
15 <productname>systemd</productname>
16
17 <authorgroup>
18 <author>
19 <contrib>Developer</contrib>
20 <firstname>Kay</firstname>
21 <surname>Sievers</surname>
22 <email>kay@vrfy.org</email>
23 </author>
24 </authorgroup>
25 </refentryinfo>
26
27 <refmeta>
28 <refentrytitle>systemd-timesyncd.service</refentrytitle>
29 <manvolnum>8</manvolnum>
30 </refmeta>
31
32 <refnamediv>
33 <refname>systemd-timesyncd.service</refname>
34 <refname>systemd-timesyncd</refname>
35 <refpurpose>Network Time Synchronization</refpurpose>
36 </refnamediv>
37
38 <refsynopsisdiv>
39 <para><filename>systemd-timesyncd.service</filename></para>
40 <para><filename>/usr/lib/systemd/systemd-timesyncd</filename></para>
41 </refsynopsisdiv>
42
43 <refsect1>
44 <title>Description</title>
45
46 <para><filename>systemd-timesyncd</filename> is a system service
47 that may be used to synchronize the local system clock with a
48 remote Network Time Protocol server. It also saves the local time
49 to disk every time the clock has been synchronized and uses this
50 to possibly advance the system realtime clock on subsequent
51 reboots to ensure it monotonically advances even if the system
52 lacks a battery-buffered RTC chip.</para>
53
54 <para>The <filename>systemd-timesyncd</filename> service
55 specifically implements only SNTP. This minimalistic
56 service will set the system clock for large offsets or
57 slowly adjust it for smaller deltas. More complex use
58 cases are not covered by <filename>systemd-timesyncd</filename>.</para>
59
60 <para>The NTP servers contacted are determined from the global
61 settings in
62 <citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
63 the per-link static settings in <filename>.network</filename>
64 files, and the per-link dynamic settings received over DHCP. See
65 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
66 for more details.</para>
67
68 <para><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
69 <command>set-ntp</command> command may be used to enable and
70 start, or disable and stop this service.</para>
71
72 <para><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
73 <command>timesync-status</command> or <command>show-timesync</command> command can be used to show the
74 current status of this service.</para>
75 </refsect1>
76
77 <refsect1>
78 <title>Files</title>
79
80 <variablelist>
81 <varlistentry>
82 <term><filename>/var/lib/systemd/timesync/clock</filename></term>
83
84 <listitem>
85 <para>The modification time of this file indicates the timestamp of the last successful
86 synchronization (or at least the systemd build date, in case synchronization was not
87 possible).</para>
88 </listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term><filename>/run/systemd/timesync/synchronized</filename></term>
93
94 <listitem>
95 <para>A file that is touched on each successful synchronization, to assist
96 <filename>systemd-time-wait-sync</filename> and other applications to detecting synchronization
97 events.</para>
98 </listitem>
99
100 </varlistentry>
101 </variablelist>
102 </refsect1>
103
104 <refsect1>
105 <title>See Also</title>
106 <para>
107 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
108 <citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
111 <citerefentry><refentrytitle>systemd-time-wait-sync.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
112 <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
114 <citerefentry project='man-pages'><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>
115 </para>
116 </refsect1>
117
118 </refentry>