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