[systemd-devel] [PATCH] man: document the slice unit
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Tue Jul 9 23:23:01 PDT 2013
---
Does this description fit the masterplan? What about units that
systemd will expose for CPU and BlockIO shares, will they still be
1024 and 1000 based?
Zbyszek
PS. I think that apart from this we are still missing
the .scope man page, which should be trivial to write.
Makefile-man.am | 1 +
man/systemd.slice.xml | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 200 insertions(+)
create mode 100644 man/systemd.slice.xml
diff --git a/Makefile-man.am b/Makefile-man.am
index bef749a..12abad8 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -84,6 +84,7 @@ MANPAGES += \
man/systemd.path.5 \
man/systemd.preset.5 \
man/systemd.service.5 \
+ man/systemd.slice.5 \
man/systemd.snapshot.5 \
man/systemd.socket.5 \
man/systemd.special.7 \
diff --git a/man/systemd.slice.xml b/man/systemd.slice.xml
new file mode 100644
index 0000000..24cca0a
--- /dev/null
+++ b/man/systemd.slice.xml
@@ -0,0 +1,199 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+This file is part of systemd.
+
+Copyright 2013 Zbigniew Jędrzejewski-Szmek
+
+systemd is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+systemd is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="systemd.slice">
+ <refentryinfo>
+ <title>systemd.slice</title>
+ <productname>systemd</productname>
+
+ <authorgroup>
+ <author>
+ <contrib>Developer</contrib>
+ <firstname>Lennart</firstname>
+ <surname>Poettering</surname>
+ <email>lennart at poettering.net</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>systemd.slice</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>systemd.slice</refname>
+ <refpurpose>Slice unit configuration</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <para><filename><replaceable>slice</replaceable>.slice</filename></para>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>A unit configuration file whose name ends in
+ <literal>.slice</literal> encodes information about a slice
+ created by systemd to manage resources used by a certain group of
+ processes. Those processes are part of different units, usually
+ <literal>.service</literal> units (see
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+ </para>
+
+ <para>This man page lists the configuration options
+ specific to this unit type. See
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for the common options of all unit configuration
+ files. The common configuration items are configured
+ in the generic [Unit] and [Install] sections. The
+ slice specific configuration options are configured in
+ the [Slice] section.</para>
+
+ <para>Unless <varname>DefaultDependencies=false</varname>
+ is used, slice units will implicitly have dependencies of
+ type <varname>Conflicts=</varname> and
+ <varname>Before=</varname> on
+ <filename>shutdown.target</filename>. These ensure
+ that slice units are removed prior to system
+ shutdown. Only slice units involved with early boot or
+ late system shutdown should disable this option.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>Slice files may include a [Slice] section,
+ which carries settings for that slice.
+ The options specific to the [Slice] section
+ of slice units are the following:</para>
+
+ <variablelist class='unit-directives'>
+ <varlistentry>
+ <term><varname>CPUAccounting=</varname></term>
+
+ <listitem>
+ <para>Turn on the CPU usage accounting for this
+ slice.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>BlockIOAccounting=</varname></term>
+
+ <listitem>
+ <para>Turn on the Block IO bandwidth accounting
+ for this slice.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>MemoryAccounting=</varname></term>
+
+ <listitem>
+ <para>Turn on the process and kernel memory
+ accounting for this slice.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>CPUShares=</varname></term>
+
+ <listitem>
+ <para>Specify what share of the available CPU time will
+ be assigned to this slice.
+ </para>
+
+ <para>Implies <literal>CPUAccounting=true</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>MemoryLimit=<replaceable>bytes</replaceable></varname></term>
+ <term><varname>MemorySoftLimit=<replaceable>bytes</replaceable></varname></term>
+
+ <listitem>
+ <para>Specify the hard and soft limits on maximum memory
+ usage, in bytes. The "hard" limit specifies how much
+ process and kernel memory can be used by tasks in this
+ slice, when there is no memory contention. If the kernel
+ detects memory contention, memory reclaim will be performed
+ until the memory usage is within the "soft" limit.</para>
+
+ <para>Implies <literal>MemoryAccounting=true</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>BlockIOWeight=[<replaceable>device</replaceable>] <replaceable>weight</replaceable></varname></term>
+
+ <listitem>
+ <para>Specify what share of the available block input/output
+ bandwidth will be assigned to this slice. If a
+ <replaceable>device</replaceable> is specified,
+ <replaceable>weight</replaceable> applies only to this
+ device. Otherwise, it becomes the default setting for all
+ devices.</para>
+
+ <para>Implies <literal>BlockIOAccounting=true</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>BlockIOReadBandwidth=[<replaceable>device</replaceable>] <replaceable>bytes</replaceable></varname></term>
+ <term><varname>BlockIOWriteBandwidth=[<replaceable>device</replaceable>] <replaceable>bytes</replaceable></varname></term>
+
+ <listitem>
+ <para>Specify an absolute limit on the block input/output
+ bandwith for this slice, in bytes per second. Similar to
+ <varname>BlockIOWeight=</varname>, the setting can apply
+ to just one device or to all devices.</para>
+
+ <para>Implies <literal>BlockIOAccounting=true</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+ <para>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ The documentation for control groups and specific controllers in the Linux kernel:
+ <ulink url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>,
+ <ulink url="http://www.kernel.org/doc/Documentation/cgroups/cpuacct.txt">cpuacct.txt</ulink>,
+ <ulink url="http://www.kernel.org/doc/Documentation/cgroups/memory.txt">memory.txt</ulink>,
+ <ulink url="http://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.
+ </para>
+ </refsect1>
+
+</refentry>
--
1.8.2.562.g931e949
More information about the systemd-devel
mailing list