[systemd-devel] journald on embedded systems

Chris Morgan chmorgan at gmail.com
Fri Mar 13 15:35:38 PDT 2015


I posted this, http://lists.freedesktop.org/archives/systemd-devel/2013-July/011926.html,
some time ago about tiered logging for embedded systems.

The goal is to guarantee that the flash memory will last the duration
of the product by carefully controlling who writes to it.

I'm back looking at the issue and wanted to re-open the discussion.

One approach that came up would be to set "Storage=volatile", a limit
of say "10MB" for the journal size, and then write a separate program
that would filter out the journal entries and write them to a file on
a physical disk. The filtering portion is required as we are using the
journal to persist some important information that we'd like to log.
We'd also like to preserve high priority messages but don't mind if we
lose low priority ones across reboots.

An upside of the external program is that we can filter on both high
priority messages as well as those with specific "FIELD=value"
entries. Downside is a custom format file and can't use journalctl to
search through it, no log rotation, no size limits etc.

At the time there was some thought of putting this into journald
itself. I'm wondering how that would fit given the desire to use more
complicated matching to decide which entries were put into the
persisted journal.

If it would fit inside of journald I'd be willing to implement it but
we would need to come up with a way to configure the filtering, where
the files are persisted etc. The filtering is a new requirement since
the last time this was discussed.


More information about the systemd-devel mailing list