]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.slice.xml
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / man / systemd.slice.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7
8 Copyright © 2013 Zbigniew Jędrzejewski-Szmek
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
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>.
52 </para>
53
54 <para>Note that slice units cannot be templated, nor is possible to add multiple names to a slice unit by creating
55 additional symlinks to its unit file.</para>
56
57 <para>By default, service and scope units are placed in
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
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
74 the [Slice] section. Currently, only generic resource control settings
75 as described in
76 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry> are allowed.
77 </para>
78
79 <para>See the <ulink
80 url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
81 Control Group Interfaces</ulink> for an introduction on how to make
82 use of slice units from programs.</para>
83 </refsect1>
84
85 <refsect1>
86 <title>Automatic Dependencies</title>
87
88 <refsect2>
89 <title>Implicit Dependencies</title>
90
91 <para>The following dependencies are implicitly added:</para>
92
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>
102
103 <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
104
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>
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>,
120 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
121 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
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>
125 </para>
126 </refsect1>
127
128 </refentry>