[systemd-devel] Options for logging from service started before journald?

Andrei Borzenkov arvidjaar at gmail.com
Sun Oct 18 08:31:09 PDT 2015


18.10.2015 18:16, Jan Alexander Steffens пишет:
> On Sun, Oct 18, 2015 at 5:05 PM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>> What can be done to log from unit that needs to be started before journald?
>> Journal, syslog or kmsg all require journald connection and as far as I
>> understand will deadlock on waiting for journald to accept it. NULL is not
>> an option; is tty the only choice left?
>>
>> Background - openSUSE tries to start haveged before journald to add
>> randomness.
>>
>> This sounds like reincarnation of "how to log to syslog and be started
>> before syslogd". This was solved by moving logging connection to journald
>> and starting it very early. May be something like minilod or blogd that
>> buffers output until journald is started would be appropriate here?
>
> You can log into the kernel's log buffer, see
> https://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg
>
This means - explicit modification of program; because systemd kmsg 
works through journald.

Also won't this lose information about originator program and so there 
will be no way to filter journal by unit?


More information about the systemd-devel mailing list