[systemd-devel] journald on embedded systems
Umut Tezduyar Lindskog
umut at tezduyar.com
Fri Mar 13 21:37:17 PDT 2015
Getting inspiration from what you are proposing, you can already forward
messages to a datagram socket (syslog). You could implement a program to
empty out the datagram socket and only write the messages you want. Syslog
format doesnt know anything about FIELD though. One down side of this
implementation is that your program will be woken up for every message
causing extra context switch.
Regardless off this, it is interesting to hear out the thoughts about
filtering. There have been discussions about per service filtering too.
On Friday, March 13, 2015, Chris Morgan <chmorgan at gmail.com> wrote:
> I posted this,
> 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.
> systemd-devel mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the systemd-devel