<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Knowledge Base (Posts about journald)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/journald.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2023 &lt;a href="mailto:bgstack15@gmail.com"&gt;bgstack15&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
style="border-width:0; margin-bottom:12px;"
src="https://bgstack15.ddns.net/.images/l_by-sa_4.0_88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Sun, 08 Jan 2023 14:13:43 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Journald use real syslog</title><link>https://bgstack15.ddns.net/blog/posts/2023/01/08/journald-use-real-syslog/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;I have a few systems that use systemd. I feel that it is a fine service manager, but the whole systemd project keeps subsuming other functions and getting more bloated, and also chooses terrible default values! Don't give me any lip about how it's a function of the distro's packaging that makes systemd's defaults bad: I'm talking about CentOS here, so &lt;em&gt;THE&lt;/em&gt; systemd distro. Its package defaults &lt;em&gt;are&lt;/em&gt; systemd defaults.&lt;/p&gt;
&lt;p&gt;To make sure you actually have logs that last longer than a reboot, you need to change from the default. Make sure rsyslog is installed, and then modify journald configs.&lt;/p&gt;
&lt;p&gt;Inside file &lt;code&gt;/etc/systemd/journald.conf&lt;/code&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="k"&gt;[Journal]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;Storage&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;persistent&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Also &lt;code&gt;mkdir /var/log/journal&lt;/code&gt;. And then &lt;code&gt;systemctl restart systemd-journald&lt;/code&gt; because they love their name so much you need it add it in front of many things. As if there's some other possible "journald" that people could possibly use.&lt;/p&gt;
&lt;p&gt;So after this manual configuration, you can actually investigate what happened before your system shut down. Thanks a lot, [censored].&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.redhat.com/sysadmin/store-linux-system-journals"&gt;https://www.redhat.com/sysadmin/store-linux-system-journals&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>journald</category><category>rsyslog</category><category>syslog</category><category>systemd</category><guid>https://bgstack15.ddns.net/blog/posts/2023/01/08/journald-use-real-syslog/</guid><pubDate>Sun, 08 Jan 2023 14:00:03 GMT</pubDate></item></channel></rss>