2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
6 <refentry id=
"systemd.scope">
8 <title>systemd.scope
</title>
9 <productname>systemd
</productname>
13 <refentrytitle>systemd.scope
</refentrytitle>
14 <manvolnum>5</manvolnum>
18 <refname>systemd.scope
</refname>
19 <refpurpose>Scope unit configuration
</refpurpose>
23 <para><filename><replaceable>scope
</replaceable>.scope
</filename></para>
27 <title>Description
</title>
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
33 units manage a set of system processes. Unlike service units, scope
34 units manage externally created processes, and do not fork off
35 processes on its own.
</para>
37 <para>The main purpose of scope units is grouping worker processes
38 of a system service for organization and for managing resources.
</para>
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
45 url=
"https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
46 Control Group Interfaces
</ulink> for an introduction on how to make
47 use of scope units from programs.
</para>
51 <title>Automatic Dependencies
</title>
54 <title>Implicit Dependencies
</title>
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>
62 <title>Default Dependencies
</title>
64 <para>The following dependencies are added unless
65 <varname>DefaultDependencies=no
</varname> is set:
</para>
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>
81 <title>See Also
</title>
83 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
84 <citerefentry><refentrytitle>systemd-run
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
85 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
86 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
87 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
88 <citerefentry><refentrytitle>systemd.directives
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.