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