[release-notes] added some info about journalctl and systemd

Pete Travis immanetize at fedoraproject.org
Sun Oct 20 17:02:43 UTC 2013


commit 685e46c90a7ab7d0139b246d7c1381376cb907b5
Author: Pete Travis <immanetize at fedoraproject.org>
Date:   Sun Oct 20 11:02:42 2013 -0600

    added some info about journalctl and systemd

 en-US/System_Daemons.xml |   75 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 72 insertions(+), 3 deletions(-)
---
diff --git a/en-US/System_Daemons.xml b/en-US/System_Daemons.xml
index 843bc51..7b86306 100644
--- a/en-US/System_Daemons.xml
+++ b/en-US/System_Daemons.xml
@@ -110,10 +110,27 @@
 	  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 id="system_daemons-systemd-truecrypt">
+      <title>systemd-cryptsetup for TrueCrypt</title>
+      <para>
+	Support for <productname>TrueCrypt</productname> in Fedora is expanded by <application>systemd-cryptsetup</application> support for the technology, allowing easy authentication during boot.
+      </para>
+    </section>
     
-
+    <section id="system_daemons-systemd-filter">
+      <title>Filtering by unit state with systemctl</title>
+      <para>
+	<command>systemctl</command> now supports filtering the unit list output by load state. The <function>--state</function> option will accept any value or a comma-separated list of the values of <function>LOAD</function>, <function>SUB</function>, or <function>ACTIVE</function> states. For example,
+	<screen>
+	  <command>
+	    systemctl --state failed
+	  </command>
+	</screen>
+      </para>
+    </section>
   </section>
-  <section>
+
+  <section id="system_daemons-journald">
     <title>journald</title>
     <indexterm>
       <primary>journald</primary>
@@ -121,8 +138,60 @@
     <indexterm>
       <primary>journalctl</primary>
     </indexterm>
-	
     <para />
+    <section id="system_daemons-journald-b">
+      <title>Viewing the logs of a specific boot</title>
+      <para>
+	<command>journalctl</command> can now be used to view the logs from a specific boot. For example, to view logs from the current boot:
+	<screen>
+	  <command>journalctl -b</command>
+	</screen>
+      </para>
+      <para>
+	Or, view the logs from the previous boot:
+	<screen>
+	  <command>journalctl -b -1</command>
+	</screen>
+      </para>
+      <para>
+	In addition to relative boot sequence, journald assigns a 128-bit boot ID that can be referenced. For example:
+	<screen>
+	  <command>journalctl -b  38fd9c3303574ed38e822233457f6b77</command>
+	</screen>
+      </para>
+    </section>
+    <section id="system_daemons-journald-cursors">
+      <title>Referencing the journal with cursors</title>
+      <para>
+	<command>journalctl</command> can reference the contents of the journal by a record identifier known as a <literal>cursor</literal>. Similar to a git hash, the <literal>cursor</literal> uniquely identifies a point in the journal.
+      </para>
+      <para>
+	If you add <function>--show-cursor</function> to a journalctl query, the last line of output will contain the cursor value:
+	<screen>
+	  <command>journalctl -b -u network --show-cursor --since 15:00</command>
+	  Sep 08 15:37:59 localhost.localdomain network[4074]: [FAILED]
+	  Sep 08 15:37:59 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1
+	  Sep 08 15:37:59 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.
+	  Sep 08 15:37:59 localhost.localdomain systemd[1]: Unit network.service entered failed state.
+	  -- cursor: s=13497722134642a2ac1544bada0c8836;i=1120d;b=8491c05dabd3444ca122e7069b5de0a9;m=db2118a46;t=4e5e7d81c7402;x=d177768ac95df831
+	</screen>
+      </para>
+      <para>
+	The cursor can be used to identify that point in the journal in a broader query to provide context:
+	<screen>
+	  <command>journalctl -c "s=13497722134642a2ac1544bada0c8836;i=1120d;b=8491c05dabd3444ca122e7069b5de0a9;m=db2118a46;t=4e5e7d81c7402;x=d177768ac95df831"</command>
+	</screen>
+      </para>
+      <para>
+	Scripts parsing journalctl's output can store the cursor value and use it on their next run to pick up where they left off:
+	<screen>
+	  <command>journalctl --after-cursor "s=13497722134642a2ac1544bada0c8836;i=1120d;b=8491c05dabd3444ca122e7069b5de0a9;m=db2118a46;t=4e5e7d81c7402;x=d177768ac95df831"</command>
+	</screen>
+      </para>
+    </section>
+
+   
+      
   </section>
 </section>
 


More information about the docs-commits mailing list