]>
Commit | Line | Data |
---|---|---|
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.slice"> | |
10 | <refentryinfo> | |
11 | <title>systemd.slice</title> | |
12 | <productname>systemd</productname> | |
d868475a ZJS |
13 | </refentryinfo> |
14 | ||
15 | <refmeta> | |
16 | <refentrytitle>systemd.slice</refentrytitle> | |
17 | <manvolnum>5</manvolnum> | |
18 | </refmeta> | |
19 | ||
20 | <refnamediv> | |
21 | <refname>systemd.slice</refname> | |
22 | <refpurpose>Slice unit configuration</refpurpose> | |
23 | </refnamediv> | |
24 | ||
25 | <refsynopsisdiv> | |
26 | <para><filename><replaceable>slice</replaceable>.slice</filename></para> | |
27 | </refsynopsisdiv> | |
28 | ||
29 | <refsect1> | |
30 | <title>Description</title> | |
31 | ||
ee859930 LP |
32 | <para>A unit configuration file whose name ends in <literal>.slice</literal> encodes information about a slice |
33 | unit. A slice unit is a concept for hierarchically managing resources of a group of processes. This management is | |
34 | performed by creating a node in the Linux Control Group (cgroup) tree. Units that manage processes (primarily scope | |
35 | and service units) may be assigned to a specific slice. For each slice, certain resource limits may be set that | |
36 | apply to all processes of all units contained in that slice. Slices are organized hierarchically in a tree. The | |
37 | name of the slice encodes the location in the tree. The name consists of a dash-separated series of names, which | |
38 | describes the path to the slice from the root slice. The root slice is named <filename>-.slice</filename>. Example: | |
39 | <filename>foo-bar.slice</filename> is a slice that is located within <filename>foo.slice</filename>, which in turn | |
40 | is located in the root slice <filename>-.slice</filename>. | |
d868475a ZJS |
41 | </para> |
42 | ||
f4bf8d2f | 43 | <para>Note that slice units cannot be templated, nor is possible to add multiple names to a slice unit by creating |
ad2caa7d | 44 | additional symlinks to its unit file.</para> |
f4bf8d2f | 45 | |
fbce1139 | 46 | <para>By default, service and scope units are placed in |
847ae0ae LP |
47 | <filename>system.slice</filename>, virtual machines and containers |
48 | registered with | |
49 | <citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
50 | are found in <filename>machine.slice</filename>, and user sessions | |
51 | handled by | |
52 | <citerefentry><refentrytitle>systemd-logind</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
53 | in <filename>user.slice</filename>. See | |
54 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
55 | for more information.</para> | |
56 | ||
d868475a ZJS |
57 | <para>See |
58 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
59 | for the common options of all unit configuration | |
60 | files. The common configuration items are configured | |
61 | in the generic [Unit] and [Install] sections. The | |
62 | slice specific configuration options are configured in | |
3fde5f30 | 63 | the [Slice] section. Currently, only generic resource control settings |
d868475a | 64 | as described in |
c4e87748 | 65 | <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry> are allowed. |
d868475a ZJS |
66 | </para> |
67 | ||
b6f011c1 | 68 | <para>See the <ulink |
28a0ad81 | 69 | url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New |
b6f011c1 EV |
70 | Control Group Interfaces</ulink> for an introduction on how to make |
71 | use of slice units from programs.</para> | |
c129bd5d LP |
72 | </refsect1> |
73 | ||
74 | <refsect1> | |
aed5cb03 | 75 | <title>Automatic Dependencies</title> |
c129bd5d | 76 | |
aed5cb03 ZJS |
77 | <refsect2> |
78 | <title>Implicit Dependencies</title> | |
b6f011c1 | 79 | |
aed5cb03 | 80 | <para>The following dependencies are implicitly added:</para> |
45f09f93 | 81 | |
aed5cb03 ZJS |
82 | <itemizedlist> |
83 | <listitem><para>Slice units automatically gain dependencies of type | |
84 | <varname>After=</varname> and <varname>Requires=</varname> on | |
85 | their immediate parent slice unit.</para></listitem> | |
86 | </itemizedlist> | |
87 | </refsect2> | |
88 | ||
89 | <refsect2> | |
90 | <title>Default Dependencies</title> | |
45f09f93 | 91 | |
aed5cb03 | 92 | <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para> |
45f09f93 | 93 | |
aed5cb03 ZJS |
94 | <itemizedlist> |
95 | <listitem><para>Slice units will automatically have dependencies of type <varname>Conflicts=</varname> and | |
96 | <varname>Before=</varname> on | |
97 | <filename>shutdown.target</filename>. These ensure that slice units are removed prior to system shutdown. | |
98 | Only slice units involved with late system shutdown should disable | |
99 | <varname>DefaultDependencies=</varname> option.</para></listitem> | |
100 | </itemizedlist> | |
101 | </refsect2> | |
d868475a ZJS |
102 | </refsect1> |
103 | ||
104 | <refsect1> | |
105 | <title>See Also</title> | |
106 | <para> | |
107 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
108 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
3fde5f30 | 109 | <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
d868475a | 110 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
847ae0ae LP |
111 | <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
112 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | |
113 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
d868475a ZJS |
114 | </para> |
115 | </refsect1> | |
116 | ||
117 | </refentry> |