[systemd-devel] Systemd debugging option, documentation clarification

Lennart Poettering lennart at poettering.net
Tue Jul 16 19:10:57 PDT 2013


On Thu, 06.06.13 18:54, Andrey Borzenkov (arvidjaar at gmail.com) wrote:

> > On Wed, 15.05.13 22:28, John Connor (jaconnor44 at gmail.com) wrote:
> > 
> > > 1: It would be useful for debugging if systemctl had an option to show
> > > output on the screen (especially output from scripts run under
> > > systemd), rather than dumping it in a journal which you then have to
> > > search through.  This should be a command-line option, because you
> > > would normally use it only for debugging, not for a normal boot. I
> > > don't know how practicable this would be, but it would be useful.
> > 
> > This is actually harder than it sounds, since notification when a job
> > finished is asynchronous to the stream of logs, and I have no idea how
> > we could ever fix that.
> 
> By default systemctl is blocking - it waits until job is completed,
> right? So it could fetch logs for this job after completion, similar to
> "systemctl status"? What does it involve beyond sticking
> show_journal_by_unit() in the right place?

There's no guarantee that journald has written the logs to disk when
systemctl would check them there. systemctl blocks until the PID 1 told
it that the execution job is done, but there's no way how journald could
communicate that everything queued from that service has been read and
written to disk, so that systemctl could find it there.

It's really hard to get right. No idea how to make this work.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list