Tuesday, 10 January 2017

Make systemd journal persistent | remove rsyslog (by default)


In debugging a shutdown issue I came across a bug [1] that indicates
for us to get better logs [2] during shutdown we really need to make
the systemd journal persistent. We would also need to remove rsyslog
by default so we don't have duplicate writing of logs to disk.

Aside from shutdown logs we also get a lot of other nice metadata.
For instance, you can ask for all the logs since a certain date. You
can trivially view the logs from 2 boots ago.

The negative is it is in a binary format and you have to use
journalctl to read it.

I'm sure I missed some positives/negatives. Thoughts on doing this for Zesty?

To try it out:
sudo mkdir /var/log/journal
reboot twice and now you can view old boots (journalctl --list-boots)
(then optionally) apt-get remove rsyslog

Kind regards,

[1] https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1618188
[2] http://pastebin.ubuntu.com/23776783/

ubuntu-devel mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel