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