]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: add explanations of show-timesync and timesync-status commands 8644/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 30 Apr 2018 13:42:40 +0000 (22:42 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 3 May 2018 09:07:58 +0000 (18:07 +0900)
man/rules/meson.build
man/systemd-timesyncd.service.xml
man/timedatectl.xml

index b0919b9d441b63812cdd9ed971db15262de7386f..6b07cfc4feb8eb339dcf1834ab98f58165e3f16c 100644 (file)
@@ -706,7 +706,7 @@ manpages = [
  ['systemd.unit', '5', [], ''],
  ['sysusers.d', '5', [], 'ENABLE_SYSUSERS'],
  ['telinit', '8', [], ''],
- ['timedatectl', '1', [], 'ENABLE_TIMEDATED'],
+ ['timedatectl', '1', [], 'ENABLE_TIMEDATECTL'],
  ['timesyncd.conf', '5', ['timesyncd.conf.d'], 'ENABLE_TIMESYNCD'],
  ['tmpfiles.d', '5', [], ''],
  ['udev', '7', [], ''],
index 49e00e2b916523903902f5dee576aa6ca58e3e7f..b5eb8a4ac2420b79bf9e5821c9a6abcfe9578d29 100644 (file)
     <para><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
     <command>set-ntp</command> command may be used to enable and
     start, or disable and stop this service.</para>
+
+    <para><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
+    <command>timesync-status</command> or <command>show-timesync</command> command can be used to show the
+    current status of this service.</para>
   </refsect1>
 
   <refsect1>
index 02b86b6641ee5ce241aad8cf123d5f13d998b1d3..b6caa5458ddc1eff053c08c8e151058ad16f833e 100644 (file)
@@ -10,7 +10,7 @@
   Copyright 2012 Lennart Poettering
 -->
 
-<refentry id="timedatectl" conditional='ENABLE_TIMEDATED'
+<refentry id="timedatectl" conditional='ENABLE_TIMEDATECTL'
   xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     to initialize the system time zone for mounted (but not booted)
     system images.</para>
+
+    <para><command>timedatectl</command> may be used to show the current status of
+    <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+    </para>
+
   </refsect1>
 
   <refsect1>
         clock.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>--monitor</option></term>
+
+        <listitem><para>If <command>timesync-status</command> is invoked and this option is passed,
+        then <command>timedatectl</command> monitors the status of
+        <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+        and updates the outputs. Use Ctrl-C to terminate the monitoring.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-a</option></term>
+        <term><option>-all</option></term>
+
+        <listitem><para>When showing properties of
+        <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+        show all properties regardless of whether they are set or not.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-p</option></term>
+        <term><option>--property=</option></term>
+
+        <listitem><para>When showing properties of
+        <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+        limit display to certain properties as specified as argument. If not specified, all set properties are shown.
+        The argument should be a property name, such as <literal>ServerName</literal>. If specified more than once,
+        all properties with the specified names are shown.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--value</option></term>
+
+        <listitem>
+          <para>When printing properties with <command>show-timesync</command>, only print the value, and skip the
+          property name and <literal>=</literal>.</para></listitem>
+      </varlistentry>
+
       <xi:include href="user-system-options.xml" xpointer="host" />
       <xi:include href="user-system-options.xml" xpointer="machine" />
 
 
     </variablelist>
 
+    <refsect2><title>systemd-timesyncd Commands</title>
+
+    <para>The following commands are specific to
+    <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+    </para>
+
+      <variablelist>
+        <varlistentry>
+          <term><command>timesync-status</command></term>
+
+          <listitem><para>Show current status of
+          <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+          If <option>--monitor</option> is specified, then this will monitor the status updates.</para></listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><command>show-timesync</command></term>
+
+          <listitem><para>Show properties of the manager of
+          <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+          By default, empty properties are suppressed. Use <option>--all</option> to show those too. To select specific
+          properties to show, use <option>--property=</option>. This command is intended to be used whenever
+          computer-parsable output is required. Use <option>timesync-status</option> if you are looking for formatted
+          human-readable output.</para></listitem>
+        </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
   </refsect1>
 
   <refsect1>
@@ -208,6 +279,25 @@ Password: ********
            └─595 /usr/lib/systemd/systemd-timesyncd
 …</programlisting>
     </para>
+
+    <para>Show current status of
+    <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>:
+    <programlisting>$ timedatectl timesync-status
+       Server: 216.239.38.15 (time4.google.com)
+Poll interval: 1min 4s (min: 32s; max 34min 8s)
+         Leap: normal
+      Version: 4
+      Stratum: 1
+    Reference: GPS
+    Precision: 1us (-20)
+Root distance: 335us (max: 5s)
+       Offset: +316us
+        Delay: 349us
+       Jitter: 0
+ Packet count: 1
+    Frequency: -8.802ppm</programlisting>
+    </para>
+
   </refsect1>
 
   <refsect1>