]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.scope.xml
man: fix a few bogus entries in directives index
[thirdparty/systemd.git] / man / systemd.scope.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
3a54a157
ZJS
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0307f791 4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
d868475a
ZJS
5
6<refentry id="systemd.scope">
7 <refentryinfo>
8 <title>systemd.scope</title>
9 <productname>systemd</productname>
d868475a
ZJS
10 </refentryinfo>
11
12 <refmeta>
13 <refentrytitle>systemd.scope</refentrytitle>
14 <manvolnum>5</manvolnum>
15 </refmeta>
16
17 <refnamediv>
18 <refname>systemd.scope</refname>
19 <refpurpose>Scope unit configuration</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23 <para><filename><replaceable>scope</replaceable>.scope</filename></para>
24 </refsynopsisdiv>
25
26 <refsect1>
27 <title>Description</title>
28
9365b048
LP
29 <para>Scope units are not configured via unit configuration files,
30 but are only created programmatically using the bus interfaces of
31 systemd. They are named similar to filenames. A unit whose name
32 ends in <literal>.scope</literal> refers to a scope unit. Scopes
fbce1139 33 units manage a set of system processes. Unlike service units, scope
9365b048
LP
34 units manage externally created processes, and do not fork off
35 processes on its own.</para>
d868475a 36
9365b048 37 <para>The main purpose of scope units is grouping worker processes
847ae0ae 38 of a system service for organization and for managing resources.</para>
9365b048
LP
39
40 <para><command>systemd-run <option>--scope</option></command> may
41 be used to easily launch a command in a new scope unit from the
42 command line.</para>
d868475a 43
ea021cc3 44 <para>See the <ulink
28a0ad81 45 url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
72f4d966 46 Control Group Interfaces</ulink> for an introduction on how to make
ea021cc3 47 use of scope units from programs.</para>
c129bd5d
LP
48 </refsect1>
49
50 <refsect1>
aed5cb03
ZJS
51 <title>Automatic Dependencies</title>
52
53 <refsect2>
54 <title>Implicit Dependencies</title>
55
56 <para>Implicit dependencies may be added as result of
57 resource control parameters as documented in
58 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
59 </refsect2>
60
61 <refsect2>
62 <title>Default Dependencies</title>
63
64 <para>The following dependencies are added unless
65 <varname>DefaultDependencies=no</varname> is set:</para>
66
67 <itemizedlist>
68 <listitem><para>Scope units will automatically have dependencies of
69 type <varname>Conflicts=</varname> and
70 <varname>Before=</varname> on
71 <filename>shutdown.target</filename>. These ensure
72 that scope units are removed prior to system
73 shutdown. Only scope units involved with early boot or
74 late system shutdown should disable
75 <varname>DefaultDependencies=</varname> option.</para></listitem>
76 </itemizedlist>
77 </refsect2>
d868475a
ZJS
78 </refsect1>
79
9ed7de60
PW
80 <refsect1>
81 <title>Options</title>
82
83 <para>Scope files may include a <literal>[Scope]</literal>
84 section, which carries information about the scope and the
85 units it contains. A number of options that may be used in
86 this section are shared with other unit types. These options are
87 documented in
88 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>
89 and
90 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
91 The options specific to the <literal>[Scope]</literal> section
92 of scope units are the following:</para>
93
94 <variablelist class='unit-directives'>
95 <varlistentry>
96 <term><varname>RuntimeMaxSec=</varname></term>
97
98 <listitem><para>Configures a maximum time for the scope to run. If this is used and the scope has been
99 active for longer than the specified time it is terminated and put into a failure state. Pass
100 <literal>infinity</literal> (the default) to configure no runtime limit.</para></listitem>
101 </varlistentry>
102 </variablelist>
103 </refsect1>
104
d868475a
ZJS
105 <refsect1>
106 <title>See Also</title>
107 <para>
108 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3fde5f30 111 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
d868475a
ZJS
112 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
114 </para>
115 </refsect1>
116
117</refentry>