[install-guide: 15/18] added some debug commands

Pete Travis immanetize at fedoraproject.org
Fri Oct 26 05:52:09 UTC 2012


commit 129955a4c98b8d21a3a9fb3b046bec024abb50db
Author: Pete Travis <immanetize at fedoraproject.org>
Date:   Tue Oct 2 00:22:46 2012 -0600

    added some debug commands

 en-US/Boot_Init_Shutdown.xml |   58 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 2 deletions(-)
---
diff --git a/en-US/Boot_Init_Shutdown.xml b/en-US/Boot_Init_Shutdown.xml
index 2e61b11..a4c6851 100644
--- a/en-US/Boot_Init_Shutdown.xml
+++ b/en-US/Boot_Init_Shutdown.xml
@@ -607,13 +607,67 @@ Sep 20 22:56:55 fqdn.fedora.lan sshd[971]: Received signal 15; terminating.
               <screen><command>systemctl enable sshd.service</command></screen>
               <screen><command>systemctl disable sshd.service</command></screen>
               <para> 
-                A service that is enabled will start automatically when the system boots. A service that is disabled will not start. These commands are manipulating symbolic links in <filename>/lib/systemd/system/</filename> and <filename>/lib/systemd/user/</filename>. While the symlinks can be manipulated manually, <application>systemctl</application> also rebuilds the <application>systemd</application> configuration, saving the extra step of invoking <command>systemctl daemon-reload</command>.
+                A service that is enabled will start automatically when the system boots. A service that is disabled will not start at boot. These commands are manipulating symbolic links in <filename>/lib/systemd/system/</filename> and <filename>/lib/systemd/user/</filename> while retaining the relationships with other units established in the <filename>.service</filename> file. While the symlinks can be manipulated manually, <application>systemctl</application> also rebuilds the <application>systemd</application> configuration, saving the extra step of invoking <command>systemctl daemon-reload</command>.
               </para>
             </section>
+            <section id="s1-boot-init-shutdown-administration-kill">
+              <title>Killing and Masking services</title>
+              <screen><command>systemctl kill sshd.service</command></screen>
+              <screen><command>systemctl kill -s USR1 <replaceable>daemon</replaceable>.service</command></screen>
+              <para>With the first command, <application>systemd</application> kills all processes and child processes of the <application>sshd</application> service. The second command demonstrates how any Unix signal can be sent to the processes of a service.
+              </para>
+              <screen><command>systemctl mask <replaceable>daemon</replaceable>.service</command></screen>
+              <para>
+                Masking a service prevents the service from being started manually or automatically. For this example, <application>systemctl</application> is creating a symlink from <filename>/etc/systemd/system/daemon.service</filename> to /dev/null. Targets in <filename>/etc/systemd</filename> override those provided by packages in <filename>/lib/systemd</filename>. <application>systemd</application> recognizes the symlink and will not start the service.
+              </para>
+            </section>
+
+	    <section id="s1-boot-init-shutdown-administration-systemctl">
+	      <title>Getting more from <application>systemd</application></title>
+	      <para>
+		<application>systemctl</application> works with not only services but all other unit types, and is a valuable tool when monitoring or troubleshooting a system. It can list all known units, limit the results to a single unit type, show only failed units, or examine unit relationships. The table below shows some useful systemctl features.
+              </para>
+              <segmentedlist>
+		<segtitle>command</segtitle>
+		<segtitle>result</segtitle>
+		<seglistitem>
+		  <seg>systemctl list-jobs</seg>
+		  <seg>
+                    Shows running and waiting jobs; useful for troubleshooting during boot.
+		  </seg>
+		</seglistitem>
+                <seglistitem>
+                  <seg>systemctl list-units -t service</seg>
+                  <seg>Shows all active services</seg>
+                </seglistitem>
+                <seglistitem>
+                  <seg>systemctl list-units -t service --all</seg>
+                  <seg>Shows all available services</seg>
+                </seglistitem>
+                <seglistitem>
+                  <seg>systemctl show -p "Wants" multi-user.target</seg>
+                  <seg>Shows which services are pulled in by a given target</seg>
+                </seglistitem>
+                <seglistitem>
+                  <seg>systemd --test --system --unit=multi-user.target</seg>
+                  <seg>Simulates booting the system to a given target</seg>
+                </seglistitem>
+                <seglistitem>
+                  <seg>systemd-analyze plot > boot.svg</seg>
+                  <seg>greates a graphical representation of the boot process</seg>
+                </seglistitem>
+              </segmentedlist>
+                    
+
+
+
 
+<!--
+systemctl for comprehensive view
+sect troubleshooting a slow boot : systemd-analyze-->
 <!-- basically, systemd to sysvinit cheatsheet here. systemctl enable, et al-->
 
-<!--	</section>-->
+</section>
 	
 
 </appendix>


More information about the docs-commits mailing list