]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.scope.xml
Merge pull request #8822 from fbuihuu/rfc-tmpfiles-safe-upstream
[thirdparty/systemd.git] / man / systemd.scope.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
d868475a 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
d868475a
ZJS
4
5<!--
572eb058 6 SPDX-License-Identifier: LGPL-2.1+
d868475a
ZJS
7-->
8
9<refentry id="systemd.scope">
10 <refentryinfo>
11 <title>systemd.scope</title>
12 <productname>systemd</productname>
d868475a
ZJS
13 </refentryinfo>
14
15 <refmeta>
16 <refentrytitle>systemd.scope</refentrytitle>
17 <manvolnum>5</manvolnum>
18 </refmeta>
19
20 <refnamediv>
21 <refname>systemd.scope</refname>
22 <refpurpose>Scope unit configuration</refpurpose>
23 </refnamediv>
24
25 <refsynopsisdiv>
26 <para><filename><replaceable>scope</replaceable>.scope</filename></para>
27 </refsynopsisdiv>
28
29 <refsect1>
30 <title>Description</title>
31
9365b048
LP
32 <para>Scope units are not configured via unit configuration files,
33 but are only created programmatically using the bus interfaces of
34 systemd. They are named similar to filenames. A unit whose name
35 ends in <literal>.scope</literal> refers to a scope unit. Scopes
fbce1139 36 units manage a set of system processes. Unlike service units, scope
9365b048
LP
37 units manage externally created processes, and do not fork off
38 processes on its own.</para>
d868475a 39
9365b048 40 <para>The main purpose of scope units is grouping worker processes
847ae0ae 41 of a system service for organization and for managing resources.</para>
9365b048
LP
42
43 <para><command>systemd-run <option>--scope</option></command> may
44 be used to easily launch a command in a new scope unit from the
45 command line.</para>
d868475a 46
ea021cc3 47 <para>See the <ulink
28a0ad81 48 url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
72f4d966 49 Control Group Interfaces</ulink> for an introduction on how to make
ea021cc3 50 use of scope units from programs.</para>
c129bd5d
LP
51 </refsect1>
52
53 <refsect1>
aed5cb03
ZJS
54 <title>Automatic Dependencies</title>
55
56 <refsect2>
57 <title>Implicit Dependencies</title>
58
59 <para>Implicit dependencies may be added as result of
60 resource control parameters as documented in
61 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
62 </refsect2>
63
64 <refsect2>
65 <title>Default Dependencies</title>
66
67 <para>The following dependencies are added unless
68 <varname>DefaultDependencies=no</varname> is set:</para>
69
70 <itemizedlist>
71 <listitem><para>Scope units will automatically have dependencies of
72 type <varname>Conflicts=</varname> and
73 <varname>Before=</varname> on
74 <filename>shutdown.target</filename>. These ensure
75 that scope units are removed prior to system
76 shutdown. Only scope units involved with early boot or
77 late system shutdown should disable
78 <varname>DefaultDependencies=</varname> option.</para></listitem>
79 </itemizedlist>
80 </refsect2>
d868475a
ZJS
81 </refsect1>
82
83 <refsect1>
84 <title>See Also</title>
85 <para>
86 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
87 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
88 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3fde5f30 89 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
d868475a
ZJS
90 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
91 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
92 </para>
93 </refsect1>
94
95</refentry>