On 1/15/19 6:49 PM, Lennart Poettering wrote:
On Di, 15.01.19 11:23, Eric DeVolder (eric.devol...@oracle.com) wrote:

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.
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.

Hmm does it need to be another full blown coredump?

Looking at his script this should suffice more or less for what he was trying to achive no?

Create the tempfile pstore.conf with the following content

d /var/lib/pstore 0755 root root -

and place that file in /etc/tmpfiles.d/

Then create an path type unit - pstore.path with the following content

[Unit]
Description=Monitor the pstore directory for files.
Documentation=https://www.kernel.org/doc/Documentation/ABI/testing/pstore

[Path]
PathModified=/sys/fs/pstore/

And place that file in the /etc/systemd/system directory

Then create type service unit pstore.service with the following content

[Unit]
Description=Move pstore files to persistant storage
Documentation=https://www.kernel.org/doc/Documentation/ABI/testing/pstore

[Service]
ExecStart=/bin/bash -c '/usr/bin/mv -t /var/lib/pstore /sys/fs/pstore/*'
Restart=on-success

And place that file in the /etc/systemd/system directory

Then run systemctl daemon-reload and see if this suffices.

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....

JBG

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to