]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.scope.xml
Merge pull request #9302 from keszybz/drop-my-copyright-and-some-license-tags
[thirdparty/systemd.git] / man / systemd.scope.xml
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">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7 -->
8
9 <refentry id="systemd.scope">
10 <refentryinfo>
11 <title>systemd.scope</title>
12 <productname>systemd</productname>
13
14 <authorgroup>
15 <author>
16 <contrib>Developer</contrib>
17 <firstname>Lennart</firstname>
18 <surname>Poettering</surname>
19 <email>lennart@poettering.net</email>
20 </author>
21 </authorgroup>
22 </refentryinfo>
23
24 <refmeta>
25 <refentrytitle>systemd.scope</refentrytitle>
26 <manvolnum>5</manvolnum>
27 </refmeta>
28
29 <refnamediv>
30 <refname>systemd.scope</refname>
31 <refpurpose>Scope unit configuration</refpurpose>
32 </refnamediv>
33
34 <refsynopsisdiv>
35 <para><filename><replaceable>scope</replaceable>.scope</filename></para>
36 </refsynopsisdiv>
37
38 <refsect1>
39 <title>Description</title>
40
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>
48
49 <para>The main purpose of scope units is grouping worker processes
50 of a system service for organization and for managing resources.</para>
51
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
54 command line.</para>
55
56 <para>See the <ulink
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>
60 </refsect1>
61
62 <refsect1>
63 <title>Automatic Dependencies</title>
64
65 <refsect2>
66 <title>Implicit Dependencies</title>
67
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>
71 </refsect2>
72
73 <refsect2>
74 <title>Default Dependencies</title>
75
76 <para>The following dependencies are added unless
77 <varname>DefaultDependencies=no</varname> is set:</para>
78
79 <itemizedlist>
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>
88 </itemizedlist>
89 </refsect2>
90 </refsect1>
91
92 <refsect1>
93 <title>See Also</title>
94 <para>
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>.
101 </para>
102 </refsect1>
103
104 </refentry>