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