mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
man: document new "systemctl clean…" operation
This commit is contained in:
parent
273fe5d3cb
commit
8c8208cb80
@ -506,6 +506,21 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--what=</option></term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Select what type of per-unit resources to remove when the <command>clean</command> command is
|
||||||
|
invoked, see below. Takes one of <constant>configuration</constant>, <constant>state</constant>,
|
||||||
|
<constant>cache</constant>, <constant>logs</constant>, <constant>runtime</constant> to select the
|
||||||
|
type of resource. This option may be specified more than once, in which case all specified resource
|
||||||
|
types are removed. Also accepts the special value <constant>all</constant> as a shortcut for
|
||||||
|
specifiying all five resource types. If this option is not specified defaults to the combination of
|
||||||
|
<constant>cache</constant> and <constant>runtime</constant>, i.e. the two kinds of resources that
|
||||||
|
are generally considered to be redundant and can be reconstructed on next invocation.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-f</option></term>
|
<term><option>-f</option></term>
|
||||||
<term><option>--force</option></term>
|
<term><option>--force</option></term>
|
||||||
@ -904,6 +919,24 @@ Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago
|
|||||||
the signal to send.</para>
|
the signal to send.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><command>clean <replaceable>PATTERN</replaceable>…</command></term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Remove the configuration, state, cache, logs or runtime data of the specified units. Use
|
||||||
|
<option>--what=</option> to select which kind of resource to remove. For service units this may
|
||||||
|
be used to remove the directories configured with <varname>ConfigurationDirectory=</varname>,
|
||||||
|
<varname>StateDirectory=</varname>, <varname>CacheDirectory=</varname>,
|
||||||
|
<varname>LogsDirectory=</varname> and <varname>RuntimeDirectory=</varname>, see
|
||||||
|
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
|
for details. For timer units this may be used to clear out the persistent timestamp data if
|
||||||
|
<varname>Persistent=</varname> is used and <option>--what=state</option> is selected, see
|
||||||
|
<citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
|
||||||
|
command only applies to units that use either of these settings. If <option>--what=</option> is
|
||||||
|
not specified, both the cache and runtime data are removed (as these two types of data are
|
||||||
|
generally redundant and reproducible on the next invocation of the unit).</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>is-active <replaceable>PATTERN</replaceable>…</command></term>
|
<term><command>is-active <replaceable>PATTERN</replaceable>…</command></term>
|
||||||
|
|
||||||
|
@ -981,6 +981,11 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting>
|
|||||||
the directories is tied directly to the lifetime of the unit, and it is not necessary to ensure that the
|
the directories is tied directly to the lifetime of the unit, and it is not necessary to ensure that the
|
||||||
<filename>tmpfiles.d</filename> configuration is executed before the unit is started.</para>
|
<filename>tmpfiles.d</filename> configuration is executed before the unit is started.</para>
|
||||||
|
|
||||||
|
<para>To remove any of the directories created by these settings, use the <command>systemctl clean
|
||||||
|
…</command> command on the relevant units, see
|
||||||
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
|
||||||
|
details.</para>
|
||||||
|
|
||||||
<para>Example: if a system service unit has the following,
|
<para>Example: if a system service unit has the following,
|
||||||
<programlisting>RuntimeDirectory=foo/bar baz</programlisting>
|
<programlisting>RuntimeDirectory=foo/bar baz</programlisting>
|
||||||
the service manager creates <filename>/run/foo</filename> (if it does not exist),
|
the service manager creates <filename>/run/foo</filename> (if it does not exist),
|
||||||
|
@ -610,6 +610,16 @@
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>TimeoutCleanSec=</varname></term>
|
||||||
|
<listitem><para>Configures a timeout on the clean-up operation requested through <command>systemctl
|
||||||
|
clean …</command>, see
|
||||||
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
|
||||||
|
details. Takes the usual time values and defaults to <constant>infinity</constant>, i.e. by default
|
||||||
|
no time-out is applied. If a time-out is configured the clean operation will be aborted forcibly when
|
||||||
|
the time-out is reached, potentially leaving resources on disk.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>RuntimeMaxSec=</varname></term>
|
<term><varname>RuntimeMaxSec=</varname></term>
|
||||||
|
|
||||||
|
@ -286,16 +286,18 @@
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Persistent=</varname></term>
|
<term><varname>Persistent=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean argument. If true, the time
|
<listitem><para>Takes a boolean argument. If true, the time when the service unit was last triggered
|
||||||
when the service unit was last triggered is stored on disk.
|
is stored on disk. When the timer is activated, the service unit is triggered immediately if it
|
||||||
When the timer is activated, the service unit is triggered
|
would have been triggered at least once during the time when the timer was inactive. This is useful
|
||||||
immediately if it would have been triggered at least once
|
to catch up on missed runs of the service when the system was powered down. Note that this setting
|
||||||
during the time when the timer was inactive. This is useful to
|
only has an effect on timers configured with <varname>OnCalendar=</varname>. Defaults to
|
||||||
catch up on missed runs of the service when the machine was
|
<varname>false</varname>.</para>
|
||||||
off. Note that this setting only has an effect on timers
|
|
||||||
configured with <varname>OnCalendar=</varname>. Defaults
|
<para>Use <command>systemctl clean --what=state …</command> on the timer unit to remove the timestamp
|
||||||
to <varname>false</varname>.
|
file maintained by this option from disk. In particular, use this command before uninstalling a timer
|
||||||
</para></listitem>
|
unit. See
|
||||||
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
|
||||||
|
details.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
Loading…
Reference in New Issue
Block a user