1 <?xml version='
1.0'
?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
9 <refentry id=
"systemd.scope">
11 <title>systemd.scope
</title>
12 <productname>systemd
</productname>
16 <contrib>Developer
</contrib>
17 <firstname>Lennart
</firstname>
18 <surname>Poettering
</surname>
19 <email>lennart@poettering.net
</email>
25 <refentrytitle>systemd.scope
</refentrytitle>
26 <manvolnum>5</manvolnum>
30 <refname>systemd.scope
</refname>
31 <refpurpose>Scope unit configuration
</refpurpose>
35 <para><filename><replaceable>scope
</replaceable>.scope
</filename></para>
39 <title>Description
</title>
41 <para>Scope units are not configured via unit configuration files,
42 but are only created programmatically using the bus interfaces of
43 systemd. They are named similar to filenames. A unit whose name
44 ends in
<literal>.scope
</literal> refers to a scope unit. Scopes
45 units manage a set of system processes. Unlike service units, scope
46 units manage externally created processes, and do not fork off
47 processes on its own.
</para>
49 <para>The main purpose of scope units is grouping worker processes
50 of a system service for organization and for managing resources.
</para>
52 <para><command>systemd-run
<option>--scope
</option></command> may
53 be used to easily launch a command in a new scope unit from the
57 url=
"https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
58 Control Group Interfaces
</ulink> for an introduction on how to make
59 use of scope units from programs.
</para>
63 <title>Automatic Dependencies
</title>
66 <title>Implicit Dependencies
</title>
68 <para>Implicit dependencies may be added as result of
69 resource control parameters as documented in
70 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
74 <title>Default Dependencies
</title>
76 <para>The following dependencies are added unless
77 <varname>DefaultDependencies=no
</varname> is set:
</para>
80 <listitem><para>Scope units will automatically have dependencies of
81 type
<varname>Conflicts=
</varname> and
82 <varname>Before=
</varname> on
83 <filename>shutdown.target
</filename>. These ensure
84 that scope units are removed prior to system
85 shutdown. Only scope units involved with early boot or
86 late system shutdown should disable
87 <varname>DefaultDependencies=
</varname> option.
</para></listitem>
93 <title>See Also
</title>
95 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
96 <citerefentry><refentrytitle>systemd-run
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
97 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
98 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
99 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
100 <citerefentry><refentrytitle>systemd.directives
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.