[release-notes] systemd has scope and slice units

Pete Travis immanetize at fedoraproject.org
Sun Oct 20 01:32:03 UTC 2013


commit 60ceb42f3917adc74d7d780eaa0becf366dec5fc
Author: Pete Travis <immanetize at fedoraproject.org>
Date:   Sat Oct 19 19:32:01 2013 -0600

    systemd has scope and slice units

 en-US/System_Daemons.xml |   57 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/en-US/System_Daemons.xml b/en-US/System_Daemons.xml
index a7ffeb6..843bc51 100644
--- a/en-US/System_Daemons.xml
+++ b/en-US/System_Daemons.xml
@@ -53,10 +53,65 @@
       </segmentedlist>
     </para>
   </section>
-  <section>
+  <section id="system_daemons-systemd">
     <title>systemd</title>
     <indexterm><primary>systemd</primary></indexterm>
     <para />
+    <section id="system_daemons-systemd-">
+      <title>New unit types: Scope</title>
+      <para>
+	Systemd now has two new unit types, <systemitem>scope</systemitem> and <systemitem>slice</systemitem>. 
+	</para>
+	<para>
+	  <systemitem>scope</systemitem> units are automatically created by systemd out of existing processes. By grouping a process and its children together, a scope unit can be used to organize processes, apply resource units, or kill a group of processes. User sessions are one example of processes contained in a scope unit. 
+	</para>
+	<para>
+	  <systemitem>slice</systemitem> units are used to group units that manage processes into a hierarchy that allows control of resources allocated to the slice. The default slices are machine.slice, for virtual machines and containers; system.slice, for system services; and user.slice, for user sessions. These default slices are automatically populated.
+	</para>
+	<para>
+	  <systemitem>Instance units</systemitem>, such as <systemitem>getty at .service</systemitem>, are spawned on demand using the template defined in their configuration file. Each type of template is given a subslice of the <literal>system slice</literal>, and instances are contained within that slice.
+	</para>
+	<para> 
+	  Scope and service units assigned to a slice are descendants of that slice's node in the control group tree. A slice's name describes its position relative to the root slice. The output below demonstrates how <emphasis>user-1000.slice</emphasis> is a child of <emphasis>user.slice</emphasis>, which is in turn a child of <emphasis><literal>.</literal></emphasis>, the root slice. Each session is further confined in a scope unit within the user's slice.
+	  <screen>
+	    <command>systemctl status user.slice</command>
+<![CDATA[
+  Loaded: loaded (/usr/lib/systemd/system/user.slice; static)
+  Active: active since Sun 2013-09-08 01:23:40 MDT; 18h ago
+    Docs: man:systemd.special(7)
+  CGroup: /user.slice
+          ├─user-1000.slice
+          │ ├─session-21.scope
+          │ │ ├─9226 sshd: pete [priv]
+          │ │ ├─9229 sshd: pete at pts/4
+          │ │ ├─9230 -bash
+          │ │ ├─9262 sudo su -
+          │ │ ├─9270 su -
+          │ │ ├─9271 -bash
+          │ │ └─9509 screen -R
+          │ ├─session-18.scope
+          │ │ ├─ 7939 sshd: pete [priv]
+          │ │ ├─ 7942 sshd: pete at pts/0
+          │ │ ├─ 7943 -bash
+          │ │ ├─ 7982 sudo su -
+          │ │ ├─ 7988 su -
+          │ │ ├─ 7989 -bash
+          │ │ ├─ 8206 SCREEN
+          │ │ ├─ 8207 /bin/bash
+          │ │ ├─ 8237 /bin/bash
+          │ │ ├─ 8486 less NEWS
+          │ │ ├─ 8489 /bin/bash
+          │ │ └─10637 systemctl status user.slice
+          ## truncated ##
+]]>
+	  </screen>
+	</para>
+	<para>
+	  Services can be added to a slice with the <function>Slice=<replaceable>slicename</replaceable></function> directive in their unit configuration file.  Arguments allowing resource limitation within a slice or service unit are described in <command>man systemd.directives</command>. See also <command>man systemd.slice</command> and <command>man systemd.cgroup</command>.
+	</para>
+    </section>
+    
+
   </section>
   <section>
     <title>journald</title>


More information about the docs-commits mailing list