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