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