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+
8 This file is part of systemd.
10 Copyright 2013 Zbigniew Jędrzejewski-Szmek
13 <refentry id=
"systemd.scope">
15 <title>systemd.scope
</title>
16 <productname>systemd
</productname>
20 <contrib>Developer
</contrib>
21 <firstname>Lennart
</firstname>
22 <surname>Poettering
</surname>
23 <email>lennart@poettering.net
</email>
29 <refentrytitle>systemd.scope
</refentrytitle>
30 <manvolnum>5</manvolnum>
34 <refname>systemd.scope
</refname>
35 <refpurpose>Scope unit configuration
</refpurpose>
39 <para><filename><replaceable>scope
</replaceable>.scope
</filename></para>
43 <title>Description
</title>
45 <para>Scope units are not configured via unit configuration files,
46 but are only created programmatically using the bus interfaces of
47 systemd. They are named similar to filenames. A unit whose name
48 ends in
<literal>.scope
</literal> refers to a scope unit. Scopes
49 units manage a set of system processes. Unlike service units, scope
50 units manage externally created processes, and do not fork off
51 processes on its own.
</para>
53 <para>The main purpose of scope units is grouping worker processes
54 of a system service for organization and for managing resources.
</para>
56 <para><command>systemd-run
<option>--scope
</option></command> may
57 be used to easily launch a command in a new scope unit from the
61 url=
"https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
62 Control Group Interfaces
</ulink> for an introduction on how to make
63 use of scope units from programs.
</para>
67 <title>Implicit Dependencies
</title>
69 <para>Implicit dependencies may be added as result of
70 resource control parameters as documented in
71 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
75 <title>Default Dependencies
</title>
77 <para>The following dependencies are added unless
78 <varname>DefaultDependencies=no
</varname> is set:
</para>
81 <listitem><para>Scope units will automatically have dependencies of
82 type
<varname>Conflicts=
</varname> and
83 <varname>Before=
</varname> on
84 <filename>shutdown.target
</filename>. These ensure
85 that scope units are removed prior to system
86 shutdown. Only scope units involved with early boot or
87 late system shutdown should disable
88 <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>.