[systemd-devel] Forwarding early boot messages to rsyslog
Lennart Poettering
lennart at poettering.net
Tue Jan 22 13:53:37 PST 2013
On Tue, 22.01.13 15:02, Scott Shambarger (scott-systemd at shambarger.net) wrote:
> I'm running Fedora 17 with rsyslog, but since I also need to also
> receive logs via UDP, I've updated rsyslog.service to include
> After=network.target (so the private network binding works).
>
> However, syslogs created before network.target aren't forwarded to
> rsyslog when it's started (rsyslog is configured by default to
> listen on /run/systemd/journal/syslog).
Well, systemd achieves early boot logging by having the journal daemon written
in a style that works fine in minimal early-boot/initrd
environments. i.e. it does not assume /var to be around and buffers in
/run instead.
Now, if rsyslog wants these messages too there are basically three options:
a) it also learns all these tricks and can run in an initrd.
b) it learns how to read the data after startup directly from the journal
c) we set up syslog.socket much earlier (in the initrd) and increase the
max number of datagrams it can queue. The kernel limit on that is 10 by
now, and one can only raise this globally. Somebody would have to
patch the kernel to increase this per-socket, since we hardly bump
this limit for every socket on the system. We'd basically need a
SO_DGRAMQLEN socktopt so we could bump for this socket and this
socket only.
I think b) or c) are probably the much more worthwile solutions. I am
personally very much interested in c) actually, as this would generally
allow great parallelization before things start to block.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list