]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.scope.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[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 This file is part of systemd.
9
10 Copyright 2013 Zbigniew Jędrzejewski-Szmek
11
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 -->
25
26 <refentry id="systemd.scope">
27 <refentryinfo>
28 <title>systemd.scope</title>
29 <productname>systemd</productname>
30
31 <authorgroup>
32 <author>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
37 </author>
38 </authorgroup>
39 </refentryinfo>
40
41 <refmeta>
42 <refentrytitle>systemd.scope</refentrytitle>
43 <manvolnum>5</manvolnum>
44 </refmeta>
45
46 <refnamediv>
47 <refname>systemd.scope</refname>
48 <refpurpose>Scope unit configuration</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <para><filename><replaceable>scope</replaceable>.scope</filename></para>
53 </refsynopsisdiv>
54
55 <refsect1>
56 <title>Description</title>
57
58 <para>Scope units are not configured via unit configuration files,
59 but are only created programmatically using the bus interfaces of
60 systemd. They are named similar to filenames. A unit whose name
61 ends in <literal>.scope</literal> refers to a scope unit. Scopes
62 units manage a set of system processes. Unlike service units, scope
63 units manage externally created processes, and do not fork off
64 processes on its own.</para>
65
66 <para>The main purpose of scope units is grouping worker processes
67 of a system service for organization and for managing resources.</para>
68
69 <para><command>systemd-run <option>--scope</option></command> may
70 be used to easily launch a command in a new scope unit from the
71 command line.</para>
72
73 <para>See the <ulink
74 url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
75 Control Group Interfaces</ulink> for an introduction on how to make
76 use of scope units from programs.</para>
77 </refsect1>
78
79 <refsect1>
80 <title>Implicit Dependencies</title>
81
82 <para>Implicit dependencies may be added as result of
83 resource control parameters as documented in
84 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
85 </refsect1>
86
87 <refsect1>
88 <title>Default Dependencies</title>
89
90 <para>The following dependencies are added unless
91 <varname>DefaultDependencies=no</varname> is set:</para>
92
93 <itemizedlist>
94 <listitem><para>Scope units will automatically have dependencies of
95 type <varname>Conflicts=</varname> and
96 <varname>Before=</varname> on
97 <filename>shutdown.target</filename>. These ensure
98 that scope units are removed prior to system
99 shutdown. Only scope units involved with early boot or
100 late system shutdown should disable
101 <varname>DefaultDependencies=</varname> option.</para></listitem>
102 </itemizedlist>
103 </refsect1>
104
105 <refsect1>
106 <title>See Also</title>
107 <para>
108 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
111 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
112 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
114 </para>
115 </refsect1>
116
117 </refentry>