1SYSTEMD.SCOPE(5)                 systemd.scope                SYSTEMD.SCOPE(5)
2
3
4

NAME

6       systemd.scope - Scope unit configuration
7

SYNOPSIS

9       scope.scope
10

DESCRIPTION

12       Scope units are not configured via unit configuration files, but are
13       only created programmatically using the bus interfaces of systemd. They
14       are named similar to filenames. A unit whose name ends in ".scope"
15       refers to a scope unit. Scopes units manage a set of system processes.
16       Unlike service units, scope units manage externally created processes,
17       and do not fork off processes on its own.
18
19       The main purpose of scope units is grouping worker processes of a
20       system service for organization and for managing resources.
21
22       systemd-run --scope may be used to easily launch a command in a new
23       scope unit from the command line.
24
25       See the New Control Group Interfaces[1] for an introduction on how to
26       make use of scope units from programs.
27
28       Note that, unlike service units, scope units have no "main" process:
29       all processes in the scope are equivalent. The lifecycle of the scope
30       unit is thus not bound to the lifetime of one specific process, but to
31       the existence of at least one process in the scope. This also means
32       that the exit statuses of these processes are not relevant for the
33       scope unit failure state. Scope units may still enter a failure state,
34       for example due to resource exhaustion or stop timeouts being reached,
35       but not due to programs inside of them terminating uncleanly. Since
36       processes managed as scope units generally remain children of the
37       original process that forked them off, it is also the job of that
38       process to collect their exit statuses and act on them as needed.
39

AUTOMATIC DEPENDENCIES

41   Implicit Dependencies
42       Implicit dependencies may be added as result of resource control
43       parameters as documented in systemd.resource-control(5).
44
45   Default Dependencies
46       The following dependencies are added unless DefaultDependencies=no is
47       set:
48
49       •   Scope units will automatically have dependencies of type Conflicts=
50           and Before= on shutdown.target. These ensure that scope units are
51           removed prior to system shutdown. Only scope units involved with
52           early boot or late system shutdown should disable
53           DefaultDependencies= option.
54

OPTIONS

56       Socket files may include a [Unit] section, which is described in
57       systemd.unit(5).
58
59       Scope files may include a [Scope] section, which carries information
60       about the scope and the units it contains. A number of options that may
61       be used in this section are shared with other unit types. These options
62       are documented in systemd.kill(5) and systemd.resource-control(5). The
63       options specific to the [Scope] section of scope units are the
64       following:
65
66       RuntimeMaxSec=
67           Configures a maximum time for the scope to run. If this is used and
68           the scope has been active for longer than the specified time it is
69           terminated and put into a failure state. Pass "infinity" (the
70           default) to configure no runtime limit.
71
72       RuntimeRandomizedExtraSec=
73           This option modifies RuntimeMaxSec= by increasing the maximum
74           runtime by an evenly distributed duration between 0 and the
75           specified value (in seconds). If RuntimeMaxSec= is unspecified,
76           then this feature will be disabled.
77
78       Check systemd.unit(5), systemd.exec(5), and systemd.kill(5) for more
79       settings.
80

SEE ALSO

82       systemd(1), systemd-run(1), systemd.unit(5), systemd.resource-
83       control(5), systemd.service(5), systemd.directives(7).
84

NOTES

86        1. New Control Group Interfaces
87           https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/
88
89
90
91systemd 251                                                   SYSTEMD.SCOPE(5)
Impressum