<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 1/15/19 6:49 PM, Lennart Poettering
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20190115184943.GA29216@gardel-login">
<pre class="moz-quote-pre" wrap="">On Di, 15.01.19 11:23, Eric DeVolder (<a class="moz-txt-link-abbreviated" href="mailto:eric.devolder@oracle.com" moz-do-not-send="true">eric.devolder@oracle.com</a>) wrote:
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">Systemd-devel,
Below is a write-up I've done to explain a new service for archiving pstore
contents. I've attached the pstore.service files
(/lib/systemd/system/pstore.service and bin/pstore-tool). These are trivial
right now, but easy to build upon if periodic, rather than just on-boot,
examination of the pstore is desirable.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">If you look at the TODO list in our git tree, you'll find that
importing and flushing pstore has been a long-time TODO list item for
us.</pre>
</blockquote>
<p>Hmm does it need to be another full blown coredump?<br>
</p>
<p>Looking at his script this should suffice more or less for what
he was trying to achive no?<br>
</p>
<p>Create the tempfile pstore.conf with the following content</p>
<p>d /var/lib/pstore 0755 root root -<br>
</p>
<p>and place that file in /etc/tmpfiles.d/</p>
<p>Then create an path type unit - pstore.path with the following
content</p>
<p>[Unit]<br>
Description=Monitor the pstore directory for files.<br>
Documentation=<a class="moz-txt-link-freetext" href="https://www.kernel.org/doc/Documentation/ABI/testing/pstore">https://www.kernel.org/doc/Documentation/ABI/testing/pstore</a><br>
<br>
[Path]<br>
PathModified=/sys/fs/pstore/</p>
<p>And place that file in the /etc/systemd/system directory<br>
</p>
<p>Then create type service unit pstore.service with the following
content</p>
<p>[Unit]<br>
Description=Move pstore files to persistant storage<br>
Documentation=<a class="moz-txt-link-freetext" href="https://www.kernel.org/doc/Documentation/ABI/testing/pstore">https://www.kernel.org/doc/Documentation/ABI/testing/pstore</a><br>
<br>
[Service]<br>
ExecStart=/bin/bash -c '/usr/bin/mv -t /var/lib/pstore
/sys/fs/pstore/*'<br>
Restart=on-success<br>
</p>
<p>And place that file in the /etc/systemd/system directory</p>
<p>Then run systemctl daemon-reload and see if this suffices. <br>
</p>
<p>Admins or whomever can then just do the cat to dmesg vodoo on the
files in /var/lib/pstore if and then when they need it....</p>
<p>JBG<br>
</p>
</body>
</html>