[systemd-devel] journald on embedded systems
Lennart Poettering
lennart at poettering.net
Fri Apr 10 09:21:18 PDT 2015
On Fri, 13.03.15 18:35, Chris Morgan (chmorgan at gmail.com) wrote:
> Hello.
>
> 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.
I am very cold on the idea of adding a matching logic to journald's
configuration file.
However, I'd be happy to merge a patch that adds two distinct
configuration variables replacing MaxLevelStore=, one for persistant
and one for runtime journals, so that you can keep debug information
in the runtime journal, but only real errors on disk. In this case the
matching would be purely limited to the log level, and nothing else.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list