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