|
|
a4b143 |
From 873b06ca6f97f7288c98647fa5e761847122a382 Mon Sep 17 00:00:00 2001
|
|
|
a4b143 |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
a4b143 |
Date: Thu, 26 Sep 2013 22:49:44 +0200
|
|
|
a4b143 |
Subject: [PATCH] core: drop some out-of-date references to cgroup settings
|
|
|
a4b143 |
|
|
|
a4b143 |
---
|
|
|
a4b143 |
man/systemd-cgtop.xml | 36 +++++++++++++++---------------------
|
|
|
a4b143 |
man/systemd-system.conf.xml | 27 +--------------------------
|
|
|
a4b143 |
man/systemd.unit.xml | 5 ++++-
|
|
|
a4b143 |
src/core/dbus-manager.c | 27 ---------------------------
|
|
|
a4b143 |
src/core/system.conf | 3 +--
|
|
|
a4b143 |
src/core/user.conf | 1 -
|
|
|
a4b143 |
6 files changed, 21 insertions(+), 78 deletions(-)
|
|
|
a4b143 |
|
|
|
a4b143 |
diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml
|
|
|
a4b143 |
index 0e9e5e6..51549c4 100644
|
|
|
a4b143 |
--- a/man/systemd-cgtop.xml
|
|
|
a4b143 |
+++ b/man/systemd-cgtop.xml
|
|
|
a4b143 |
@@ -73,30 +73,23 @@
|
|
|
a4b143 |
only accounted for control groups in the
|
|
|
a4b143 |
<literal>cpuacct</literal> hierarchy, memory usage
|
|
|
a4b143 |
only for those in <literal>memory</literal> and disk
|
|
|
a4b143 |
- I/O usage for those in
|
|
|
a4b143 |
- <literal>blkio</literal>. <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
|
|
a4b143 |
- by default places all services in their own control
|
|
|
a4b143 |
- group in the <literal>cpuacct</literal> hierarchy, but
|
|
|
a4b143 |
- not in <literal>memory</literal> nor
|
|
|
a4b143 |
- <literal>blkio</literal>. If resource monitoring for
|
|
|
a4b143 |
- these resources is required, it is recommended to add
|
|
|
a4b143 |
- <literal>blkio</literal> and <literal>memory</literal>
|
|
|
a4b143 |
- to the <varname>DefaultControllers=</varname> setting
|
|
|
a4b143 |
- in <filename>/etc/systemd/system.conf</filename> (see
|
|
|
a4b143 |
- <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
|
a4b143 |
- for details). Alternatively, it is possible to enable
|
|
|
a4b143 |
- resource accounting individually for services, by
|
|
|
a4b143 |
- making use of the <varname>ControlGroup=</varname>
|
|
|
a4b143 |
- option in the unit files (See
|
|
|
a4b143 |
- <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
|
a4b143 |
+ I/O usage for those in <literal>blkio</literal>. If
|
|
|
a4b143 |
+ resource monitoring for these resources is required,
|
|
|
a4b143 |
+ it is recommended to add the
|
|
|
a4b143 |
+ <varname>CPUAccounting=1</varname>,
|
|
|
a4b143 |
+ <varname>MemoryAccounting=1</varname> and
|
|
|
a4b143 |
+ <varname>BlockIOAccounting=1</varname> settings in the
|
|
|
a4b143 |
+ unit files in question (See
|
|
|
a4b143 |
+ <citerefentry><refentrytitle>systemd.cgroup</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
|
a4b143 |
for details).</para>
|
|
|
a4b143 |
|
|
|
a4b143 |
<para>To emphasize this: unless
|
|
|
a4b143 |
- <literal>blkio</literal> and <literal>memory</literal>
|
|
|
a4b143 |
- are enabled for the services in question with either
|
|
|
a4b143 |
- of the options suggested above no resource accounting
|
|
|
a4b143 |
- will be available for system services and the data shown
|
|
|
a4b143 |
- by <command>systemd-cgtop</command> will be
|
|
|
a4b143 |
+ <literal>CPUAccounting=1</literal>,
|
|
|
a4b143 |
+ <literal>MemoryAccounting=1</literal> and
|
|
|
a4b143 |
+ <literal>BlockIOAccounting=1</literal> are enabled for
|
|
|
a4b143 |
+ the services in question no resource accounting will
|
|
|
a4b143 |
+ be available for system services and the data shown by
|
|
|
a4b143 |
+ <command>systemd-cgtop</command> will be
|
|
|
a4b143 |
incomplete.</para>
|
|
|
a4b143 |
</refsect1>
|
|
|
a4b143 |
|
|
|
a4b143 |
@@ -281,6 +274,7 @@
|
|
|
a4b143 |
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
|
a4b143 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
|
a4b143 |
<citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
|
a4b143 |
+ <citerefentry><refentrytitle>systemd.cgroup</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
|
|
a4b143 |
<citerefentry><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
|
|
a4b143 |
</para>
|
|
|
a4b143 |
</refsect1>
|
|
|
a4b143 |
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
|
|
|
a4b143 |
index c52e590..e8cf8a9 100644
|
|
|
a4b143 |
--- a/man/systemd-system.conf.xml
|
|
|
a4b143 |
+++ b/man/systemd-system.conf.xml
|
|
|
a4b143 |
@@ -104,32 +104,7 @@
|
|
|
a4b143 |
</varlistentry>
|
|
|
a4b143 |
|
|
|
a4b143 |
<varlistentry>
|
|
|
a4b143 |
- <term><varname>DefaultControllers=cpu</varname></term>
|
|
|
a4b143 |
-
|
|
|
a4b143 |
- <listitem><para>Configures in which
|
|
|
a4b143 |
- control group hierarchies to create
|
|
|
a4b143 |
- per-service cgroups automatically, in
|
|
|
a4b143 |
- addition to the
|
|
|
a4b143 |
- <literal>name=systemd</literal> named
|
|
|
a4b143 |
- hierarchy. Defaults to
|
|
|
a4b143 |
- <literal>cpu</literal>. Takes a
|
|
|
a4b143 |
- space-separated list of controller
|
|
|
a4b143 |
- names. Pass the empty string to ensure
|
|
|
a4b143 |
- that systemd does not touch any
|
|
|
a4b143 |
- hierarchies but its own.</para>
|
|
|
a4b143 |
-
|
|
|
a4b143 |
- <para>Note that the default value of
|
|
|
a4b143 |
- 'cpu' will make realtime scheduling
|
|
|
a4b143 |
- unavailable to system services. See
|
|
|
a4b143 |
-
|
|
|
a4b143 |
- url="http://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime">My
|
|
|
a4b143 |
- Service Can't Get Realtime!</ulink>
|
|
|
a4b143 |
- for more
|
|
|
a4b143 |
- information.</para></listitem>
|
|
|
a4b143 |
- </varlistentry>
|
|
|
a4b143 |
-
|
|
|
a4b143 |
- <varlistentry>
|
|
|
a4b143 |
- <term><varname>JoinControllers=cpu,cpuacct,cpuset net_cls,netprio</varname></term>
|
|
|
a4b143 |
+ <term><varname>JoinControllers=cpu,cpuacct net_cls,netprio</varname></term>
|
|
|
a4b143 |
|
|
|
a4b143 |
<listitem><para>Configures controllers
|
|
|
a4b143 |
that shall be mounted in a single
|
|
|
a4b143 |
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
|
|
|
a4b143 |
index d61426a..5c8b8e8 100644
|
|
|
a4b143 |
--- a/man/systemd.unit.xml
|
|
|
a4b143 |
+++ b/man/systemd.unit.xml
|
|
|
a4b143 |
@@ -1241,7 +1241,10 @@
|
|
|
a4b143 |
<row>
|
|
|
a4b143 |
<entry><literal>%R</literal></entry>
|
|
|
a4b143 |
<entry>Parent directory of the control group path where units are placed.</entry>
|
|
|
a4b143 |
- <entry>For system instances this usually resolves to <filename>/</filename>, except in containers, where this resolves to the container's root directory. This specifier is particularly useful in the <varname>ControlGroup=</varname> setting (see <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</entry>
|
|
|
a4b143 |
+ <entry>For system instances this usually
|
|
|
a4b143 |
+ resolves to <filename>/</filename>, except in
|
|
|
a4b143 |
+ containers, where this resolves to the
|
|
|
a4b143 |
+ container's root directory.</entry>
|
|
|
a4b143 |
</row>
|
|
|
a4b143 |
<row>
|
|
|
a4b143 |
<entry><literal>%t</literal></entry>
|
|
|
a4b143 |
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
|
|
|
a4b143 |
index 75e2e45..676a07f 100644
|
|
|
a4b143 |
--- a/src/core/dbus-manager.c
|
|
|
a4b143 |
+++ b/src/core/dbus-manager.c
|
|
|
a4b143 |
@@ -103,32 +103,6 @@
|
|
|
a4b143 |
" <method name=\"ResetFailedUnit\">\n" \
|
|
|
a4b143 |
" <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
" </method>\n" \
|
|
|
a4b143 |
- " <method name=\"SetUnitControlGroup\">\n" \
|
|
|
a4b143 |
- " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"group\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " </method>\n" \
|
|
|
a4b143 |
- " <method name=\"UnsetUnitControlGroup\">\n" \
|
|
|
a4b143 |
- " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"group\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"mode\" type=\"s\" direction=\"in\"\n/>" \
|
|
|
a4b143 |
- " </method>\n" \
|
|
|
a4b143 |
- " <method name=\"GetUnitControlGroupAttribute\">\n" \
|
|
|
a4b143 |
- " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"attribute\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"values\" type=\"as\" direction=\"out\"/>\n" \
|
|
|
a4b143 |
- " </method>\n" \
|
|
|
a4b143 |
- " <method name=\"SetUnitControlGroupAttribute\">\n" \
|
|
|
a4b143 |
- " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"attribute\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"values\" type=\"as\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"mode\" type=\"s\" direction=\"in\"\n/>" \
|
|
|
a4b143 |
- " </method>\n" \
|
|
|
a4b143 |
- " <method name=\"UnsetUnitControlGroupAttributes\">\n" \
|
|
|
a4b143 |
- " <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"attribute\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
- " </method>\n" \
|
|
|
a4b143 |
" <method name=\"GetJob\">\n" \
|
|
|
a4b143 |
" <arg name=\"id\" type=\"u\" direction=\"in\"/>\n" \
|
|
|
a4b143 |
" <arg name=\"job\" type=\"o\" direction=\"out\"/>\n" \
|
|
|
a4b143 |
@@ -316,7 +290,6 @@
|
|
|
a4b143 |
" <property name=\"ConfirmSpawn\" type=\"b\" access=\"read\"/>\n" \
|
|
|
a4b143 |
" <property name=\"ShowStatus\" type=\"b\" access=\"read\"/>\n" \
|
|
|
a4b143 |
" <property name=\"UnitPath\" type=\"as\" access=\"read\"/>\n" \
|
|
|
a4b143 |
- " <property name=\"DefaultControllers\" type=\"as\" access=\"read\"/>\n" \
|
|
|
a4b143 |
" <property name=\"DefaultStandardOutput\" type=\"s\" access=\"read\"/>\n" \
|
|
|
a4b143 |
" <property name=\"DefaultStandardError\" type=\"s\" access=\"read\"/>\n" \
|
|
|
a4b143 |
" <property name=\"RuntimeWatchdogUSec\" type=\"t\" access=\"readwrite\"/>\n" \
|
|
|
a4b143 |
diff --git a/src/core/system.conf b/src/core/system.conf
|
|
|
a4b143 |
index f2817bc..7b03c87 100644
|
|
|
a4b143 |
--- a/src/core/system.conf
|
|
|
a4b143 |
+++ b/src/core/system.conf
|
|
|
a4b143 |
@@ -17,10 +17,9 @@
|
|
|
a4b143 |
#ShowStatus=yes
|
|
|
a4b143 |
#CrashChVT=1
|
|
|
a4b143 |
#CPUAffinity=1 2
|
|
|
a4b143 |
-#DefaultControllers=cpu
|
|
|
a4b143 |
#DefaultStandardOutput=journal
|
|
|
a4b143 |
#DefaultStandardError=inherit
|
|
|
a4b143 |
-#JoinControllers=cpu,cpuacct,cpuset net_cls,net_prio
|
|
|
a4b143 |
+#JoinControllers=cpu,cpuacct net_cls,net_prio
|
|
|
a4b143 |
#RuntimeWatchdogSec=0
|
|
|
a4b143 |
#ShutdownWatchdogSec=10min
|
|
|
a4b143 |
#CapabilityBoundingSet=
|
|
|
a4b143 |
diff --git a/src/core/user.conf b/src/core/user.conf
|
|
|
a4b143 |
index 4252451..4a0129a 100644
|
|
|
a4b143 |
--- a/src/core/user.conf
|
|
|
a4b143 |
+++ b/src/core/user.conf
|
|
|
a4b143 |
@@ -12,6 +12,5 @@
|
|
|
a4b143 |
#LogTarget=console
|
|
|
a4b143 |
#LogColor=yes
|
|
|
a4b143 |
#LogLocation=no
|
|
|
a4b143 |
-#DefaultControllers=cpu
|
|
|
a4b143 |
#DefaultStandardOutput=inherit
|
|
|
a4b143 |
#DefaultStandardError=inherit
|